| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 |
- <template>
- <view class="container" v-if="info">
- <!-- 评价信息区域 -->
- <view class="header">
- <!-- 用户信息区域 -->
- <view class="header_info">
- <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
- <view class="info_msg">
- <view class="msg_name">张三</view>
- <view class="msg_star">
- <uni-rate readonly activeColor="#FFC300" :size="16" :value="info.score" />
- </view>
- </view>
- <view class="info_time">{{ info.commentTime }}</view>
- </view>
- <!-- 入住时间区域 -->
- <view class="header_time">2023-07入住,{{ info.commentTime }}发表 | {{ info.houseName }}</view>
- <!-- 评价内容区域 -->
- <view class="header_content">{{ info.content }}</view>
- <!-- 图片列表区域 -->
- <view class="header_img">
- <img v-for="(ele, index) in info.url" :key="index" mode="aspectFill" :src="ele" @click="handleLookImg(info.url, index)" />
- </view>
- </view>
- <!-- 民宿信息区域 -->
- <view class="hotel">
- <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
- <view class="hotel_info">
- <view class="info_name">{{ info.hotelName }}</view>
- <view class="info_star">
- <uni-rate readonly activeColor="#FFC300" :size="12" :value="4" />
- <view class="star_num">4.0</view>
- </view>
- <view class="info_tags">
- <view class="tag_item">双溪镇</view>
- <view class="tag_item">包吃住型</view>
- </view>
- </view>
- </view>
- <!-- 评论回复区域 -->
- <view class="reply">
- <!-- 评论总条数区域 -->
- <view class="reply_title">
- <img src="../../static/index/comment.png" />
- 评论(24)
- </view>
- <!-- 评论列表区域 -->
- <view class="reply_box">
- <!-- 每一条评论区域 -->
- <view class="box_item">
- <!-- 用户区域 -->
- <view class="item_user">
- <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
- <view class="user_info">
- <view class="info_top">张三</view>
- <view class="info_bottom">2023/05/25</view>
- </view>
- </view>
- <!-- 评价内容区域 -->
- <view class="item_content">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富</view>
- </view>
- <view class="box_item">
- <!-- 用户区域 -->
- <view class="item_user">
- <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
- <view class="user_info">
- <view class="info_top">商家</view>
- <view class="info_bottom">2023/05/25</view>
- </view>
- </view>
- <!-- 评价内容区域 -->
- <view class="item_content">
- <text class="content_key">回复张三:</text>
- 评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富
- </view>
- </view>
- </view>
- <!-- 输入框区域 -->
- <view class="reply_input">
- <input type="text" placeholder="说点什么吧..." />
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- // 评价详情信息
- info: null,
- id: null
- }
- },
- onLoad(options) {
- // console.log(options)
- this.id = options.id
- this.getData()
- // this.info = JSON.parse(decodeURIComponent(options.info))
- // console.log(this.info)
- },
- methods: {
- // 获取详情数据
- getData() {
- uni.request({
- url: 'http://192.168.161.224:8088/mhotel/abcapersonageDetails.action',
- data: {
- bookingCommentId: this.id
- },
- success: (res) => {
- // console.log(res.data)
- if (res.data.code === 200) {
- this.info = res.data.commentDetails
- }
- }
- })
- },
- // 点击图片回调
- handleLookImg(urls, current) {
- uni.previewImage({
- urls,
- current
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- display: flex;
- flex-direction: column;
- min-height: 100vh;
- background-color: #f2f3f5;
- .header {
- margin-top: 1rpx;
- padding: 0 20rpx;
- background-color: #fff;
- .header_info {
- display: flex;
- align-items: center;
- height: 115rpx;
- img {
- width: 70rpx;
- height: 70rpx;
- border-radius: 50%;
- }
- .info_msg {
- margin-left: 18rpx;
- .msg_name {
- font-size: 28rpx;
- }
- .msg_star {
- margin-left: -5rpx;
- margin-top: 5rpx;
- }
- }
- .info_time {
- margin-top: 25rpx;
- margin-left: auto;
- color: #a6a6a6;
- font-size: 24rpx;
- }
- }
- .header_time {
- color: #a6a6a6;
- font-size: 24rpx;
- }
- .header_content {
- margin-top: 18rpx;
- font-size: 24rpx;
- }
- .header_img {
- display: grid;
- grid-template-columns: 1fr 1fr 1fr;
- grid-auto-rows: auto;
- padding: 20rpx 20rpx 40rpx;
- gap: 10rpx;
- img {
- width: 216rpx;
- height: 216rpx;
- border-radius: 20rpx;
- }
- }
- }
- .hotel {
- display: flex;
- align-items: center;
- margin-top: 20rpx;
- height: 160rpx;
- background-color: #fff;
- img {
- margin-left: 20rpx;
- width: 120rpx;
- height: 120rpx;
- border-radius: 7rpx;
- }
- .hotel_info {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 20rpx;
- height: 120rpx;
- .info_name {
- font-size: 32rpx;
- }
- .info_star {
- display: flex;
- align-items: center;
- .star_num {
- margin-left: 10rpx;
- color: #ffc300;
- font-size: 24rpx;
- }
- }
- .info_tags {
- display: flex;
- color: #a6a6a6;
- font-size: 24rpx;
- .tag_item {
- margin-right: 20rpx;
- }
- }
- }
- }
- .reply {
- margin-top: 20rpx;
- background-color: #fff;
- .reply_title {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- padding-right: 35rpx;
- height: 90rpx;
- font-size: 24rpx;
- border-bottom: 1rpx solid #e6e6e6;
- img {
- margin-right: 12rpx;
- width: 25rpx;
- height: 21rpx;
- }
- }
- .reply_box {
- padding: 0 20rpx 30rpx;
- .box_item {
- margin-bottom: 10rpx;
- .item_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;
- }
- }
- }
- .item_content {
- font-size: 24rpx;
- .content_key {
- color: #808080;
- }
- }
- }
- }
- .reply_input {
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 33rpx;
- margin: 54rpx auto;
- width: 710rpx;
- height: 78rpx;
- font-size: 24rpx;
- border-radius: 44rpx;
- background-color: #e6e6e6;
- input {
- width: 100%;
- }
- }
- }
- }
- </style>
|