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

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

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

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

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

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

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

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

Loading…
Cancel
Save