您现在的位置是:首页
>程序人生
>小程序开发
小程序开发过程中遇到的一些问题以及解决方法
发布时间:2021-08-26 编辑:杰霖 浏览:698 评论:0
1.wx.showModel content换行
换行 使用“\r\n”,在模拟器没效果,需要真机预览才能看到
let modelContent = `${name}\r\n今日使用:${today}\r\n累计使用:${total}`;
2.uni-app 海报生成插件
https://ext.dcloud.net.cn/plugin?id=2389
3.uni-app条码生成
https://github.com/q310550690/uni-app-barcode
https://ext.dcloud.net.cn/plugin?id=406
4.小程序语音静音播放开启
在app.js下的onLaunch 生命周期添加 wx.setInnerAudioOption({
obeyMuteSwitch: false
});
5.小程序IOS时间格式的兼容问题,由于IOS无法显示-,需要用/替换
时间.replace(getRegExp('-','g'),'/');
6.小程序路由跳转传参过程中如果参数是一个对象且字符串过多不建议使用JSON.stringify(obj)以&连接符的方式传递,字符串过长会导致某些属性接收不到,可以使用wx.setStorageSync的方式,在下一个页面使用wx.getStorageSync方式接收
上一篇: 已经是第一篇了,没有了!