orderList.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <view class="pages">
  3. <TopTabs :list="tabList" @changeTab="changeTab" :placeholder="'输入景点名称/订单号'">
  4. </TopTabs>
  5. <view class="mainContain">
  6. <view class="card" >
  7. <view class="header">
  8. <span style="font-weight: 700;">订单号:A20231213102359619119</span>
  9. <text :class="statusClass[0]">{{status[0]}}</text>
  10. </view>
  11. <view class="mainContent">
  12. <view class="image">
  13. </view>
  14. <view class="middle">
  15. <span class="title">海景房-306</span>
  16. <span class='info'>
  17. <span>郑一璇</span>
  18. <span>15753988251</span>
  19. <span>03/11 - 03/12 (共两晚)</span>
  20. </span>
  21. </view>
  22. <view class="price">
  23. ¥1288.0
  24. </view>
  25. </view>
  26. <view class="bottom" @click="handleDetail()">
  27. <view class="btn">
  28. 办理入住
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import TopTabs from '../../components/TopTabs/topTabs.vue';
  37. export default {
  38. components: {
  39. TopTabs,
  40. },
  41. data() {
  42. return {
  43. statusClass: [
  44. 'green',
  45. 'blue',
  46. 'grey',
  47. 'orange'
  48. ],
  49. status: [
  50. '已预订',
  51. '已入住',
  52. '已取消',
  53. '待确认'
  54. ],
  55. // mt: uni.getSystemInfoSync().statusBarHeight + 44,
  56. tabList: [{
  57. name: '全部'
  58. },
  59. {
  60. name: '待确认'
  61. },
  62. {
  63. name: '待支付'
  64. },
  65. {
  66. name: '已预订'
  67. },
  68. {
  69. name: '已取消'
  70. },
  71. ],
  72. }
  73. },
  74. methods: {
  75. handleDetail() {
  76. uni.navigateTo({
  77. url: '/pagesMy/orderList/alreadyBook'
  78. })
  79. },
  80. changeTab(index) {
  81. this.tabIdx = index;
  82. // switch (index) {
  83. // case 0:
  84. // this.gtiList()
  85. // break
  86. // case 1:
  87. // this.getiList(0)
  88. // break
  89. // case 2:
  90. // this.getiList(1)
  91. // break
  92. // case 3:
  93. // this.getiList(-3)
  94. // }
  95. },
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .pages {
  101. background: #F9FAFC;
  102. height: 100vh;
  103. .green {}
  104. .mainContain {
  105. display: flex;
  106. flex-direction: column;
  107. padding: 0 20rpx;
  108. .card {
  109. background: #fff;
  110. border-radius: 16rpx;
  111. margin: 20rpx 0;
  112. padding: 20rpx;
  113. .header {
  114. display: flex;
  115. justify-content: space-between;
  116. border-bottom: 1px #f3f3f3 solid;
  117. padding: 20rpx;
  118. .green {
  119. color: #39CE77;
  120. }
  121. .blue {
  122. color: #1372FF;
  123. }
  124. .grey {
  125. color: #4C5F76;
  126. }
  127. .orange {
  128. color: #FF9100;
  129. }
  130. }
  131. .mainContent {
  132. border-bottom: 1px #f3f3f3 solid;
  133. display: flex;
  134. padding: 20rpx 0;
  135. justify-content: space-evenly;
  136. .image {
  137. background: url('https://i.ringzle.com/file/20231024/a68c2b2909d84930bbec1e5c7adbb0b4.jpg');
  138. background-repeat: no-repeat;
  139. background-size: cover;
  140. width: 180rpx;
  141. height: 180rpx;
  142. border-radius: 16rpx;
  143. }
  144. .middle {
  145. color: #777777;
  146. display: flex;
  147. flex-direction: column;
  148. justify-content: space-between;
  149. .title {
  150. font-weight: 700;
  151. font-size: 32rpx;
  152. color: black;
  153. }
  154. .info {
  155. color: #777777;
  156. display: flex;
  157. flex-direction: column;
  158. &>span {
  159. margin-top: 10rpx;
  160. }
  161. }
  162. }
  163. .price {
  164. color: red;
  165. text-align: center;
  166. height: 100%;
  167. align-items: center;
  168. align-self: center;
  169. font-size: 29rpx;
  170. font-weight: 700;
  171. }
  172. }
  173. .bottom {
  174. padding: 30rpx 20rpx;
  175. display: flex;
  176. justify-content: flex-end;
  177. .btn {
  178. background: #1372FF;
  179. border-radius: 35rpx;
  180. color: white;
  181. padding: 13rpx 34rpx;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. </style>