| | |
| | | */ |
| | | onLoad: function (options) { |
| | | this._initPlanYear() |
| | | this.getCommitment() |
| | | // this.getCommitment() |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow: function () { |
| | | |
| | | console.log("promise: onshow"); |
| | | this.getCommitment() |
| | | }, |
| | | |
| | | /** |
| | |
| | | status: 1, |
| | | deadline: `下次承诺时间:${deadline}` |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | text1: "已开启!请及时完成承诺", |
| | | text3: "去承诺", |
| | | status: 0, |
| | | }) |
| | | this._initPlanYear() |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (status == 0) { |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseinfo/promiseinfo' |
| | | }) |
| | | }) |
| | | } else { |
| | | this.gotoResult(0) |
| | | } |
| | |
| | | this.gotoResult(i) |
| | | }, |
| | | |
| | | gotoResult (i) { |
| | | gotoResult(i) { |
| | | var p = this.data.promise[i] |
| | | wx.navigateTo({ |
| | | url: '/pages/promiseresult/promiseresult', |