| signIn() { | signIn() { | ||||
| app.wxRequest(app.globalData.urlRoot +"task/signToday",{},res=>{ | app.wxRequest(app.globalData.urlRoot +"task/signToday",{},res=>{ | ||||
| if (res.code == 200) { | if (res.code == 200) { | ||||
| this.getShareId(); | |||||
| if (!this.data.shareId) { | if (!this.data.shareId) { | ||||
| this.setData({ | this.setData({ | ||||
| maskShow: false | maskShow: false | ||||
| }, | }, | ||||
| getSignInfo: function () {//查看当日是否签到 | getSignInfo: function () {//查看当日是否签到 | ||||
| app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | app.wxRequest(app.globalData.urlRoot + "task/getSignInfo", {}, res => { | ||||
| this.getShareId(); | |||||
| if(res.code==200){ | if(res.code==200){ | ||||
| if (res.data.state==0) {//未签到 | if (res.data.state==0) {//未签到 | ||||
| this.setData({ | this.setData({ | ||||
| taskShow: true, | taskShow: true, | ||||
| isSign: true | isSign: true | ||||
| }) | }) | ||||
| }else{ | |||||
| this.getShareId(); | |||||
| } | } | ||||
| } | } | ||||
| },this) | },this) |