diff --git a/src/components/BsCommentSubmit.vue b/src/components/BsCommentSubmit.vue
index 7d24e6f..de2aa29 100644
--- a/src/components/BsCommentSubmit.vue
+++ b/src/components/BsCommentSubmit.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-20 16:36:14
* @LastEditors: ch
- * @LastEditTime: 2022-06-29 19:58:37
+ * @LastEditTime: 2022-06-30 17:20:40
* @Description: file content
-->
@@ -19,7 +19,9 @@
:fileList="fileList" :maxCount="6" :previewFullImage="true">
@@ -84,7 +86,12 @@ export default {
}
const {error, result} = await ApiPostComment(data);
if(!HandleApiError(error)){
- this.$emit('submit',result);
+ this.commentContent = '';
+ this.fileList = [];
+ this.$nextTick(()=>{
+ this.$emit('submit',{});
+ })
+
}
},
async handleUpdateImg(val){
diff --git a/src/pages/order/comment/index/index.vue b/src/pages/order/comment/index/index.vue
index 2a25d9b..5462e62 100644
--- a/src/pages/order/comment/index/index.vue
+++ b/src/pages/order/comment/index/index.vue
@@ -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
-->
@@ -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('评论成功~');
diff --git a/src/pages/order/comment/success.vue b/src/pages/order/comment/success.vue
index 41bcbba..1119ef1 100644
--- a/src/pages/order/comment/success.vue
+++ b/src/pages/order/comment/success.vue
@@ -2,17 +2,20 @@
* @Author: ch
* @Date: 2022-06-21 15:32:28
* @LastEditors: ch
- * @LastEditTime: 2022-06-28 16:12:43
+ * @LastEditTime: 2022-06-30 17:23:32
* @Description: file content
-->
-
- 评价成功
-
- 返回
+
+
+ 评价成功
+
+ 返回
+
+
这些宝贝还在等你的评价哦~
@@ -63,30 +66,40 @@ export default {
}
}
+