苹果审核,bug恢复
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view :class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy ? 'pb100':'']">
|
||||
<view
|
||||
:class="['container', currentDay == linshiDay && taskInfo.id && myword.length == 0 && (bookInfo.isBuy||bookInfo.booktype!=0) ? 'pb100':'']">
|
||||
<z-nav-bar title="读书打卡"></z-nav-bar>
|
||||
<!-- 仿钉钉打卡日历组件 -->
|
||||
<view class=""
|
||||
@@ -17,7 +18,7 @@
|
||||
<text>返回今天</text>
|
||||
</view>
|
||||
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
|
||||
<view class="dakaBtn" @tap="buSign(linshiDay)" v-if="currentDay > linshiDay">
|
||||
<view class="dakaBtn" @tap="buSign(linshiDay)" v-if="currentDay > linshiDay&&(currentDay-linshiDay)<=7">
|
||||
<text style="font-size: 24rpx;">补卡</text>
|
||||
</view>
|
||||
<view class="dakaBtn" @tap="kuickSign()"
|
||||
@@ -254,7 +255,8 @@
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="leaveBtn" v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && bookInfo.isBuy">
|
||||
<view class="leaveBtn"
|
||||
v-if="!addTextShow && currentDay == linshiDay && taskInfo.id && myword.length == 0 && (bookInfo.isBuy||bookInfo.booktype!=0)">
|
||||
<button style="height: 70rpx; font-size: 28rpx; line-height: 70rpx;" type="primary" plain="true"
|
||||
@click="addTextShow = true">说点什么</button>
|
||||
</view>
|
||||
@@ -281,7 +283,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isAndorid:true,
|
||||
isAndorid: true,
|
||||
opPinglun: {}, // 针对的评论对象
|
||||
pinglunShow: false,
|
||||
placeholder: '开始输入...',
|
||||
@@ -352,7 +354,7 @@
|
||||
onLoad(e) {
|
||||
this.bookid = e.bookid
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
this.getOS()
|
||||
this.getOS()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log('下拉刷新了')
|
||||
@@ -376,21 +378,22 @@
|
||||
},
|
||||
methods: {
|
||||
// 获得操作系统
|
||||
getOS(){
|
||||
let oprateOs = ''
|
||||
getOS() {
|
||||
let oprateOs = ''
|
||||
oprateOs = uni.getSystemInfoSync().platform
|
||||
// console.log(oprateOs)
|
||||
if(oprateOs == 'android'){
|
||||
if (oprateOs == 'android') {
|
||||
this.isAndorid = true
|
||||
}else{
|
||||
} else {
|
||||
this.isAndorid = false
|
||||
}
|
||||
},
|
||||
haveSelected(data){
|
||||
haveSelected(data) {
|
||||
let image = ''
|
||||
this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image = 'static/fengziIcon.jpg'
|
||||
console.log(data,' 选择的是')
|
||||
if(data.index == 0){
|
||||
this.taskInfo.image && this.taskInfo.image != '' ? image = this.taskInfo.image : image =
|
||||
'static/fengziIcon.jpg'
|
||||
console.log(data, ' 选择的是')
|
||||
if (data.index == 0) {
|
||||
// 分享到好友
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
@@ -400,14 +403,14 @@
|
||||
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
|
||||
summary: `${this.taskInfo.content}`,
|
||||
imageUrl: image,
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
fail: function (err) {
|
||||
fail: function(err) {
|
||||
console.log("fail:" + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
}else if(data.index == 1){
|
||||
} else if (data.index == 1) {
|
||||
// 分享到朋友圈
|
||||
uni.share({
|
||||
provider: "weixin",
|
||||
@@ -417,19 +420,19 @@
|
||||
title: `我正在参与疯子读书读书打卡:${this.taskInfo.title}`,
|
||||
summary: `${this.taskInfo.content}`,
|
||||
imageUrl: image,
|
||||
success: function (res) {
|
||||
success: function(res) {
|
||||
console.log("success:" + JSON.stringify(res));
|
||||
},
|
||||
fail: function (err) {
|
||||
fail: function(err) {
|
||||
console.log("fail:" + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 新写分享
|
||||
newOnShare(){
|
||||
newOnShare() {
|
||||
this.$refs.share.open()
|
||||
},
|
||||
},
|
||||
showPingLun(item) {
|
||||
// 回复评论
|
||||
this.opPinglun = item
|
||||
@@ -678,29 +681,31 @@
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
gotoBuy(){
|
||||
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
|
||||
});
|
||||
}
|
||||
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)
|
||||
if(!this.bookInfo.isBuy){
|
||||
this.gotoBuy()
|
||||
return
|
||||
if (this.bookInfo.bookType == 0) {
|
||||
if (!this.bookInfo.isBuy) {
|
||||
this.gotoBuy()
|
||||
return
|
||||
}
|
||||
}
|
||||
let param = {
|
||||
'bookId': this.bookid,
|
||||
@@ -724,16 +729,24 @@
|
||||
// this.getAllSign(this.taskInfo)
|
||||
}, 2000)
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: res.msg
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
// 快捷签到
|
||||
kuickSign() {
|
||||
if(!this.bookInfo.isBuy){
|
||||
this.gotoBuy()
|
||||
return
|
||||
if (this.bookInfo.bookType == 0) {
|
||||
if (!this.bookInfo.isBuy) {
|
||||
this.gotoBuy()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.taskInfo != null && !this.taskInfo.id) {
|
||||
uni.showToast({
|
||||
@@ -821,7 +834,7 @@
|
||||
});
|
||||
},
|
||||
// 说点什么
|
||||
goToSign() {
|
||||
goToSign() {
|
||||
// images数据处理
|
||||
if (this.formData.images.length > 0) {
|
||||
var imgs = []
|
||||
@@ -1004,9 +1017,18 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.share{font-size: 28rpx; float: right; padding-bottom:20rpx ;
|
||||
.per_mes_img{width: 40rpx; height: 40rpx; margin-left: 10rpx;}
|
||||
.share {
|
||||
font-size: 28rpx;
|
||||
float: right;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.per_mes_img {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pingjiaBox {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user