tianyi 4 weeks ago
parent
commit
57477bc85f
  1. 23
      package1/group/shopEvaluate.vue

23
package1/group/shopEvaluate.vue

@ -34,7 +34,8 @@
</view>
</view>
</view>
<view class="evaluate-list" v-for="(item,index) in shopComments" :key="index">
<scroll-view scroll-y @scrolltolower="onReachPage" style="width:100%;height: 540px;overflow: scroll;">
<view v-for="(item,index) in shopComments" :key="index">
<view class="eval-title">
<view class="eval-icon">
<img :src="item.createByIcon"
@ -53,7 +54,7 @@
<view style="display: flex;height: 50rpx;line-height: 50rpx;font-size: 24rpx;">
商品
<view style="padding: 12rpx 0 0 10rpx;">
<uni-rate v-model="item.score" size="12" />
<uni-rate :disabled="true" disabledColor="rgba(255, 184, 84, 1)" :value="item.score" size="12" />
</view>
</view>
<view class="eval-text">
@ -111,6 +112,8 @@
</view>
</view>
</view>
</scroll-view>
<view style="width: 100%;height: 100rpx;"></view>
</view>
<!-- 查看大图弹出层 -->
@ -133,7 +136,6 @@
isPintuan: true,
bigImg: '',
shopItem:{},
pageNum:1,
searchAll:true,
total:0,
shopComments:[],
@ -209,7 +211,7 @@
this.searchForm.shopId = id
that.tui.request("/app/comment/getCommentList", "POST", this.searchForm, false, false).then((res) => {
if (res.code == 200) {
if (that.pageNum == 1) {
if (that.searchForm.pageNum == 1) {
that.shopComments = res.result.records
} else {
that.shopComments = [...that.shopComments, ...res.result.records]
@ -222,6 +224,7 @@
}
}
}
that.total = res.result.pages; // pages =
that.$forceUpdate()
if(this.searchAll){
that.menuList[0].num = res.result.total
@ -233,6 +236,12 @@
uni.hideLoading()
}).catch((res) => {})
},
onReachPage(){
console.log("11111")
if (this.searchForm.pageNum >= this.total) return;
this.searchForm.pageNum++;
this.getshopComments();
},
submit(v){
let that = this;
let data = [{ //
@ -443,7 +452,7 @@
}
.menu-list {
height: 100rpx;
height: 120rpx;
width: 100%;
display: flex;
overflow-y: hidden;
@ -468,10 +477,6 @@
flex: 1;
}
.evaluate-list {
margin-top: 40rpx;
}
.eval-title {
width: 100%;
height: 80rpx;

Loading…
Cancel
Save