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> <text>返回今天</text>
</view> </view>
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> --> <!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
<view class="dakaBtn" @tap="buSign()" <view class="dakaBtn" @tap="buSign(linshiDay)"
v-if="signList.indexOf(currentDay) == -1 && currentDay > linshiDay"> v-if="currentDay > linshiDay">
<text style="font-size: 24rpx;">补卡</text> <text style="font-size: 24rpx;">补卡</text>
</view> </view>
<view class="dakaBtn" @tap="kuickSign()" <view class="dakaBtn" @tap="kuickSign()"
@@ -328,6 +328,10 @@
}] }]
}, },
}, },
recordPageSize:20,
recordPage:1,
secondPage:1,
} }
}, },
onLoad(e) { onLoad(e) {
@@ -487,6 +491,7 @@
this.$http this.$http
// .post('book/clockin/myinfolist?userid=' + this.userInfo.id + '&taskid=' + this.taskInfo.id + // .post('book/clockin/myinfolist?userid=' + this.userInfo.id + '&taskid=' + this.taskInfo.id +
// '&bookid=' + this.bookid) // '&bookid=' + this.bookid)
.get('book/clockInForum/getChatList', data) .get('book/clockInForum/getChatList', data)
.then(res => { .then(res => {
console.log(res, '当天我的打卡内容') console.log(res, '当天我的打卡内容')
@@ -525,16 +530,16 @@
// 获取某天的签到列表信息 // 获取某天的签到列表信息
getAllSign(val) { getAllSign(val) {
console.log(val, '-----------') console.log(val, '-----------')
let data = { let param = {
'entryId': val.id 'entryId': val.id,
// 'bookid': this.bookid, // 'userId': null,
// 'limit': 5, 'currentPage': this.recordPage,
// 'page': this.page, 'pageSize': this.recordPageSize,
// 'taskid': val.id // 'taskid': val.id
} }
this.$http this.$http
// .post('book/clockin/applist', data) .get('book/clockInForum/getChatList', param)
.get('book/clockInForum/getChatList', data) // .get('book/clockInForum/getChatList', data)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res, '所有人打卡信息') console.log(res, '所有人打卡信息')
@@ -599,40 +604,37 @@
}, },
// 补卡 // 补卡
buSign(day) { buSign(day) {
console.log('正在补卡', this.taskInfo) console.log('正在补卡', this.taskInfo,day)
return false // return false
if (!this.taskInfo.id) { // if (!this.taskInfo.id) {
uni.showToast({ // uni.showToast({
title: '当天未发布打卡任务,不可补卡哦', // title: '当天未发布打卡任务,不可补卡哦',
icon: 'none' // icon: 'none'
}) // })
return // return
// }
let param = {
'bookId': this.bookid,
'userId':this.userInfo.id,
'day':day
} }
let data = { console.log(param, 'param')
"bookId": this.bookid, this.$http
"userId": this.userInfo.id, .get('/book/userClockIn/correctClockIn', param)
"tid": this.taskInfo.id, .then(res => {
"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 => {
if (res.code == 0) { if (res.code == 0) {
//console.log(res, '快捷签到') //console.log(res, '快捷签到')
uni.showToast({ uni.showToast({
title: '签到成功' title: '补卡成功'
}) })
this.addTextShow = false setTimeout(()=>{
this.formData.content = '' this.addTextShow = false
this.formData.images = [] this.formData.content = ''
this.getmySign() this.formData.images = []
this.getAllSign(this.taskInfo) this.getmySign()
// this.getAllSign(this.taskInfo)
},2000)
} }
}); });