| | |
| | | |
| | | startSign() { |
| | | var that = this |
| | | |
| | | wx.navigateTo({ |
| | | url: '/pages/promisesign/promisesign', |
| | | events: { |
| | |
| | | } |
| | | }, |
| | | }) |
| | | |
| | | // wx.getStorage({ |
| | | // key: 'signPath', |
| | | // success: (result) => { |
| | | // console.log(result.data); |
| | | // that.signOver(result.data) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // wx.navigateTo({ |
| | | // url: '/pages/promisesign/promisesign', |
| | | // events: { |
| | | // onSignSuccess: function (imgPath) { |
| | | // console.log('signover:' + imgPath); |
| | | // that.signOver(imgPath) |
| | | // } |
| | | // }, |
| | | // }) |
| | | // }, |
| | | // complete: (res) => {}, |
| | | // }) |
| | | }, |
| | | |
| | | signOver(imgPath) { |
| | |
| | | fail: (res) => {}, |
| | | complete: (res) => {}, |
| | | }) |
| | | setTimeout(() => { |
| | | wx.hideLoading() |
| | | }, 20000); |
| | | // setTimeout(() => { |
| | | // wx.hideLoading() |
| | | // }, 20000); |
| | | |
| | | let signPic = this.data.imgFiles[0] |
| | | |
| | | promiseservice.createCommitment(app.globalData.accessToken.userId, this.commitmentVo, signPic, { |
| | | success(data) { |
| | | if (data.data.success) { |
| | | if (data.success) { |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseresult/promiseresult', |
| | | success: function (res) { |
| | | console.log(res); |
| | | // 通过 eventChannel 向被打开页面传送数据 |
| | | res.eventChannel.emit('acceptDataFromOpenerPage', { |
| | | promise: { |
| | |
| | | complete(res) { |
| | | console.log(res); |
| | | wx.hideLoading({ |
| | | success: (res) => { |
| | | wx.showToast({ |
| | | title: '生成完成', |
| | | duration: 1500, |
| | | icon: 'success', |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | }) |