chooseimage:function(){ var _this = this; wx.chooseImage({ count:1, sizeType:['original'], sourceType:['camera'], success:function(res){ var path=res.tempFilePaths[0]; _this.setData({ tempFilePaths: path }) wx.uploadFile({ url: 'https://xxxx', //仅为示例,非真实的接口地址 filePath: path, name: 'file', success: function (res) { var data = res.data console.log(data.state); }, fail:function(e){ console.log(e); } }) } }) } |

我这边试的可以。请到weixin.qq.com更新到最新版(6.5.19)微信试试