添加补卡 未完成
This commit is contained in:
@@ -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