appraiseDetail.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. <template>
  2. <view class="container" v-if="info">
  3. <!-- 评价信息区域 -->
  4. <view class="header">
  5. <!-- 用户信息区域 -->
  6. <view class="header_info">
  7. <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  8. <view class="info_msg">
  9. <view class="msg_name">张三</view>
  10. <view class="msg_star">
  11. <uni-rate readonly activeColor="#FFC300" :size="16" :value="info.score" />
  12. </view>
  13. </view>
  14. <view class="info_time">{{ info.commentTime }}</view>
  15. </view>
  16. <!-- 入住时间区域 -->
  17. <view class="header_time">2023-07入住,{{ info.commentTime }}发表 | {{ info.houseName }}</view>
  18. <!-- 评价内容区域 -->
  19. <view class="header_content">{{ info.content }}</view>
  20. <!-- 图片列表区域 -->
  21. <view class="header_img">
  22. <img v-for="(ele, index) in info.url" :key="index" mode="aspectFill" :src="ele" @click="handleLookImg(info.url, index)" />
  23. </view>
  24. </view>
  25. <!-- 民宿信息区域 -->
  26. <view class="hotel">
  27. <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  28. <view class="hotel_info">
  29. <view class="info_name">{{ info.hotelName }}</view>
  30. <view class="info_star">
  31. <uni-rate readonly activeColor="#FFC300" :size="12" :value="4" />
  32. <view class="star_num">4.0</view>
  33. </view>
  34. <view class="info_tags">
  35. <view class="tag_item">双溪镇</view>
  36. <view class="tag_item">包吃住型</view>
  37. </view>
  38. </view>
  39. </view>
  40. <!-- 评论回复区域 -->
  41. <view class="reply">
  42. <!-- 评论总条数区域 -->
  43. <view class="reply_title">
  44. <img src="../../static/index/comment.png" />
  45. 评论(24)
  46. </view>
  47. <!-- 评论列表区域 -->
  48. <view class="reply_box">
  49. <!-- 每一条评论区域 -->
  50. <view class="box_item">
  51. <!-- 用户区域 -->
  52. <view class="item_user">
  53. <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  54. <view class="user_info">
  55. <view class="info_top">张三</view>
  56. <view class="info_bottom">2023/05/25</view>
  57. </view>
  58. </view>
  59. <!-- 评价内容区域 -->
  60. <view class="item_content">评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富</view>
  61. </view>
  62. <view class="box_item">
  63. <!-- 用户区域 -->
  64. <view class="item_user">
  65. <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  66. <view class="user_info">
  67. <view class="info_top">商家</view>
  68. <view class="info_bottom">2023/05/25</view>
  69. </view>
  70. </view>
  71. <!-- 评价内容区域 -->
  72. <view class="item_content">
  73. <text class="content_key">回复张三:</text>
  74. 评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容评价内容的丰富的丰富
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 输入框区域 -->
  79. <view class="reply_input">
  80. <input type="text" placeholder="说点什么吧..." />
  81. </view>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. data() {
  88. return {
  89. // 评价详情信息
  90. info: null,
  91. id: null
  92. }
  93. },
  94. onLoad(options) {
  95. // console.log(options)
  96. this.id = options.id
  97. this.getData()
  98. // this.info = JSON.parse(decodeURIComponent(options.info))
  99. // console.log(this.info)
  100. },
  101. methods: {
  102. // 获取详情数据
  103. getData() {
  104. uni.request({
  105. url: 'http://192.168.161.224:8088/mhotel/abcapersonageDetails.action',
  106. data: {
  107. bookingCommentId: this.id
  108. },
  109. success: (res) => {
  110. // console.log(res.data)
  111. if (res.data.code === 200) {
  112. this.info = res.data.commentDetails
  113. }
  114. }
  115. })
  116. },
  117. // 点击图片回调
  118. handleLookImg(urls, current) {
  119. uni.previewImage({
  120. urls,
  121. current
  122. })
  123. }
  124. }
  125. }
  126. </script>
  127. <style lang="scss" scoped>
  128. .container {
  129. display: flex;
  130. flex-direction: column;
  131. min-height: 100vh;
  132. background-color: #f2f3f5;
  133. .header {
  134. margin-top: 1rpx;
  135. padding: 0 20rpx;
  136. background-color: #fff;
  137. .header_info {
  138. display: flex;
  139. align-items: center;
  140. height: 115rpx;
  141. img {
  142. width: 70rpx;
  143. height: 70rpx;
  144. border-radius: 50%;
  145. }
  146. .info_msg {
  147. margin-left: 18rpx;
  148. .msg_name {
  149. font-size: 28rpx;
  150. }
  151. .msg_star {
  152. margin-left: -5rpx;
  153. margin-top: 5rpx;
  154. }
  155. }
  156. .info_time {
  157. margin-top: 25rpx;
  158. margin-left: auto;
  159. color: #a6a6a6;
  160. font-size: 24rpx;
  161. }
  162. }
  163. .header_time {
  164. color: #a6a6a6;
  165. font-size: 24rpx;
  166. }
  167. .header_content {
  168. margin-top: 18rpx;
  169. font-size: 24rpx;
  170. }
  171. .header_img {
  172. display: grid;
  173. grid-template-columns: 1fr 1fr 1fr;
  174. grid-auto-rows: auto;
  175. padding: 20rpx 20rpx 40rpx;
  176. gap: 10rpx;
  177. img {
  178. width: 216rpx;
  179. height: 216rpx;
  180. border-radius: 20rpx;
  181. }
  182. }
  183. }
  184. .hotel {
  185. display: flex;
  186. align-items: center;
  187. margin-top: 20rpx;
  188. height: 160rpx;
  189. background-color: #fff;
  190. img {
  191. margin-left: 20rpx;
  192. width: 120rpx;
  193. height: 120rpx;
  194. border-radius: 7rpx;
  195. }
  196. .hotel_info {
  197. display: flex;
  198. flex-direction: column;
  199. justify-content: space-between;
  200. margin-left: 20rpx;
  201. height: 120rpx;
  202. .info_name {
  203. font-size: 32rpx;
  204. }
  205. .info_star {
  206. display: flex;
  207. align-items: center;
  208. .star_num {
  209. margin-left: 10rpx;
  210. color: #ffc300;
  211. font-size: 24rpx;
  212. }
  213. }
  214. .info_tags {
  215. display: flex;
  216. color: #a6a6a6;
  217. font-size: 24rpx;
  218. .tag_item {
  219. margin-right: 20rpx;
  220. }
  221. }
  222. }
  223. }
  224. .reply {
  225. margin-top: 20rpx;
  226. background-color: #fff;
  227. .reply_title {
  228. display: flex;
  229. justify-content: flex-end;
  230. align-items: center;
  231. padding-right: 35rpx;
  232. height: 90rpx;
  233. font-size: 24rpx;
  234. border-bottom: 1rpx solid #e6e6e6;
  235. img {
  236. margin-right: 12rpx;
  237. width: 25rpx;
  238. height: 21rpx;
  239. }
  240. }
  241. .reply_box {
  242. padding: 0 20rpx 30rpx;
  243. .box_item {
  244. margin-bottom: 10rpx;
  245. .item_user {
  246. display: flex;
  247. align-items: center;
  248. height: 120rpx;
  249. img {
  250. width: 70rpx;
  251. height: 70rpx;
  252. border-radius: 50%;
  253. }
  254. .user_info {
  255. display: flex;
  256. flex-direction: column;
  257. justify-content: space-between;
  258. margin-left: 18rpx;
  259. height: 70rpx;
  260. .info_top {
  261. font-size: 28rpx;
  262. }
  263. .info_bottom {
  264. color: #a6a6a6;
  265. font-size: 24rpx;
  266. }
  267. }
  268. }
  269. .item_content {
  270. font-size: 24rpx;
  271. .content_key {
  272. color: #808080;
  273. }
  274. }
  275. }
  276. }
  277. .reply_input {
  278. display: flex;
  279. align-items: center;
  280. box-sizing: border-box;
  281. padding: 0 33rpx;
  282. margin: 54rpx auto;
  283. width: 710rpx;
  284. height: 78rpx;
  285. font-size: 24rpx;
  286. border-radius: 44rpx;
  287. background-color: #e6e6e6;
  288. input {
  289. width: 100%;
  290. }
  291. }
  292. }
  293. }
  294. </style>