|
|
@ -34,83 +34,87 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</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: 600px;overflow: scroll;"> |
|
|
<view class="eval-title"> |
|
|
<view v-for="(item,index) in shopComments" :key="index"> |
|
|
<view class="eval-icon"> |
|
|
<view class="eval-title"> |
|
|
<img :src="item.createByIcon" |
|
|
<view class="eval-icon"> |
|
|
alt="" /> |
|
|
<img :src="item.createByIcon" |
|
|
</view> |
|
|
alt="" /> |
|
|
<view class="eval-name"> |
|
|
|
|
|
<view class="name1"> |
|
|
|
|
|
{{item.createByName}} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="eval-time"> |
|
|
|
|
|
{{item.createTime | formatTime}} |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="eval-content"> |
|
|
|
|
|
<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" /> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="eval-name"> |
|
|
<view class="eval-text"> |
|
|
<view class="name1"> |
|
|
{{item.remark}} |
|
|
{{item.createByName}} |
|
|
</view> |
|
|
|
|
|
<view class="eval-img" v-if="item.picture"> |
|
|
|
|
|
<img @tap="largeImg" :src="item.picture" alt=""> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="reply-card" :class="{'expanded': isExpanded}" v-for="(item1,index1) in item.comments" :key="index1"> |
|
|
|
|
|
<!-- 标题行:商家回复 + 展开/收起按钮 --> |
|
|
|
|
|
<view class="reply-header"> |
|
|
|
|
|
<!-- 回复内容区域(动态类控制展开/折叠) --> |
|
|
|
|
|
<view class="reply-content" :class="{ collapsed: !isExpanded, expanded: isExpanded }"> |
|
|
|
|
|
<text>{{item1.createByName}} : {{ item1.remark }}</text> |
|
|
|
|
|
<img :src="item1.picture" alt="" class="upload-img" style="margin-top: 10px;border-radius: 10px;"> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<view class="reply-expand-btn" @click="toggleReply"> |
|
|
<view class="eval-time"> |
|
|
<text v-if="!isExpanded">展开</text> |
|
|
{{item.createTime | formatTime}} |
|
|
<text v-else>收起</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-if="isMerchant == 1"> |
|
|
<view class="eval-content"> |
|
|
<view @tap="changeStatus(index)" class="reply-card" v-if="!item.isReply" style="text-align: right;padding-right: 10px;color: #00BFFF;"> |
|
|
<view style="display: flex;height: 50rpx;line-height: 50rpx;font-size: 24rpx;"> |
|
|
回复 |
|
|
商品 |
|
|
|
|
|
<view style="padding: 12rpx 0 0 10rpx;"> |
|
|
|
|
|
<uni-rate :disabled="true" disabledColor="rgba(255, 184, 84, 1)" :value="item.score" size="12" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="eval-text"> |
|
|
|
|
|
{{item.remark}} |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="eval-img" v-if="item.picture"> |
|
|
|
|
|
<img @tap="largeImg" :src="item.picture" alt=""> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-else> |
|
|
<view class="reply-card" :class="{'expanded': isExpanded}" v-for="(item1,index1) in item.comments" :key="index1"> |
|
|
<view class="" style="background: #f5f5f5;border-radius: 10px;border: 1px solid #777;margin-top: 10px;"> |
|
|
<!-- 标题行:商家回复 + 展开/收起按钮 --> |
|
|
<view class="eval-num" style="border: none;"> |
|
|
<view class="reply-header"> |
|
|
<textarea name="" v-model="replyText" id="" cols="30" rows="10" placeholder="有什么想说的吗?可以写下来,提交给我们" style="width: 100%;font-size: 28rpx;padding: 30rpx;height: 200rpx;"></textarea> |
|
|
<!-- 回复内容区域(动态类控制展开/折叠) --> |
|
|
|
|
|
<view class="reply-content" :class="{ collapsed: !isExpanded, expanded: isExpanded }"> |
|
|
|
|
|
<text>{{item1.createByName}} : {{ item1.remark }}</text> |
|
|
|
|
|
<img :src="item1.picture" alt="" class="upload-img" style="margin-top: 10px;border-radius: 10px;"> |
|
|
</view> |
|
|
</view> |
|
|
<view class="eval-num" style="border: none;padding: 0 30rpx;display: flex;margin-bottom: 10px;"> |
|
|
<view class="reply-expand-btn" @click="toggleReply"> |
|
|
<view class="upload-img" @tap="pictureAdd()" |
|
|
<text v-if="!isExpanded">展开</text> |
|
|
style="background: #eee;text-align: center;line-height: 160rpx;"> |
|
|
<text v-else>收起</text> |
|
|
<uni-icons type="camera" size="28" color="#777"></uni-icons> |
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" v-if="isMerchant == 1"> |
|
|
|
|
|
<view @tap="changeStatus(index)" class="reply-card" v-if="!item.isReply" style="text-align: right;padding-right: 10px;color: #00BFFF;"> |
|
|
|
|
|
回复 |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" v-else> |
|
|
|
|
|
<view class="" style="background: #f5f5f5;border-radius: 10px;border: 1px solid #777;margin-top: 10px;"> |
|
|
|
|
|
<view class="eval-num" style="border: none;"> |
|
|
|
|
|
<textarea name="" v-model="replyText" id="" cols="30" rows="10" placeholder="有什么想说的吗?可以写下来,提交给我们" style="width: 100%;font-size: 28rpx;padding: 30rpx;height: 200rpx;"></textarea> |
|
|
</view> |
|
|
</view> |
|
|
<view style="flex: 1;display: flex;"> |
|
|
<view class="eval-num" style="border: none;padding: 0 30rpx;display: flex;margin-bottom: 10px;"> |
|
|
<view v-if="replyPicture !=''" |
|
|
<view class="upload-img" @tap="pictureAdd()" |
|
|
:key="index" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;"> |
|
|
style="background: #eee;text-align: center;line-height: 160rpx;"> |
|
|
<img :src="replyPicture" alt="" class="upload-img"> |
|
|
<uni-icons type="camera" size="28" color="#777"></uni-icons> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view style="flex: 1;display: flex;"> |
|
|
|
|
|
<view v-if="replyPicture !=''" |
|
|
|
|
|
:key="index" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;"> |
|
|
|
|
|
<img :src="replyPicture" alt="" class="upload-img"> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<!-- <textarea type="text" v-model="replyText" placeholder="要说什么写下来吧" style="background: #eee;border-radius: 10px;height: 100px;margin: 10px 0;padding: 10px;" /> --> |
|
|
<!-- <textarea type="text" v-model="replyText" placeholder="要说什么写下来吧" style="background: #eee;border-radius: 10px;height: 100px;margin: 10px 0;padding: 10px;" /> --> |
|
|
<view class="" style="display: flex;flex-direction: row-reverse;padding-right: 10px;margin-top: 10px;"> |
|
|
<view class="" style="display: flex;flex-direction: row-reverse;padding-right: 10px;margin-top: 10px;"> |
|
|
<view @tap="submit(index)" class="" style="margin-left: 20px;color: #00BFFF;"> |
|
|
<view @tap="submit(index)" class="" style="margin-left: 20px;color: #00BFFF;"> |
|
|
确认 |
|
|
确认 |
|
|
</view> |
|
|
</view> |
|
|
<view class="" @tap="changeStatus(index)"> |
|
|
<view class="" @tap="changeStatus(index)"> |
|
|
取消 |
|
|
取消 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view style="width: 100%;height: 100rpx;"></view> |
|
|
|
|
|
</scroll-view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<!-- 查看大图弹出层 --> |
|
|
<!-- 查看大图弹出层 --> |
|
|
<uni-popup ref="imgPopup" background-color="#fff"> |
|
|
<uni-popup ref="imgPopup" background-color="#fff"> |
|
|
@ -132,7 +136,6 @@ |
|
|
isPintuan: true, |
|
|
isPintuan: true, |
|
|
bigImg: '', |
|
|
bigImg: '', |
|
|
shopItem:{}, |
|
|
shopItem:{}, |
|
|
pageNum:1, |
|
|
|
|
|
searchAll:true, |
|
|
searchAll:true, |
|
|
total:0, |
|
|
total:0, |
|
|
shopComments:[], |
|
|
shopComments:[], |
|
|
@ -207,27 +210,37 @@ |
|
|
this.searchForm.shopId = id |
|
|
this.searchForm.shopId = id |
|
|
that.NB.sendRequest("/app/comment/getCommentList", this.searchForm, false, 'post', 'application/json').then((res) => { |
|
|
that.NB.sendRequest("/app/comment/getCommentList", this.searchForm, false, 'post', 'application/json').then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
if (that.pageNum == 1) { |
|
|
if (that.searchForm.pageNum == 1) { |
|
|
that.shopComments = res.result.records |
|
|
that.shopComments = res.result.records |
|
|
} else { |
|
|
} else { |
|
|
that.shopComments = [...that.shopComments, ...res.result.records] |
|
|
that.shopComments = [...that.shopComments, ...res.result.records] |
|
|
} |
|
|
} |
|
|
for(let i=0;i<that.shopComments.length;i++){ |
|
|
for(let i=0;i<that.shopComments.length;i++){ |
|
|
that.shopComments[i].isReply=false |
|
|
that.shopComments[i].isReply=false |
|
|
|
|
|
if(that.shopComments[i].comments.length > 0){ |
|
|
|
|
|
for(let m=0;m<that.shopComments[i].comments.length;m++){ |
|
|
|
|
|
that.shopComments[i].comments[m].isOpen = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
that.total = res.result.pages; // pages = 总页数 |
|
|
that.$forceUpdate() |
|
|
that.$forceUpdate() |
|
|
if(this.searchAll){ |
|
|
if(this.searchAll){ |
|
|
that.menuList[0].num = res.result.total |
|
|
that.menuList[0].num = res.result.total |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
uni.showToast({ |
|
|
that.tui.toast(res.message,1000) |
|
|
title: res.message, |
|
|
return |
|
|
icon:'none' |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
} |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
}).catch((res) => {}) |
|
|
}).catch((res) => {}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
onReachPage(){ |
|
|
|
|
|
console.log("11111") |
|
|
|
|
|
if (this.searchForm.pageNum >= this.total) return; |
|
|
|
|
|
this.searchForm.pageNum++; |
|
|
|
|
|
this.getshopComments(this.shopItem.id); |
|
|
|
|
|
}, |
|
|
submit(v){ |
|
|
submit(v){ |
|
|
let that = this; |
|
|
let that = this; |
|
|
let data = [{ //店铺 |
|
|
let data = [{ //店铺 |
|
|
@ -287,6 +300,8 @@ |
|
|
this.searchForm.picture = 0 |
|
|
this.searchForm.picture = 0 |
|
|
this.searchForm.score = 1 |
|
|
this.searchForm.score = 1 |
|
|
} |
|
|
} |
|
|
|
|
|
this.searchForm.pageNum = 1 |
|
|
|
|
|
this.shopComments = [] |
|
|
this.getshopComments(this.shopItem.id) |
|
|
this.getshopComments(this.shopItem.id) |
|
|
}, |
|
|
}, |
|
|
pictureAdd() { |
|
|
pictureAdd() { |
|
|
@ -463,10 +478,6 @@ |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.evaluate-list { |
|
|
|
|
|
margin-top: 40rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.eval-title { |
|
|
.eval-title { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 80rpx; |
|
|
height: 80rpx; |
|
|
|