Merge branch 'xie1023'

This commit is contained in:
@fawn-nine
2023-11-08 13:30:10 +08:00

View File

@@ -1,5 +1,5 @@
<template> <template>
<view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 ? 'pb100':'']"> <view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy ? 'pb100':'']">
<z-nav-bar title="读书打卡"></z-nav-bar> <z-nav-bar title="读书打卡"></z-nav-bar>
<!-- 仿钉钉打卡日历组件 --> <!-- 仿钉钉打卡日历组件 -->
<view class="" <view class=""
@@ -254,7 +254,7 @@
</view> </view>
</u-popup> </u-popup>
<view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0"> <view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy">
<button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true" <button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true"
@click="addTextShow = true">说点什么</button> @click="addTextShow = true">说点什么</button>
</view> </view>
@@ -450,7 +450,11 @@
// 获取书籍信息 // 获取书籍信息
getBookInfo() { getBookInfo() {
this.$http this.$http
.post('book/book/appinfo/' + this.bookid + '/' + this.userInfo.id) // .post('book/book/appinfo/' + this.bookid + '/' + this.userInfo.id)
.post('book/book/getBookInfo', {
'bookId': this.bookid,
'userId': this.userInfo.id
})
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res, 'res') console.log(res, 'res')
@@ -674,17 +678,30 @@
uni.hideLoading() uni.hideLoading()
}) })
}, },
gotoBuy(){
let that = this
uni.showModal({
title: '提示',
content: '购买本书后方可参与打卡',
confirmText:'立即购买',
cancelText:'知道了',
success: function (res) {
if (res.confirm) {
console.log(that.bookInfo,'that.bookInfo');
uni.navigateTo({
url: '../bookShop/commodityDetail?id=' + that.bookInfo.productId
});
}
}
});
},
// 补卡 // 补卡
buSign(day) { buSign(day) {
console.log('正在补卡', this.taskInfo, day) console.log('正在补卡', this.taskInfo, day)
// return false if(!this.bookInfo.isBuy){
// if (!this.taskInfo.id) { this.gotoBuy()
// uni.showToast({ return
// title: '当天未发布打卡任务,不可补卡哦', }
// icon: 'none'
// })
// return
// }
let param = { let param = {
'bookId': this.bookid, 'bookId': this.bookid,
'userId': this.userInfo.id, 'userId': this.userInfo.id,
@@ -713,6 +730,10 @@
}, },
// 快捷签到 // 快捷签到
kuickSign() { kuickSign() {
if(!this.bookInfo.isBuy){
this.gotoBuy()
return
}
if (!this.taskInfo.id) { if (!this.taskInfo.id) {
uni.showToast({ uni.showToast({
@@ -800,7 +821,7 @@
}); });
}, },
// 说点什么 // 说点什么
goToSign() { goToSign() {
// images数据处理 // images数据处理
if (this.formData.images.length > 0) { if (this.formData.images.length > 0) {
var imgs = [] var imgs = []