fix:修改产品验收问题

feature/comment-0620-ch
ch 2 years ago
parent b198706159
commit e0b48c9ea6

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-06-20 16:36:14 * @Date: 2022-06-20 16:36:14
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-06-29 19:58:37 * @LastEditTime: 2022-06-30 17:20:40
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -19,7 +19,9 @@
:fileList="fileList" :maxCount="6" :previewFullImage="true"> :fileList="fileList" :maxCount="6" :previewFullImage="true">
</u-upload> </u-upload>
<view class="footer"> <view class="footer">
<UiButton type="solid" :disable="isVerify" @click="handleSubmit"></UiButton> <UiButton type="solid" :disable="isVerify" @click="handleSubmit">
{{type === COMMENT.TYPE.COMMENT ? '发表评价' : '发表追评'}}
</UiButton>
</view> </view>
</view> </view>
</template> </template>
@ -84,7 +86,12 @@ export default {
} }
const {error, result} = await ApiPostComment(data); const {error, result} = await ApiPostComment(data);
if(!HandleApiError(error)){ if(!HandleApiError(error)){
this.$emit('submit',result); this.commentContent = '';
this.fileList = [];
this.$nextTick(()=>{
this.$emit('submit',{});
})
} }
}, },
async handleUpdateImg(val){ async handleUpdateImg(val){

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

@ -2,17 +2,20 @@
* @Author: ch * @Author: ch
* @Date: 2022-06-21 15:32:28 * @Date: 2022-06-21 15:32:28
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-06-28 16:12:43 * @LastEditTime: 2022-06-30 17:23:32
* @Description: file content * @Description: file content
--> -->
<template> <template>
<view class="main"> <view class="main">
<view class="ctx">
<image class="icon" src="@/static/order/paySuccess.png"/> <image class="icon" src="@/static/order/paySuccess.png"/>
<view class="title">评价成功</view> <view class="title">评价成功</view>
<view class="btns"> <view class="btns">
<UiButton class="btn" @click="$Router.back()"></UiButton> <UiButton class="btn" @click="$Router.back()"></UiButton>
</view> </view>
</view>
<view class="await" v-if="goodsList.length"> <view class="await" v-if="goodsList.length">
<view class="await--title">这些宝贝还在等你的评价哦~</view> <view class="await--title">这些宝贝还在等你的评价哦~</view>
<BsCommentGoodsInfo class="await--goods" :goods="item" v-for="item in goodsList" :key="item.productId"> <BsCommentGoodsInfo class="await--goods" :goods="item" v-for="item in goodsList" :key="item.productId">
@ -63,30 +66,40 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
page{
background: $color-grey1;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.main { .main {
text-align: center; text-align: center;
} }
.icon{ .ctx{
background: $color-grey0;
padding-bottom: 40rpx;
.icon{
width: 400rpx; width: 400rpx;
height: 256rpx; height: 256rpx;
margin: 169rpx auto 42rpx; margin: 169rpx auto 42rpx;
} }
.title{ .title{
font-size: $font-size-lg; font-size: $font-size-lg;
line-height: 44rpx; line-height: 44rpx;
color: $color-grey6; color: $color-grey6;
} }
.desc{ .desc{
font-size: $font-size-sm; font-size: $font-size-sm;
line-height: 34rpx; line-height: 34rpx;
color: $color-grey4; color: $color-grey4;
} }
.btns{ .btns{
margin: 74rpx 105rpx 0; margin: 74rpx 105rpx 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
}
} }
.await{ .await{
margin-top: 20rpx; margin-top: 20rpx;
background: $color-grey0; background: $color-grey0;

Loading…
Cancel
Save