evaluateStatus.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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" @click="handleClickBtn">{{ 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. methods: {
  97. // 点击按钮回调
  98. handleClickBtn() {
  99. if (this.status === '1') {
  100. uni.reLaunch({
  101. url: '/pages/myEvaluate/myEvaluate'
  102. })
  103. } else {
  104. uni.navigateBack(1)
  105. }
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .container {
  112. min-height: 100vh;
  113. background-color: #f7f7f7;
  114. .status {
  115. display: flex;
  116. flex-direction: column;
  117. align-items: center;
  118. height: 554rpx;
  119. background-color: #fff;
  120. img {
  121. margin: 80rpx 0 40rpx;
  122. width: 134rpx;
  123. height: 134rpx;
  124. }
  125. .status_msg {
  126. font-size: 32rpx;
  127. }
  128. .status_btn {
  129. display: flex;
  130. justify-content: center;
  131. align-items: center;
  132. margin-top: 87rpx;
  133. width: 330rpx;
  134. height: 84rpx;
  135. color: #fff;
  136. font-size: 28rpx;
  137. border-radius: 22rpx;
  138. background-color: #096562;
  139. }
  140. }
  141. .info {
  142. display: flex;
  143. align-items: center;
  144. margin: 20rpx 0;
  145. padding: 0 30rpx;
  146. height: 144rpx;
  147. background-color: #fff;
  148. img {
  149. width: 80rpx;
  150. height: 80rpx;
  151. border-radius: 9rpx;
  152. }
  153. .info_name {
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: space-between;
  157. margin-left: 24rpx;
  158. height: 80rpx;
  159. .top {
  160. font-weight: bold;
  161. font-size: 32rpx;
  162. }
  163. .bottom {
  164. color: #a6a6a6;
  165. font-size: 24rpx;
  166. }
  167. }
  168. .info_btn {
  169. display: flex;
  170. justify-content: center;
  171. align-items: center;
  172. margin-left: auto;
  173. width: 137rpx;
  174. height: 71rpx;
  175. color: #fff;
  176. font-size: 28rpx;
  177. border-radius: 22rpx;
  178. background-color: #096562;
  179. }
  180. }
  181. .body {
  182. padding-bottom: 20rpx;
  183. .body_box {
  184. margin-top: 20rpx;
  185. box-sizing: border-box;
  186. padding: 0 40rpx;
  187. background-color: #fff;
  188. .box_header {
  189. display: flex;
  190. align-items: center;
  191. height: 94rpx;
  192. .img {
  193. width: 47rpx;
  194. height: 47rpx;
  195. }
  196. .title {
  197. margin-left: 16rpx;
  198. width: 350rpx;
  199. font-size: 32rpx;
  200. font-weight: bold;
  201. overflow: hidden;
  202. white-space: nowrap;
  203. text-overflow: ellipsis;
  204. }
  205. .type {
  206. display: flex;
  207. justify-content: flex-end;
  208. align-items: center;
  209. margin-left: auto;
  210. margin-right: 25rpx;
  211. width: 285rpx;
  212. color: #808080;
  213. font-size: 28rpx;
  214. }
  215. }
  216. .box_info {
  217. display: flex;
  218. height: 140rpx;
  219. .img {
  220. width: 100rpx;
  221. height: 100rpx;
  222. border-radius: 9rpx;
  223. }
  224. .info_right {
  225. display: flex;
  226. flex-direction: column;
  227. justify-content: space-around;
  228. margin-top: -5rpx;
  229. margin-left: 18rpx;
  230. height: 120rpx;
  231. color: #808080;
  232. font-size: 28rpx;
  233. .info_right_item {
  234. flex: 1;
  235. }
  236. }
  237. }
  238. .box_btn {
  239. display: flex;
  240. justify-content: flex-end;
  241. margin-top: -10rpx;
  242. height: 100rpx;
  243. .btn_item {
  244. display: flex;
  245. justify-content: center;
  246. align-items: center;
  247. margin-left: 20rpx;
  248. width: 178rpx;
  249. height: 68rpx;
  250. border-radius: 64rpx;
  251. color: #808080;
  252. font-size: 28rpx;
  253. border: 1rpx solid #808080;
  254. }
  255. }
  256. }
  257. }
  258. }
  259. </style>