wx.uploadFile返回非200错误苹果7 苹果7p直接崩溃是什么原因?

发布于 6 年前作者 yangzhong12447 次浏览最后编辑 6 年前来自 issues

wx.uploadFile({

url: id ? url + id : url,

filePath: path,

name: filename,

formData: data,

success(res) {

console.log(“test”, “1”)

wx.hideLoading()

console.log(“test”, res)

if (res.statusCode === 200) {

resolve(res.data)

setTimeout(() => {

wx.hideToast();

}, 300)

} else if (res.data.code === 401) {

reject(res.data)

wx.showModal({

title: ‘提示’,

content: ‘未认证或认证过期,请重新登录’,

showCancel: false,

success() {

wx.navigateTo({

url: ‘/pages/login00/sign’,

})

}

});

} else {

console.log(“huafengyierror”, res)

reject(res.data)

wx.showModal({

title: ‘提示’,

content: res.data.msg ? res.data.msg : res.data.content ? res.data.content : ‘当前网络不稳定,请稍后再试’,

showCancel: false

});

}

}

})

返回的statusCode != 200 时,iphone7 iphone7p直接崩溃

1 回复
jing96
jing961 楼5 年前

麻烦提供能复现问题的代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html