fix:点赞提示,已够吗问题

fix/0701-ch
ch 2 years ago
parent c010790f96
commit a35cb72501

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 16:01:19
* @LastEditors: ch
* @LastEditTime: 2022-06-29 10:20:40
* @LastEditTime: 2022-07-01 17:55:01
* @Description: file content
-->
<template>
@ -19,7 +19,7 @@
</view>
</template>
<script>
import {Debounce} from '@/common/utils';
import {Debounce, HandleApiError} from '@/common/utils';
import {ApiPutCommentUseful} from '@/common/api/comment'
export default {
props : {
@ -36,13 +36,18 @@ export default {
}
},
watch :{
commentDetail (){
this.isLike = this.commentDetail.isLike;
this.usefulCount = this.commentDetail.usefulCount;
commentDetail :{
handler(){
this.isLike = this.commentDetail.isLike;
this.usefulCount = this.commentDetail.usefulCount;
},
deep:true
}
},
mounted(){
this.isLike = this.commentDetail.isLike;
// console.log('---',this.isLike,this.commentDetail.usefulCount);
this.usefulCount = this.commentDetail.usefulCount;
},
methods:{
@ -66,6 +71,7 @@ export default {
commentId : this.commentDetail.id,
isLike : this.isLike
});
HandleApiError(error);
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 22:27:52
* @LastEditors: ch
* @LastEditTime: 2022-06-21 22:29:18
* @LastEditTime: 2022-07-01 17:14:36
* @Description: file content
-->
<template>
@ -10,7 +10,7 @@
<image class="comment-user--avatr" :src="userData.userAvatar" shape="circle"/>
<view>
<view class="comment-user--name">{{userData.userName}}</view>
<text class="comment-user--sku">已购买{{userData.skuName}}</text>
<text class="comment-user--sku" v-if="userData.skuName">{{userData.skuName}}</text>
</view>
</view>
</template>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 18:19:13
* @LastEditors: ch
* @LastEditTime: 2022-06-30 17:58:44
* @LastEditTime: 2022-07-01 17:12:16
* @Description: file content
-->
<template>
@ -164,6 +164,7 @@ export default {
isLike : this.isLike
});
HandleApiError(error);
}
}
}

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-22 15:15:22
* @LastEditors: ch
* @LastEditTime: 2022-06-30 17:59:59
* @LastEditTime: 2022-07-01 17:14:16
* @Description: file content
-->
<template>
@ -19,7 +19,7 @@
<image class="preview--avatar" :src="data.userAvatar"></image>
<view>
<view>{{data.userName}}</view>
<view>已购买{{data.skuName}}</view>
<view v-if="data.skuName">{{data.skuName}}</view>
</view>
</view>
<view>
@ -46,7 +46,7 @@
import BsCommentUserInfo from '@/components/BsCommentUserInfo.vue';
import BsCommentThumbup from '../../../components/BsCommentThumbup.vue';
import {ApiPutCommentUseful} from '@/common/api/comment'
import { Debounce,FormatDate} from '@/common/utils'
import { Debounce,FormatDate, HandleApiError} from '@/common/utils'
export default {
components: { BsCommentUserInfo,BsCommentThumbup },
@ -96,6 +96,7 @@ export default {
isLike : this.isLike
});
HandleApiError(error);
}
}
}

Loading…
Cancel
Save