diff --git a/pages/clock/clock.vue b/pages/clock/clock.vue index 68d53b5..a95bf1c 100644 --- a/pages/clock/clock.vue +++ b/pages/clock/clock.vue @@ -17,8 +17,8 @@ 返回今天 - + 补卡 { console.log(res, '当天我的打卡内容') @@ -525,16 +530,16 @@ // 获取某天的签到列表信息 getAllSign(val) { console.log(val, '-----------') - let data = { - 'entryId': val.id - // 'bookid': this.bookid, - // 'limit': 5, - // 'page': this.page, + let param = { + 'entryId': val.id, + // 'userId': null, + 'currentPage': this.recordPage, + 'pageSize': this.recordPageSize, // 'taskid': val.id - } - this.$http - // .post('book/clockin/applist', data) - .get('book/clockInForum/getChatList', data) + } + this.$http + .get('book/clockInForum/getChatList', param) + // .get('book/clockInForum/getChatList', data) .then(res => { if (res.code == 0) { console.log(res, '所有人打卡信息') @@ -599,40 +604,37 @@ }, // 补卡 buSign(day) { - console.log('正在补卡', this.taskInfo) - return false - if (!this.taskInfo.id) { - uni.showToast({ - title: '当天未发布打卡任务,不可补卡哦', - icon: 'none' - }) - return + console.log('正在补卡', this.taskInfo,day) + // return false + // if (!this.taskInfo.id) { + // uni.showToast({ + // title: '当天未发布打卡任务,不可补卡哦', + // icon: 'none' + // }) + // return + // } + let param = { + 'bookId': this.bookid, + 'userId':this.userInfo.id, + 'day':day } - let data = { - "bookId": this.bookid, - "userId": this.userInfo.id, - "tid": this.taskInfo.id, - "days": this.linshiDay - } - console.log(data, 'data') - $http.request({ - url: 'book/clockinPunch/save', - method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data, - header: { //默认 无 说明:请求头 - 'Content-Type': 'application/json' - }, - }).then(res => { + console.log(param, 'param') + this.$http + .get('/book/userClockIn/correctClockIn', param) + .then(res => { if (res.code == 0) { //console.log(res, '快捷签到') uni.showToast({ - title: '签到成功' + title: '补卡成功' }) - this.addTextShow = false - this.formData.content = '' - this.formData.images = [] - this.getmySign() - this.getAllSign(this.taskInfo) + setTimeout(()=>{ + this.addTextShow = false + this.formData.content = '' + this.formData.images = [] + this.getmySign() + // this.getAllSign(this.taskInfo) + },2000) + } });