微信小程序解码emoji表情 // 解码emoji表情 uncodeUtf16(str) { var reg = /\&#.*?;/g; var result = str.replace(reg, function(char) { var H, L, code; if (char.length == 9) { cod...
小程序ios margin-bottom失效问题 使用:padding-bottom 可兼容原因:从IOS8开始,属性var layoutMargins:UIEdgeInsets指定该View的subview同其edge的间距。AutoLayout使用margins来放置内容。其默认值为8pt。如果一个View是ViewController的rootview,系统会自动设置和管理margins,top和bottom。margins为0pt。所以自己设定的margin-bottom会失效...
mysql分组字段拆分查询 SELECT group_concat(specifications separator ',"'), COUNT(1) FROM goods_product WHERE deleted = '0' GROUP BY right(specifications,4)查询结果:group_concat 分组字段连接展示函数,默认按‘,’分割right 分组字段切割分组,只取其中一部分做分组还有 left substring(xx,index,length) 当index>0从左...
Specified key was too long; max key length is 767 bytes set global innodb_large_prefix=ON;//开启不限制索引长度 ALTER TABLE `TableName ` row_format=dynamic;
小程序体验版无法访问网络request:fail -2:net::ERR_FAILED 开发者工具浏览器访问都是正常然后【SSL/TLS安全评估报告】测试域名信任链是否完整。https://myssl.com/证书链下载修复工具证书链下载/证书链修复证书链下载/证书链修复工具,通过域名或者ip,或者证书信息,查看完整的证书链信息。https://myssl.com/chain_download.html...
Index column size too large. The maximum column size is 767 bytes. mysql复合索引超出大小限制建表语句后面加ROW_FORMAT=DYNAMIC
js两个数组比较是否相等 litemall使用中发现,规格参数修改的时候会直接重新生成,之前相同规格的配置需要重新配置。修改新生成参数代码判断是否已经存在设置为之前配置。js判断数组需转为字符串然后有可能顺序不一样加个排序 var specifications = [] for (var x = 0; x < n; x++) { var z = specValues[x][combination[x]] specifications.push(this.sp...
npm install 依赖冲突问题 npm install 报错依赖版本不一致安装时忽略所有peerDependenciesnpm install xxxx --legacy-peer-deps错误信息:npm ERR! Found: eslint@7.32.0npm ERR! node_modules/eslintnpm ERR! dev eslint@"7.32.0" from the root projectnpm ERR!npm ERR! Could not resolve dependency:npm E..
liunx 文件查看清理 1、查看磁盘使用情况df -hl2、查看目录占用空间du -h --max-depth=13、查看文件大小ls -lhS4、rm -rf 删除文件5、for i in `find . -name "*.log"`; do cat /dev/null >$i; done 批量删除log后缀文件
uni Android版本号判断 // #ifdef APP-PLUS var Build = plus.android.importClass("android.os.Build"); console.log(Build.VERSION.SDK_INT ) if(Build.VERSION.SDK_INT <11){ this.codec='software' } // #endif
node-sass安装过程中问题的解决 1. npm install -g cnpm --registry=https://registry.npm.taobao.org (安装淘宝镜像)2. cnpm install node-sass --save (使用淘宝镜像安装node-sass)如果cnpm无法加载文件C再powershell命令行之后,输入:set-ExecutionPolicy RemoteSigned,然后修改权限为A(Windos PowerShell 管理员运行)npm install node-sass --s
CentOS tmp目录自动清理问题 项目部署存储目录默认在tmp文件下 过一段时间会被系统自动清理相关配置文件有三个/etc/tmpfiles.d/*.conf/run/tmpfiles.d/*.conf/usr/lib/tmpfiles.d/*.conftmp目录在/usr/lib/tmpfiles.d/tmp.conf文件配置# This file is part of systemd.## systemd is free software; you can redistribute it and/or mo...
小程序发布后图片不显示问题 本地图片能正常显示,发布后图片不显示http://127.0.0.1:49287/__pageframe__/static/img/apply%20(11).png修改后:http://127.0.0.1:49287/__pageframe__/static/img/apply11.png微信里图片带特殊符号无法显示
uni小程转发朋友圈参数失效问题 onShareTimeline() { console.log(this.id) return { title: this.title, query: 'query=' + encodeURIComponent(JSON.stringify(this.id)), success: function(res) { // 转发成功 console.log("转发成功:" + JSON.stringify(res)); }, fail...
uni前端通用超简洁树状数据填充 列表数据转树状(数据须有层级关系pid ) treeData.filter(p=>{ let childArr = treeData.filter(child=> p.id == child.pid); childArr.length>0 ? p.children=childArr : '' return p.pid==0;//0