|
|
@ -62,21 +62,21 @@ |
|
|
<view class="eval-img" v-if="item.picture"> |
|
|
<view class="eval-img" v-if="item.picture"> |
|
|
<img @tap="largeImg" :src="item.picture" alt=""> |
|
|
<img @tap="largeImg" :src="item.picture" alt=""> |
|
|
</view> |
|
|
</view> |
|
|
<view class="reply-card" :class="{'expanded': isExpanded}" v-for="(item1,index1) in item.comments" :key="index1"> |
|
|
<view class="reply-card" v-for="(item1,index1) in item.comments" :key="index1" :class="{'expanded': item1.isOpen}"> |
|
|
<!-- 标题行:商家回复 + 展开/收起按钮 --> |
|
|
<!-- 标题行:商家回复 + 展开/收起按钮 --> |
|
|
<view class="reply-header"> |
|
|
<view class="reply-header"> |
|
|
<!-- 回复内容区域(动态类控制展开/折叠) --> |
|
|
<!-- 回复内容区域(动态类控制展开/折叠) --> |
|
|
<view class="reply-content" :class="{ collapsed: !isExpanded, expanded: isExpanded }"> |
|
|
<view class="reply-content" :class="{ collapsed: !item1.isOpen, expanded: item1.isOpen }"> |
|
|
<text>{{item1.createByName}} : {{ item1.remark }}</text> |
|
|
<text>{{item1.createByName}} : {{ item1.remark }}</text> |
|
|
<img :src="item1.picture" alt="" class="upload-img" style="margin-top: 10px;border-radius: 10px;"> |
|
|
<img :src="item1.picture" v-if="item1.picture" alt="" class="upload-img" style="margin-top: 10px;border-radius: 10px;"> |
|
|
</view> |
|
|
</view> |
|
|
<view class="reply-expand-btn" @click="toggleReply"> |
|
|
<view class="reply-expand-btn" @click="toggleReply(index,index1)"> |
|
|
<text v-if="!isExpanded">展开</text> |
|
|
<text v-if="!item1.isOpen">展开</text> |
|
|
<text v-else>收起</text> |
|
|
<text v-else>收起</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="" v-if="isMerchant == 1"> |
|
|
<view class="" v-if="(isMerchant == 1 || isMerchant == 2)"> |
|
|
<view @tap="changeStatus(index)" class="reply-card" v-if="!item.isReply" style="text-align: right;padding-right: 10px;color: #00BFFF;"> |
|
|
<view @tap="changeStatus(index)" class="reply-card" v-if="!item.isReply" style="text-align: right;padding-right: 10px;color: #00BFFF;"> |
|
|
回复 |
|
|
回复 |
|
|
</view> |
|
|
</view> |
|
|
@ -111,6 +111,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view style="width: 100%;height: 100rpx;"></view> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 查看大图弹出层 --> |
|
|
<!-- 查看大图弹出层 --> |
|
|
<uni-popup ref="imgPopup" background-color="#fff"> |
|
|
<uni-popup ref="imgPopup" background-color="#fff"> |
|
|
@ -128,7 +129,6 @@ |
|
|
replyText:'', |
|
|
replyText:'', |
|
|
isMerchant:0, |
|
|
isMerchant:0, |
|
|
replyPicture:"", |
|
|
replyPicture:"", |
|
|
isExpanded: false, |
|
|
|
|
|
menuButtonInfo: {}, |
|
|
menuButtonInfo: {}, |
|
|
isPintuan: true, |
|
|
isPintuan: true, |
|
|
bigImg: '', |
|
|
bigImg: '', |
|
|
@ -216,6 +216,11 @@ |
|
|
} |
|
|
} |
|
|
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.$forceUpdate() |
|
|
that.$forceUpdate() |
|
|
if(this.searchAll){ |
|
|
if(this.searchAll){ |
|
|
@ -236,7 +241,7 @@ |
|
|
remark:this.replyText, |
|
|
remark:this.replyText, |
|
|
picture:this.replyPicture, |
|
|
picture:this.replyPicture, |
|
|
createBy:this.shopComments[v].shopId, |
|
|
createBy:this.shopComments[v].shopId, |
|
|
createByName:'商家', |
|
|
createByName:this.isMerchant == 1?'商家':'配送员', |
|
|
createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png', |
|
|
createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png', |
|
|
orderId:this.shopComments[v].orderId, |
|
|
orderId:this.shopComments[v].orderId, |
|
|
shopId:this.shopComments[v].shopId, |
|
|
shopId:this.shopComments[v].shopId, |
|
|
@ -257,8 +262,11 @@ |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
}).catch((res) => {}); |
|
|
}).catch((res) => {}); |
|
|
}, |
|
|
}, |
|
|
toggleReply() { |
|
|
toggleReply(i,m) { |
|
|
this.isExpanded = !this.isExpanded; |
|
|
|
|
|
|
|
|
this.shopComments[i].comments[m].isOpen = !this.shopComments[i].comments[m].isOpen; |
|
|
|
|
|
console.log("11111",this.shopComments) |
|
|
|
|
|
this.$forceUpdate() |
|
|
}, |
|
|
}, |
|
|
changeStatus(v){ |
|
|
changeStatus(v){ |
|
|
this.shopComments[v].isReply = !this.shopComments[v].isReply |
|
|
this.shopComments[v].isReply = !this.shopComments[v].isReply |
|
|
|