This commit is contained in:
@fawn-nine
2023-10-23 13:24:06 +08:00
parent 3d5574df5c
commit 522b236dae

View File

@@ -17,8 +17,8 @@
<text>返回今天</text>
</view>
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
<view class="dakaBtn" @tap="buSign()"
v-if="signList.indexOf(currentDay) == -1 && currentDay > linshiDay">
<view class="dakaBtn" @tap="buSign(linshiDay)"
v-if="currentDay > linshiDay">
<text style="font-size: 24rpx;">补卡</text>
</view>
<view class="dakaBtn" @tap="kuickSign()"
@@ -328,6 +328,10 @@
}]
},
},
recordPageSize:20,
recordPage:1,
secondPage:1,
}
},
onLoad(e) {
@@ -487,6 +491,7 @@
this.$http
// .post('book/clockin/myinfolist?userid=' + this.userInfo.id + '&taskid=' + this.taskInfo.id +
// '&bookid=' + this.bookid)
.get('book/clockInForum/getChatList', data)
.then(res => {
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)
}
});