|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-06-20 14:55:54
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-30 14:15:35
|
|
|
|
|
* @LastEditTime: 2022-06-30 17:14:24
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -57,17 +57,20 @@ export default {
|
|
|
|
|
commentId : query.commentId
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
onLoad() {
|
|
|
|
|
if(this.orderId){
|
|
|
|
|
this.getOrderCommentDetail();
|
|
|
|
|
}else if(this.commentId){
|
|
|
|
|
this.getCommentDetail()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title : this.isFollow ? '发表追评' : '发表评价'
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
|
|
if(this.list.findIndex(i => i.isEdit) > -1){
|
|
|
|
|
if(this.list.findIndex(i => i.isEdit) > -1 && to.aliasPath != '/goodsCommentPreview'){
|
|
|
|
|
uni.showModal({
|
|
|
|
|
content : '你正在进行商品评价,退出后评价的内容将不保存!',
|
|
|
|
|
cancelColor : '#999',
|
|
|
|
@ -78,7 +81,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
next();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getOrderCommentDetail() {
|
|
|
|
@ -113,7 +119,6 @@ export default {
|
|
|
|
|
return type;
|
|
|
|
|
},
|
|
|
|
|
submitComment(result, idx){
|
|
|
|
|
|
|
|
|
|
this.$set(this.list, idx, {...this.list[idx],...result});
|
|
|
|
|
if(this.list.findIndex(i => !i.id) > 0){
|
|
|
|
|
uni.$u.toast('评论成功~');
|
|
|
|
|