Merge branch 'feature/comment-0620-ch' into msb_test

fix/0701-ch
ch 2 years ago
commit 774b4f4064

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-23 10:40:04
* @LastEditors: ch
* @LastEditTime: 2022-06-29 20:04:31
* @LastEditTime: 2022-06-30 18:01:46
* @Description: file content
-->
<template>
@ -67,6 +67,7 @@ export default {
margin-top: 20rpx;
font-size: 30rpx;
line-height: 46rpx;
word-break: break-all;
}
&--img{

@ -2,14 +2,15 @@
* @Author: ch
* @Date: 2022-06-21 15:50:01
* @LastEditors: ch
* @LastEditTime: 2022-06-28 19:18:04
* @LastEditTime: 2022-06-30 18:00:16
* @Description: file content
-->
<template>
<view>
<view class="top">
<u-rate count="5" size="30rpx" :value="commentDetail.commentScore" activeColor="#FFA35B" readonly inactiveColor="#DDD"></u-rate>
<text class="top--time">{{ commentDetail.createTime }}</text>
<text class="top--time">{{ FormatDate(commentDetail.createTime, 'yyyy-mm-dd hh:ii') }}</text>
</view>
<view class="ctx">{{ commentDetail.commentContent }}</view>
<view class="img" v-if="imgs.length">
@ -19,6 +20,7 @@
</view>
</template>
<script>
import {FormatDate} from '@/common/utils';
export default {
props : {
commentDetail : {
@ -31,8 +33,10 @@ export default {
require : true
}
},
data:{
curPreview : -1
data(){
return {
curPreview : -1
}
},
computed : {
imgs (){
@ -42,6 +46,7 @@ export default {
},
methods:{
FormatDate,
preview(idx){
if(!this.imgPreview){
return false

@ -2,25 +2,34 @@
* @Author: ch
* @Date: 2022-06-21 15:59:23
* @LastEditors: ch
* @LastEditTime: 2022-06-21 16:05:16
* @LastEditTime: 2022-06-30 17:57:25
* @Description: file content
-->
<template>
<view class="merchant">
<view class="merchant--title">
<text class="merchant--name">{{merchantComment.userName}}</text>
<text class="merchant--time">{{merchantComment.createTime}}</text>
<text class="merchant--time">{{ FormatDate(merchantComment.createTime, 'yyyy-mm-dd hh:ii') }}
</text>
</view>
<view class="merchant--ctx">{{merchantComment.commentContent}}</view>
</view>
</template>
<script>
import {FormatDate} from '@/common/utils';
export default {
props : {
merchantComment : {
type : Object,
default : () => ({})
}
},
data(){
return {
}
},
methods : {
FormatDate
}
}
</script>

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 18:19:13
* @LastEditors: ch
* @LastEditTime: 2022-06-30 14:54:12
* @LastEditTime: 2022-06-30 17:58:44
* @Description: file content
-->
<template>
@ -21,7 +21,7 @@
<text>
{{detail.merchantComment.userName}}
</text>
<text>{{detail.merchantComment.createTime}}</text>
<text>{{FormatDate(detail.merchantComment.createTime, 'yyyy-mm-dd hh:ii')}}</text>
</view>
<view class="reply--ctx">{{detail.merchantComment.commentContent}}</view>
</view>
@ -30,7 +30,7 @@
<text>
{{item.userName}} {{item.parentId !== detail.id ? ` 回复 ${item.parentUserName}` : ''}}
</text>
<text>{{item.createTime}}</text>
<text>{{FormatDate(item.createTime, 'yyyy-mm-dd hh:ii')}}</text>
</view>
<view class="reply--ctx">{{item.commentContent}}</view>
</view>
@ -69,7 +69,7 @@ import BsCommentInfo from '../../../components/BsCommentInfo.vue'
import BsCommentUserInfo from '../../../components/BsCommentUserInfo.vue'
import UiButton from '../../../components/UiButton.vue'
import {ApiGetCommentDetail, ApiPostComment, ApiPutCommentUseful} from '@/common/api/comment'
import {HandleApiError, Debounce} from '@/common/utils'
import {HandleApiError, Debounce, FormatDate} from '@/common/utils'
import COMMENT from '@/common/dicts/comment'
import BsEmpty from '../../../components/BsEmpty.vue'
import BsCommentFollowInfo from '../../../components/BsCommentFollowInfo.vue'
@ -97,7 +97,7 @@ export default {
this.getDetail();
},
methods:{
FormatDate,
async getDetail(){
const {error, result} = await ApiGetCommentDetail({
commentId : this.commentId

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-21 16:51:03
* @LastEditors: ch
* @LastEditTime: 2022-06-28 20:09:06
* @LastEditTime: 2022-06-30 17:38:08
* @Description: file content
-->
<template>
@ -86,7 +86,7 @@ export default {
isContent : true
});
if(!HandleApiError(error, 'getList')){
this.list = result.records;
this.list = this.list.concat(result.records);
//
if(result.records.length < this.pageSize){
this.loadingStatus = 'nomore';

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-06-22 15:15:22
* @LastEditors: ch
* @LastEditTime: 2022-06-29 10:20:34
* @LastEditTime: 2022-06-30 17:59:59
* @Description: file content
-->
<template>
@ -25,7 +25,7 @@
<view>
<view class="preview--rate">
<u-rate count="5" size="30rpx" :value="data.commentScore" activeColor="#FFA35B" readonly inactiveColor="#DDD"></u-rate>
<text class="preview--time">{{ data.createTime }}</text>
<text class="preview--time">{{FormatDate(data.createTime, 'yyyy-mm-dd hh:ii')}}</text>
</view>
<view class="preview--ctx">{{ data.commentContent }}</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} from '@/common/utils'
import { Debounce,FormatDate} from '@/common/utils'
export default {
components: { BsCommentUserInfo,BsCommentThumbup },
@ -70,6 +70,7 @@ export default {
this.isLike = this.data.isLike
},
methods:{
FormatDate,
handleChange(idx){
this.current = idx.current
},

Loading…
Cancel
Save