takePhoto() { const ctx = wx.createCameraContext() ctx.takePhoto({ quality: 'high', success: (res) => { this.setData({ src: res.tempImagePath }) wx.uploadFile({ url: "http://lichenlu.top/server/index.php/home/index/login", filePath: this.data.src, name: 'file', success: function (res) { console.log(res.data); wx.showToast({ title: res.data, icon: 'none', duration: 2000 }) } }) } }) }, error(e) { console.log(e.detail) }, chooseImage: function () { var that = this wx.chooseImage({ // // sourceType: sourceType[this.data.sourceTypeIndex], // sizeType: sizeType[this.data.sizeTypeIndex], // count: this.data.count[this.dat