|
@@ -6,7 +6,7 @@
|
|
|
<view class="header_info">
|
|
<view class="header_info">
|
|
|
<img mode="aspectFill" :src="info.headPhoto" />
|
|
<img mode="aspectFill" :src="info.headPhoto" />
|
|
|
<view class="info_msg">
|
|
<view class="info_msg">
|
|
|
- <view class="msg_name">{{ info.userName }}</view>
|
|
|
|
|
|
|
+ <view class="msg_name">{{ info.name }}</view>
|
|
|
<view class="msg_star">
|
|
<view class="msg_star">
|
|
|
<uni-rate readonly activeColor="#FFC300" :size="16" :value="info.score" />
|
|
<uni-rate readonly activeColor="#FFC300" :size="16" :value="info.score" />
|
|
|
</view>
|
|
</view>
|
|
@@ -15,7 +15,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 入住时间区域 -->
|
|
<!-- 入住时间区域 -->
|
|
|
- <view class="header_time">2023-07入住,{{ info.commentTime }}发表 | {{ info.houseName }}</view>
|
|
|
|
|
|
|
+ <view class="header_time">{{ info.liveTime }}入住,{{ info.commentTime }}发表 | {{ info.houseName }}</view>
|
|
|
|
|
|
|
|
<!-- 评价内容区域 -->
|
|
<!-- 评价内容区域 -->
|
|
|
<view class="header_content">{{ info.content }}</view>
|
|
<view class="header_content">{{ info.content }}</view>
|
|
@@ -46,61 +46,50 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 民宿信息区域 -->
|
|
<!-- 民宿信息区域 -->
|
|
|
- <view class="hotel">
|
|
|
|
|
- <img mode="aspectFill" :src="info.coverImg" />
|
|
|
|
|
|
|
+ <view class="hotel" @click="handleGoDetail">
|
|
|
|
|
+ <img mode="aspectFill" :src="info.houseUrl[0]" />
|
|
|
<view class="hotel_info">
|
|
<view class="hotel_info">
|
|
|
<view class="info_name">{{ info.hotelName }}</view>
|
|
<view class="info_name">{{ info.hotelName }}</view>
|
|
|
- <view class="info_star">
|
|
|
|
|
|
|
+ <!-- <view class="info_star">
|
|
|
<uni-rate readonly activeColor="#FFC300" :size="12" :value="info.hotelScore * 1" />
|
|
<uni-rate readonly activeColor="#FFC300" :size="12" :value="info.hotelScore * 1" />
|
|
|
<view class="star_num">{{ info.hotelScore }}</view>
|
|
<view class="star_num">{{ info.hotelScore }}</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="info_tags">
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <!-- <view class="info_tags">
|
|
|
<view class="tag_item">{{ info.hotelTownship }}</view>
|
|
<view class="tag_item">{{ info.hotelTownship }}</view>
|
|
|
<view class="tag_item">{{ info.hotelType }}</view>
|
|
<view class="tag_item">{{ info.hotelType }}</view>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="info_tags">{{ info.houseOrderNumber }}间,{{ info.houseName }}</view>
|
|
|
|
|
+ <view class="info_tags">{{ info.liveTime }} - {{ info.checkOutTime }}</view>
|
|
|
|
|
+ <view class="info_tags">总价:¥{{ info.payAccount }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 评论回复区域 -->
|
|
<!-- 评论回复区域 -->
|
|
|
<view class="reply">
|
|
<view class="reply">
|
|
|
<!-- 评论总条数区域 -->
|
|
<!-- 评论总条数区域 -->
|
|
|
- <!-- <view class="reply_title">
|
|
|
|
|
|
|
+ <view class="reply_title">
|
|
|
<img src="../../static/index/comment.png" />
|
|
<img src="../../static/index/comment.png" />
|
|
|
评论({{ infoList.length }})
|
|
评论({{ infoList.length }})
|
|
|
- </view> -->
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<!-- 评论列表区域 -->
|
|
<!-- 评论列表区域 -->
|
|
|
<view class="reply_box" v-if="infoList.length">
|
|
<view class="reply_box" v-if="infoList.length">
|
|
|
<!-- 每一条评论区域 -->
|
|
<!-- 每一条评论区域 -->
|
|
|
<view class="box_item" v-for="item in infoList" :key="item.id">
|
|
<view class="box_item" v-for="item in infoList" :key="item.id">
|
|
|
<!-- 用户区域 -->
|
|
<!-- 用户区域 -->
|
|
|
- <view class="item_user">
|
|
|
|
|
|
|
+ <view class="item_user" @click="handleComment(item)">
|
|
|
<img mode="aspectFill" :src="item.headPhoto" />
|
|
<img mode="aspectFill" :src="item.headPhoto" />
|
|
|
<view class="user_info">
|
|
<view class="user_info">
|
|
|
- <view class="info_top">{{ item.commentName }}</view>
|
|
|
|
|
|
|
+ <view class="info_top">{{ item.userName }}</view>
|
|
|
<view class="info_bottom">{{ item.dateTime }}</view>
|
|
<view class="info_bottom">{{ item.dateTime }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 评价内容区域 -->
|
|
<!-- 评价内容区域 -->
|
|
|
- <view class="item_content">{{ item.content }}</view>
|
|
|
|
|
|
|
+ <view class="item_content" @click="handleComment(item)">{{ item.content }}</view>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 二级评论区域 -->
|
|
|
<view class="item_child">
|
|
<view class="item_child">
|
|
|
- <view class="child_box" v-for="ele in item.commentVoList" :key="ele.id">
|
|
|
|
|
- <view class="box_user">
|
|
|
|
|
- <img mode="aspectFill" :src="ele.headPhoto" />
|
|
|
|
|
- <view class="user_info">
|
|
|
|
|
- <view class="info_top">{{ ele.commentName }}</view>
|
|
|
|
|
- <view class="info_bottom">{{ ele.dateTime }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="box_content">
|
|
|
|
|
- <text class="content_key">回复{{ ele.userName }}:</text>
|
|
|
|
|
- {{ ele.content }}
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="item_foot" @click="handleComment(item)">
|
|
|
|
|
- <img src="../../static/index/comment.png" />
|
|
|
|
|
- 回复
|
|
|
|
|
|
|
+ <CommentChild v-if="item.commentVoList" :list="item.commentVoList" :commentParentId="info.id" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -115,7 +104,9 @@
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
var dayjs = require('dayjs')
|
|
var dayjs = require('dayjs')
|
|
|
|
|
+import CommentChild from '@/components/commentChild.vue'
|
|
|
export default {
|
|
export default {
|
|
|
|
|
+ components: { CommentChild },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
// 评价详情信息
|
|
// 评价详情信息
|
|
@@ -136,8 +127,14 @@ export default {
|
|
|
// console.log(options)
|
|
// console.log(options)
|
|
|
this.id = options.id
|
|
this.id = options.id
|
|
|
this.getData()
|
|
this.getData()
|
|
|
|
|
+ uni.$on('getData', this.getData)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleGoDetail() {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages/orderDetail/orderDetail?id=${this.info.bookingId}`
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// 进入全屏和退出全屏时触发的回调
|
|
// 进入全屏和退出全屏时触发的回调
|
|
|
fullscreenchange(e) {
|
|
fullscreenchange(e) {
|
|
|
this.isFullScreen = e.detail.fullScreen
|
|
this.isFullScreen = e.detail.fullScreen
|
|
@@ -158,6 +155,7 @@ export default {
|
|
|
editable: true,
|
|
editable: true,
|
|
|
success: async (res) => {
|
|
success: async (res) => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
|
|
+ const result = res.content
|
|
|
if (!res.content) {
|
|
if (!res.content) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '评论内容不能为空',
|
|
title: '评论内容不能为空',
|
|
@@ -173,9 +171,9 @@ export default {
|
|
|
url: '/mhotel/abcareplyComment.action',
|
|
url: '/mhotel/abcareplyComment.action',
|
|
|
data: {
|
|
data: {
|
|
|
commentId: item.id,
|
|
commentId: item.id,
|
|
|
- commentParentId: item.commentId,
|
|
|
|
|
- commentName: item.commentName,
|
|
|
|
|
- content: res.content,
|
|
|
|
|
|
|
+ commentParentId: this.info.id,
|
|
|
|
|
+ commentName: item.userName,
|
|
|
|
|
+ content: result,
|
|
|
commentStatus: 1,
|
|
commentStatus: 1,
|
|
|
createId: uni.getStorageSync('userInfo').id,
|
|
createId: uni.getStorageSync('userInfo').id,
|
|
|
createUsername: uni.getStorageSync('userInfo').user_name,
|
|
createUsername: uni.getStorageSync('userInfo').user_name,
|
|
@@ -190,7 +188,9 @@ export default {
|
|
|
icon: 'success',
|
|
icon: 'success',
|
|
|
mask: true
|
|
mask: true
|
|
|
})
|
|
})
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.getData()
|
|
|
|
|
+ }, 1500)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -200,12 +200,12 @@ export default {
|
|
|
// 获取详情数据
|
|
// 获取详情数据
|
|
|
async getData() {
|
|
async getData() {
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- url: '/mhotel/abcacommentDetails.action',
|
|
|
|
|
|
|
+ url: '/mhotel/abcapersonageDetails.action',
|
|
|
data: {
|
|
data: {
|
|
|
bookingCommentId: this.id
|
|
bookingCommentId: this.id
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- // console.log(res);
|
|
|
|
|
|
|
+ // console.log(res)
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
this.info = res.commentDetails
|
|
this.info = res.commentDetails
|
|
|
this.infoList = res.comment || []
|
|
this.infoList = res.comment || []
|
|
@@ -221,7 +221,7 @@ export default {
|
|
|
data: {
|
|
data: {
|
|
|
commentId: this.info.id,
|
|
commentId: this.info.id,
|
|
|
commentParentId: this.info.id,
|
|
commentParentId: this.info.id,
|
|
|
- commentName: this.info.userName,
|
|
|
|
|
|
|
+ commentName: this.info.name,
|
|
|
content: this.inputValue,
|
|
content: this.inputValue,
|
|
|
commentStatus: 1,
|
|
commentStatus: 1,
|
|
|
createId: uni.getStorageSync('userInfo').id,
|
|
createId: uni.getStorageSync('userInfo').id,
|
|
@@ -238,7 +238,9 @@ export default {
|
|
|
mask: true
|
|
mask: true
|
|
|
})
|
|
})
|
|
|
this.inputValue = ''
|
|
this.inputValue = ''
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.getData()
|
|
|
|
|
+ }, 1500)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 点击图片回调
|
|
// 点击图片回调
|
|
@@ -331,14 +333,15 @@ export default {
|
|
|
.hotel {
|
|
.hotel {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ padding: 20rpx 0;
|
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
- height: 160rpx;
|
|
|
|
|
|
|
+ // height: 160rpx;
|
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
img {
|
|
img {
|
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
|
width: 120rpx;
|
|
width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
|
|
|
|
+ height: 170rpx;
|
|
|
border-radius: 7rpx;
|
|
border-radius: 7rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -347,7 +350,7 @@ export default {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
|
- height: 120rpx;
|
|
|
|
|
|
|
+ height: 170rpx;
|
|
|
|
|
|
|
|
.info_name {
|
|
.info_name {
|
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
@@ -400,6 +403,8 @@ export default {
|
|
|
|
|
|
|
|
.box_item {
|
|
.box_item {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
|
|
+ padding-bottom: 10rpx;
|
|
|
|
|
+ border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
|
|
|
.item_user {
|
|
.item_user {
|
|
|
display: flex;
|
|
display: flex;
|
|
@@ -438,60 +443,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.item_child {
|
|
.item_child {
|
|
|
- .child_box {
|
|
|
|
|
- margin-bottom: 10rpx;
|
|
|
|
|
- .box_user {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- height: 120rpx;
|
|
|
|
|
-
|
|
|
|
|
- img {
|
|
|
|
|
- width: 70rpx;
|
|
|
|
|
- height: 70rpx;
|
|
|
|
|
- border-radius: 50%;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .user_info {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- margin-left: 18rpx;
|
|
|
|
|
- height: 70rpx;
|
|
|
|
|
-
|
|
|
|
|
- .info_top {
|
|
|
|
|
- font-size: 28rpx;
|
|
|
|
|
- }
|
|
|
|
|
- .info_bottom {
|
|
|
|
|
- color: #a6a6a6;
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .box_content {
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
-
|
|
|
|
|
- .content_key {
|
|
|
|
|
- color: #808080;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .item_foot {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: flex-end;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- padding-right: 35rpx;
|
|
|
|
|
- height: 70rpx;
|
|
|
|
|
- font-size: 24rpx;
|
|
|
|
|
- border-bottom: 1rpx solid #e6e6e6;
|
|
|
|
|
-
|
|
|
|
|
- img {
|
|
|
|
|
- margin-right: 12rpx;
|
|
|
|
|
- width: 25rpx;
|
|
|
|
|
- height: 21rpx;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ margin-left: 50rpx;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|