parent
dd0b6345d5
commit
4e65eeb11a
@ -1,156 +0,0 @@
|
||||
<!--
|
||||
* @Author: ch
|
||||
* @Date: 2022-06-21 18:19:13
|
||||
* @LastEditors: ch
|
||||
* @LastEditTime: 2022-06-23 16:14:08
|
||||
* @Description: file content
|
||||
-->
|
||||
<template>
|
||||
<view>
|
||||
<view class="goods-info">
|
||||
<BsCommentGoodsInfo :goods="detail"/>
|
||||
</view>
|
||||
<view class="box">
|
||||
<BsCommentUserInfo :userData="detail"/>
|
||||
<BsCommentInfo :commentDetail="detail"/>
|
||||
<BsCommentSubmit :commentDetail="detail" :type="COMMENT.TYPE.FOLLOW_COMMENT" @submit="handleSubmit"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import BsCommentGoodsInfo from '../../../components/BsCommentGoodsInfo.vue'
|
||||
import BsCommentInfo from '../../../components/BsCommentInfo.vue'
|
||||
import BsCommentUserInfo from '../../../components/BsCommentUserInfo.vue'
|
||||
import UiButton from '../../../components/UiButton.vue'
|
||||
import {ApiGetCommentDetail, ApiPostComment} from '@/common/api/comment'
|
||||
import {HandleApiError} from '@/common/utils'
|
||||
import COMMENT from '@/common/dicts/comment'
|
||||
import BsCommentSubmit from '../../../components/BsCommentSubmit.vue'
|
||||
export default {
|
||||
components: { BsCommentGoodsInfo, BsCommentInfo, UiButton, BsCommentUserInfo, BsCommentSubmit },
|
||||
data(){
|
||||
return {
|
||||
COMMENT,
|
||||
isShowAnswer : false,
|
||||
answer : null,
|
||||
commentId : this.$Route.query.id,
|
||||
detail : {},
|
||||
commentContent : ''
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
placeholder(){
|
||||
return this.answer ? `回复:${this.answer.userName}` : '说点什么吧?'
|
||||
},
|
||||
answerCount(){
|
||||
return this.detail.answerCommentList ? this.detail.answerCommentList.length : 0
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.getDetail();
|
||||
},
|
||||
methods:{
|
||||
async getDetail(){
|
||||
const {error, result} = await ApiGetCommentDetail({
|
||||
commentId : this.commentId
|
||||
});
|
||||
if(!HandleApiError(error,'getDetail')){
|
||||
this.detail = result;
|
||||
}
|
||||
},
|
||||
async handleSubmit(){
|
||||
this.$Router.replace('/commentSuccess');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
page{
|
||||
background: $color-grey1;
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.goods-info{
|
||||
padding: 40rpx 40rpx 0;
|
||||
}
|
||||
.box{
|
||||
background: $color-grey0;
|
||||
padding: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.reply-title{
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
margin-bottom:1rpx;
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
padding: 0 40rpx;
|
||||
}
|
||||
.reply{
|
||||
background: #fff;
|
||||
padding: 0 40rpx;
|
||||
overflow: hidden;
|
||||
&--item{
|
||||
border-bottom: 1px solid $color-grey1;
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
&--title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
&--ctx{
|
||||
margin: 26rpx 0;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
height: 124rpx;
|
||||
position: fixed;
|
||||
bottom: var(--window-bottom);
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
|
||||
}
|
||||
.reply-comment--bg{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.reply-comment{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
background: #fff;
|
||||
height: 124rpx;
|
||||
padding: 24rpx 40rpx;
|
||||
border-top: 1px solid #f8f8f8;
|
||||
&--box{
|
||||
display: flex;
|
||||
background: #F5F5F5;
|
||||
border-radius: 38rpx;
|
||||
}
|
||||
&--input{
|
||||
flex: 1;
|
||||
padding:0 20rpx 0 40rpx;
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Reference in new issue