调用chooseImage拍出来的照片无法在本地显示
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); } }) } }) } |