Merge branch 'master-xie'
This commit is contained in:
@@ -259,7 +259,7 @@
|
||||
},
|
||||
methods: {
|
||||
gotoDetail(item){
|
||||
console.log(item,'gotoDetail')
|
||||
// console.log(item,'gotoDetail')
|
||||
uni.navigateTo({
|
||||
url: '../bookShop/commodityDetail?id=' + item.productId
|
||||
});
|
||||
@@ -278,7 +278,9 @@
|
||||
// 获取商品关联商品
|
||||
getLinkPros(id){
|
||||
this.$http
|
||||
.post('book/shopproduct/bookinfolists/'+id)
|
||||
.post('book/shopproduct/getGlProductList',{
|
||||
'productId': id
|
||||
})
|
||||
.then(res => {
|
||||
console.log('关联商品', res)
|
||||
if(res.code == 0){
|
||||
@@ -391,6 +393,18 @@
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
}).catch(e => {
|
||||
console.log(e,'e')
|
||||
uni.hideLoading();
|
||||
if(e.msg == '该商品不存在,看看其他商品吧'){
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},2000)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -440,7 +454,7 @@
|
||||
},
|
||||
// 点击按钮组间
|
||||
buttonClick(e) {
|
||||
console.log(e)
|
||||
// console.log(e)
|
||||
if(e.index == 0){
|
||||
// 点击的是加入购物车
|
||||
this.upoShow = true
|
||||
|
||||
@@ -11,13 +11,16 @@
|
||||
<view class="fanhuiDay" @tap="backTo()" v-if="showBack">
|
||||
<text>返回今天</text>
|
||||
</view>
|
||||
<!-- <u-icon name="checkbox-mark" color="#55aa7f" size="14" style="display: inline;"></u-icon> -->
|
||||
<view class="dakaBtn" @tap="kuickSign()" v-if="signList.indexOf(currentDay) == -1">
|
||||
<!-- <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">
|
||||
<text style="font-size: 24rpx;">补卡</text>
|
||||
</view>
|
||||
<view class="dakaBtn" @tap="kuickSign()" v-if="signList.indexOf(currentDay) == -1 && currentDay == linshiDay">
|
||||
<text style="font-size: 24rpx;">签到</text>
|
||||
</view>
|
||||
<view v-else class="dakaBtn" style="border-color: #fff;">
|
||||
</view>
|
||||
<!-- <view v-else class="dakaBtn" style="border-color: #fff;">
|
||||
<text style=" color:#a3a3a3;">今天已签到</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<swiper class="swiper scroll-view_H" @animationfinish="animationfinish" @change="swiperChange" :current='currentIndex' :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
|
||||
@@ -30,7 +33,7 @@
|
||||
linshiDay == item1 ? 'linshiDay':'']" @click="getInfo(item1)">
|
||||
<span class="day">第<em>{{item1}}</em> 天</span>
|
||||
<u-icon v-if="signList.indexOf(item1) != -1" name="checkbox-mark" color="#fff" size="28" style="margin: 0 auto; width: 28px; text-align: center;"></u-icon>
|
||||
<span v-if="signList.indexOf(item1) == -1 && currentDay > item1" class="buka">未签</span>
|
||||
<span v-if="signList.indexOf(item1) == -1 && currentDay > item1" class="buka" >未签</span>
|
||||
<span v-if="currentDay < item1" class="weidaka">未开始</span>
|
||||
<span v-if="currentDay == item1 && signList.indexOf(item1) == -1" class="daka" @click="kuickSign()">签到</span>
|
||||
</view>
|
||||
@@ -357,8 +360,7 @@
|
||||
title:'未来日期不可签到',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
this.linshiDay = index
|
||||
}else{
|
||||
this.getTask(index)
|
||||
}
|
||||
},
|
||||
@@ -409,6 +411,7 @@
|
||||
'days': index
|
||||
}
|
||||
console.log(data)
|
||||
this.linshiDay = index
|
||||
this.$http
|
||||
.post('book/task/applist', data)
|
||||
.then(res => {
|
||||
@@ -430,10 +433,47 @@
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
// 补卡
|
||||
buSign(day){
|
||||
console.log('正在补卡',this.taskInfo)
|
||||
if(!this.taskInfo.id){
|
||||
uni.showToast({
|
||||
title:'当天未发布打卡任务',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
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 => {
|
||||
if (res.code == 0) {
|
||||
//console.log(res, '快捷签到')
|
||||
uni.showToast({
|
||||
title:'签到成功'
|
||||
})
|
||||
this.addTextShow = false
|
||||
this.formData.content = ''
|
||||
this.formData.images = []
|
||||
this.getmySign()
|
||||
this.getAllSign(this.taskInfo)
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
// 快捷签到
|
||||
kuickSign(){
|
||||
console.log()
|
||||
kuickSign(){
|
||||
let data = {
|
||||
"bookId": this.bookid,
|
||||
"userId": this.userInfo.id,
|
||||
@@ -706,11 +746,12 @@
|
||||
|
||||
.buka {
|
||||
font-size: 24rpx;
|
||||
display: inline-block; padding: 0 6rpx;
|
||||
display: inline-block; padding: 0 12rpx;
|
||||
color: #888;
|
||||
// border: 1px solid #888;
|
||||
|
||||
margin: 10px 0;
|
||||
border-radius: 15rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 0; ;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,13 @@
|
||||
</view>
|
||||
<view class="quesheng" v-else>
|
||||
<text>暂无评论内容~</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="status==0" style="text-align: center;">
|
||||
<u-loading-icon style="display: inline-block;"></u-loading-icon>
|
||||
<font style='vertical-align: super;margin-left: 10px;font-size: 26rpx;color: #909399;'>努力加载中</font>
|
||||
</view>
|
||||
<u-divider v-if="status == 1" text="已加载全部评论"></u-divider>
|
||||
<!-- 评价对话框 -->
|
||||
<u-popup :show="pingjiaShow" :round="10" @close="closePingjia">
|
||||
<view class="tanchu">
|
||||
@@ -102,6 +106,7 @@
|
||||
bookid:null,
|
||||
bfa_id:null, //书评id
|
||||
productInfo:{},
|
||||
status:3,
|
||||
pingjiaShow:false, //添加评价
|
||||
Pform:{ // 评价表单
|
||||
//star:0,
|
||||
@@ -112,6 +117,8 @@
|
||||
emoji:[],
|
||||
Files:[],
|
||||
commentInfo:{},
|
||||
pPage:1,
|
||||
pTotal:0, // 评论的总条数
|
||||
pinglunId:null,
|
||||
plList:[], // 书评的评论list
|
||||
}
|
||||
@@ -120,11 +127,23 @@
|
||||
this.windowWidth = uni.getSystemInfoSync().windowWidth;
|
||||
console.log(e,'onload')
|
||||
this.bookid = e.bookid
|
||||
this.bfa_id = e.bfa_id
|
||||
this.getProDetail(e)
|
||||
this.bfa_id = e.bfa_id
|
||||
},
|
||||
onShow() {
|
||||
this.getProDetail()
|
||||
this.getbookComInfo()
|
||||
this.getCommPL()
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('到底了')
|
||||
if(this.pPage+1 <= this.pTotal){
|
||||
this.status = 0
|
||||
this.pPage++
|
||||
this.getCommPL()
|
||||
}else{
|
||||
this.status = 3
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
@@ -134,27 +153,24 @@
|
||||
let data = {
|
||||
'bfa_id':this.bfa_id,
|
||||
'limit': 5,
|
||||
'page': 1,
|
||||
'page': this.pPage,
|
||||
}
|
||||
console.log(data,'data')
|
||||
console.log(data,'data')
|
||||
this.$http
|
||||
.post('forum/comment/list', data)
|
||||
.then(res => {
|
||||
if(res.code == 0){
|
||||
console.log(res,'书评评论')
|
||||
this.plList = res.page.list
|
||||
|
||||
console.log(res,'书评评论')
|
||||
this.plList = this.plList.concat(res.page.list)
|
||||
this.pTotal = res.page.totalPage
|
||||
this.status = 3
|
||||
// 评论格式化
|
||||
var newarr = []
|
||||
this.plList.forEach((item1)=>{
|
||||
var pjstr = ''
|
||||
//var zpstr = ''
|
||||
pjstr = this.getHtmlComment(item1.content)
|
||||
//item1.followUpcontent == '' ? zpstr = '' : zpstr = this.getHtmlComment(item1.followUpcontent)
|
||||
//console.log(pjstr,'99999999999----------')
|
||||
var pjstr = ''
|
||||
pjstr = this.getHtmlComment(item1.content)
|
||||
item1.phtml = pjstr
|
||||
console.log(pjstr)
|
||||
// item1.zphtml = zpstr
|
||||
// console.log(pjstr)
|
||||
newarr.push(item1)
|
||||
|
||||
})
|
||||
@@ -178,7 +194,7 @@
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
getProDetail(e){
|
||||
getProDetail(){
|
||||
// 获取商品详情
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
|
||||
Reference in New Issue
Block a user