Compare commits
1 Commits
xie_xuewei
...
xie1023
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d41853aed7 |
@@ -1,5 +1,5 @@
|
||||
<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>
|
||||
<!-- 仿钉钉打卡日历组件 -->
|
||||
<view class=""
|
||||
@@ -254,7 +254,7 @@
|
||||
|
||||
</view>
|
||||
</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"
|
||||
@click="addTextShow = true">说点什么</button>
|
||||
</view>
|
||||
@@ -450,7 +450,11 @@
|
||||
// 获取书籍信息
|
||||
getBookInfo() {
|
||||
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 => {
|
||||
if (res.code == 0) {
|
||||
console.log(res, 'res')
|
||||
@@ -674,17 +678,30 @@
|
||||
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) {
|
||||
console.log('正在补卡', this.taskInfo, day)
|
||||
// return false
|
||||
// if (!this.taskInfo.id) {
|
||||
// uni.showToast({
|
||||
// title: '当天未发布打卡任务,不可补卡哦',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
if(!this.bookInfo.isBuy){
|
||||
this.gotoBuy()
|
||||
return
|
||||
}
|
||||
let param = {
|
||||
'bookId': this.bookid,
|
||||
'userId': this.userInfo.id,
|
||||
@@ -713,6 +730,10 @@
|
||||
},
|
||||
// 快捷签到
|
||||
kuickSign() {
|
||||
if(!this.bookInfo.isBuy){
|
||||
this.gotoBuy()
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.taskInfo.id) {
|
||||
uni.showToast({
|
||||
@@ -800,7 +821,7 @@
|
||||
});
|
||||
},
|
||||
// 说点什么
|
||||
goToSign() {
|
||||
goToSign() {
|
||||
// images数据处理
|
||||
if (this.formData.images.length > 0) {
|
||||
var imgs = []
|
||||
|
||||
Reference in New Issue
Block a user