evaluateStatus.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view class="container">
  3. <!-- 评价状态区域 -->
  4. <view class="status">
  5. <img v-if="status === '1'" src="../../static/index/success.png" />
  6. <img v-if="status === '2'" src="../../static/index/fail.png" />
  7. <view class="status_msg">{{ msg }}</view>
  8. <view class="status_btn">{{ btnMsg }}</view>
  9. </view>
  10. <!-- 民宿信息区域 -->
  11. <view class="info">
  12. <img mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  13. <view class="info_name">
  14. <view class="top">民宿名称</view>
  15. <view class="bottom">500人收藏</view>
  16. </view>
  17. <view class="info_btn">收藏</view>
  18. </view>
  19. <!-- 订单列表区域 -->
  20. <view class="body">
  21. <!-- 每一个订单区域 -->
  22. <view class="body_box">
  23. <!-- 标题区域 -->
  24. <view class="box_header">
  25. <img class="img" src="../../static/my/hotel.png" />
  26. <view class="title">民宿名称</view>
  27. <view class="type">已消费</view>
  28. </view>
  29. <!-- 酒店信息区域 -->
  30. <view class="box_info">
  31. <img class="img" mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  32. <view class="info_right">
  33. <view class="info_right_item">1间,大床房</view>
  34. <view class="info_right_item">2023-07-26 - 2023-07-27</view>
  35. <view class="info_right_item">总价:¥666</view>
  36. </view>
  37. </view>
  38. <!-- 按钮区域 -->
  39. <view class="box_btn">
  40. <view class="btn_item" @click="handleEvaluate">去评价</view>
  41. </view>
  42. </view>
  43. <view class="body_box">
  44. <!-- 标题区域 -->
  45. <view class="box_header">
  46. <img class="img" src="../../static/my/hotel.png" />
  47. <view class="title">民宿名称</view>
  48. <view class="type">已消费</view>
  49. </view>
  50. <!-- 酒店信息区域 -->
  51. <view class="box_info">
  52. <img class="img" mode="aspectFill" src="https://img1.baidu.com/it/u=4085584268,3308739054&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=375" />
  53. <view class="info_right">
  54. <view class="info_right_item">1间,大床房</view>
  55. <view class="info_right_item">2023-07-26 - 2023-07-27</view>
  56. <view class="info_right_item">总价:¥666</view>
  57. </view>
  58. </view>
  59. <!-- 按钮区域 -->
  60. <view class="box_btn">
  61. <view class="btn_item" @click="handleEvaluate">去评价</view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. // 评价是否成功 1成功 2失败
  72. status: null,
  73. // 评价状态信息
  74. msg: '',
  75. // 按钮文字信息
  76. btnMsg: ''
  77. }
  78. },
  79. onLoad(options) {
  80. // console.log(options)
  81. this.status = options.status
  82. if (this.status === '1') {
  83. uni.setNavigationBarTitle({
  84. title: '评价成功'
  85. })
  86. this.msg = '评价成功'
  87. this.btnMsg = '查看我的评价'
  88. } else {
  89. uni.setNavigationBarTitle({
  90. title: '评价失败'
  91. })
  92. this.msg = '评价失败'
  93. this.btnMsg = '重新评价'
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. .container {
  100. min-height: 100vh;
  101. background-color: #f7f7f7;
  102. .status {
  103. display: flex;
  104. flex-direction: column;
  105. align-items: center;
  106. height: 554rpx;
  107. background-color: #fff;
  108. img {
  109. margin: 80rpx 0 40rpx;
  110. width: 134rpx;
  111. height: 134rpx;
  112. }
  113. .status_msg {
  114. font-size: 32rpx;
  115. }
  116. .status_btn {
  117. display: flex;
  118. justify-content: center;
  119. align-items: center;
  120. margin-top: 87rpx;
  121. width: 330rpx;
  122. height: 84rpx;
  123. color: #fff;
  124. font-size: 28rpx;
  125. border-radius: 22rpx;
  126. background-color: #096562;
  127. }
  128. }
  129. .info {
  130. display: flex;
  131. align-items: center;
  132. margin: 20rpx 0;
  133. padding: 0 30rpx;
  134. height: 144rpx;
  135. background-color: #fff;
  136. img {
  137. width: 80rpx;
  138. height: 80rpx;
  139. border-radius: 9rpx;
  140. }
  141. .info_name {
  142. display: flex;
  143. flex-direction: column;
  144. justify-content: space-between;
  145. margin-left: 24rpx;
  146. height: 80rpx;
  147. .top {
  148. font-weight: bold;
  149. font-size: 32rpx;
  150. }
  151. .bottom {
  152. color: #a6a6a6;
  153. font-size: 24rpx;
  154. }
  155. }
  156. .info_btn {
  157. display: flex;
  158. justify-content: center;
  159. align-items: center;
  160. margin-left: auto;
  161. width: 137rpx;
  162. height: 71rpx;
  163. color: #fff;
  164. font-size: 28rpx;
  165. border-radius: 22rpx;
  166. background-color: #096562;
  167. }
  168. }
  169. .body {
  170. padding-bottom: 20rpx;
  171. .body_box {
  172. margin-top: 20rpx;
  173. box-sizing: border-box;
  174. padding: 0 40rpx;
  175. background-color: #fff;
  176. .box_header {
  177. display: flex;
  178. align-items: center;
  179. height: 94rpx;
  180. .img {
  181. width: 47rpx;
  182. height: 47rpx;
  183. }
  184. .title {
  185. margin-left: 16rpx;
  186. width: 350rpx;
  187. font-size: 32rpx;
  188. font-weight: bold;
  189. overflow: hidden;
  190. white-space: nowrap;
  191. text-overflow: ellipsis;
  192. }
  193. .type {
  194. display: flex;
  195. justify-content: flex-end;
  196. align-items: center;
  197. margin-left: auto;
  198. margin-right: 25rpx;
  199. width: 285rpx;
  200. color: #808080;
  201. font-size: 28rpx;
  202. }
  203. }
  204. .box_info {
  205. display: flex;
  206. height: 140rpx;
  207. .img {
  208. width: 100rpx;
  209. height: 100rpx;
  210. border-radius: 9rpx;
  211. }
  212. .info_right {
  213. display: flex;
  214. flex-direction: column;
  215. justify-content: space-around;
  216. margin-top: -5rpx;
  217. margin-left: 18rpx;
  218. height: 120rpx;
  219. color: #808080;
  220. font-size: 28rpx;
  221. .info_right_item {
  222. flex: 1;
  223. }
  224. }
  225. }
  226. .box_btn {
  227. display: flex;
  228. justify-content: flex-end;
  229. margin-top: -10rpx;
  230. height: 100rpx;
  231. .btn_item {
  232. display: flex;
  233. justify-content: center;
  234. align-items: center;
  235. margin-left: 20rpx;
  236. width: 178rpx;
  237. height: 68rpx;
  238. border-radius: 64rpx;
  239. color: #808080;
  240. font-size: 28rpx;
  241. border: 1rpx solid #808080;
  242. }
  243. }
  244. }
  245. }
  246. }
  247. </style>