请问您问题如何解决,我的是体验版和预览都无法上传,但是真机调试和开发者工具上调试都可以。
小程序文件上传、真机预览和调试都没有问题、体验版和正式版就不行、求解![图片] 工具测试一切正常、体验版和正式版就不行了、有没有大神遇到过、求解! 这是代码片段: [代码]chooseImage: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]wx.chooseImage({[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]let file = res.tempFilePaths[0][代码][代码] [代码][代码]wx.uploadFile({[代码][代码] [代码][代码]url: config.uploads,[代码][代码] [代码][代码]filePath: file,[代码][代码] [代码][代码]name: [代码][代码]'file'[代码][代码],[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'content-type'[代码][代码]: [代码][代码]'application/json'[代码][代码],[代码][代码] [代码][代码]'Authorization'[代码][代码]: wx.getStorageSync([代码][代码]'token_type'[代码][代码]) + [代码][代码]' '[代码] [代码]+ wx.getStorageSync([代码][代码]'access_token'[代码][代码]),[代码][代码] [代码][代码]},[代码][代码] [代码][代码]formData:{[代码][代码] [代码][代码]type: [代码][代码]'cover'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: (res)=>{[代码][代码] [代码][代码]res = JSON.parse(res.data)[代码][代码] [代码][代码]if[代码] [代码](res.resultCode == 200){[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]head: file,[代码][代码] [代码][代码]avatar: res.data[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码]
2019-06-01