小程序
小游戏
企业微信
微信支付
扫描小程序码分享
3 个回答
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
内容中可能包含密钥、AppSecret等私密参数,泄漏会有安全风险,请检查内容并确认。
你应该把报错详情、代码片段或者复现方法秀一下,不然谁知道是什么问题
请提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
及出错截图
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
return new Promise((resolve) => {
console.log(3)
let canUse = wx.canIUse('chooseMessageFile.success');
if (canUse) {
wx.chooseMessageFile({
type: 'file',
count: chooseCount || 1,
success(res) {
console.log(4)
const tempFiles = [...res.tempFiles];
let bigst = false
let isNone = false;
let list = tempFiles.map((item) => {
if (item.size > 104857600) {
bigst = true;
}
if (item.size == 0) {
isNone = true;
}
return item;
})
if (bigst) {
Toast('文件大小超过100M,请重新选择')
resolve()
} else if (isNone) {
Toast('文件内容为空,请重新选择')
resolve();
} else {
resolve(list);
}
},
fail() {
console.log(2)
resolve();
}
})
} else {
Toast('请升级微信版本')
resolve()
}
})
}
你应该把报错详情、代码片段或者复现方法秀一下,不然谁知道是什么问题
请提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
及出错截图