push.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <template>
  2. <view class="container">
  3. <!-- 顶部订单状态信息区域 -->
  4. <view class="header">
  5. <!-- 背景图片区域 -->
  6. <img src="../../static/my/headerImg.png" />
  7. <!-- 标题区域 -->
  8. <view class="header_title">订单详情</view>
  9. <!-- 返回图标区域 -->
  10. <img class="header_icon" src="../../static/index/left.png" @click="handleBack" />
  11. <view class="header_type">已支付</view>
  12. <view class="header_info">订单号:2307311449380724</view>
  13. <view class="header_type" v-if="type === '1'">代付款</view>
  14. <view class="header_info" v-if="type === '1'">超时后,订单将会自动取消</view>
  15. <view class="header_type" v-if="type === '2'">支付超时</view>
  16. <view class="header_info" v-if="type === '2'">订单已超过可支付时间,请重新下单</view>
  17. <view class="header_type" v-if="type === '3'">已支付</view>
  18. <view class="header_info" v-if="type === '3'">订单已支付,请等待商家接单</view>
  19. <view class="header_type" v-if="type === '4'">已取消</view>
  20. <view class="header_info" v-if="type === '4'">订单已取消,请重新下单</view>
  21. <view class="header_type" v-if="type === '5'">已退单</view>
  22. <view class="header_info" v-if="type === '5'">订单已被商家退单,请重新下单</view>
  23. <view class="header_type" v-if="type === '6'">待入住</view>
  24. <view class="header_info" v-if="type === '6'">订单已被商家接单,请前往办理入住</view>
  25. <view class="header_type" v-if="type === '7'">已入住</view>
  26. <view class="header_info" v-if="type === '7'">订单已办理入住</view>
  27. <view class="header_type" v-if="type === '8'">已退款</view>
  28. <view class="header_info" v-if="type === '8'">订单已退款</view>
  29. <view class="header_type" v-if="type === '9'">已消费</view>
  30. <view class="header_info" v-if="type === '9'">您的订单已消费,期待您再次预定哦</view>
  31. </view>
  32. <!-- 主体内容区域 -->
  33. <view class="body">
  34. <!-- 房型信息和用户信息区域 -->
  35. <view class="body_box2">
  36. <view class="info_time">
  37. 7月26日
  38. <text class="gap">今天</text>
  39. <view class="time_line"></view>
  40. <view class="time_num">1晚</view>
  41. <view class="time_line"></view>
  42. <view class="gap">7月26日</view>
  43. <text>明天</text>
  44. </view>
  45. <view class="info_msg">大床房</view>
  46. <view class="info_type">
  47. <view class="type_item">包吃住型</view>
  48. <view class="type_item">包吃住型</view>
  49. <view class="type_item">包吃住型</view>
  50. </view>
  51. <view class="info_tag">
  52. <view class="tag_item">16-20㎡</view>
  53. <view class="tag_item">双人床</view>
  54. <view class="tag_item">窗户位于走廊/窗户较小</view>
  55. </view>
  56. <view class="info_box">
  57. <view class="box_key">住客姓名</view>
  58. <view class="box_value">张三</view>
  59. </view>
  60. <view class="info_box">
  61. <view class="box_key">联系电话</view>
  62. <view class="box_value">13677985689</view>
  63. </view>
  64. <view class="info_box">
  65. <view class="box_key">预计到店</view>
  66. <view class="box_value">7月26日14:00之前</view>
  67. </view>
  68. </view>
  69. <!-- 费用信息区域 -->
  70. <view class="body_box">
  71. <view class="box_title">费用信息</view>
  72. <view class="box_container">
  73. <view class="container_key">在线支付</view>
  74. <view class="container_value price">¥280</view>
  75. </view>
  76. <view class="box_container">
  77. <view class="container_key">发票报销</view>
  78. <view class="container_value">如需发票,请先与酒店确认</view>
  79. </view>
  80. </view>
  81. <!-- 按钮区域 -->
  82. <view class="body_btn">
  83. <view class="btn_item type">退单</view>
  84. <view class="btn_item type2">接单</view>
  85. </view>
  86. </view>
  87. </view>
  88. </template>
  89. <script>
  90. export default {
  91. data() {
  92. return {
  93. // 订单类型
  94. type: null
  95. }
  96. },
  97. onLoad(options) {
  98. this.type = options.type
  99. },
  100. methods: {
  101. // 点击复制文字回调
  102. handleCopy(text) {
  103. uni.setClipboardData({
  104. data: text,
  105. success: () => {}
  106. })
  107. },
  108. handleBack() {
  109. uni.navigateBack(1)
  110. },
  111. // 点击地图/导航文字回调
  112. handleMap() {
  113. uni.openLocation({
  114. latitude: 28.86054,
  115. longitude: 115.361744,
  116. name: '',
  117. address: '靖安县---详细地址',
  118. success: () => {}
  119. })
  120. },
  121. // 点击联系商家文字回调
  122. handlePhone(phone) {
  123. uni.makePhoneCall({
  124. phoneNumber: phone
  125. })
  126. },
  127. // 点击去支付按钮回调
  128. handlePay() {
  129. uni.navigateTo({
  130. url: '/pages/pay/pay'
  131. })
  132. },
  133. // 点击取消订单按钮回调
  134. handleCancel() {
  135. uni.showModal({
  136. title: '提示',
  137. content: '确定取消该订单吗?',
  138. success: (res) => {
  139. if (res.confirm) {
  140. uni.showToast({
  141. title: '取消成功',
  142. icon: 'success'
  143. })
  144. setTimeout(() => {
  145. uni.redirectTo({
  146. url: '/pages/orderManage/orderManage'
  147. })
  148. }, 1500)
  149. }
  150. }
  151. })
  152. },
  153. // 点击再次预定按钮回调
  154. handleAgain() {
  155. uni.navigateTo({
  156. url: '/pages/detail/detail'
  157. })
  158. },
  159. // 点击删除订单按钮回调
  160. handleDelete() {
  161. uni.showModal({
  162. title: '提示',
  163. content: '确定删除该订单吗?',
  164. success: (res) => {
  165. if (res.confirm) {
  166. uni.showToast({
  167. title: '删除成功',
  168. icon: 'success'
  169. })
  170. setTimeout(() => {
  171. uni.redirectTo({
  172. url: '/pages/orderManage/orderManage'
  173. })
  174. }, 1500)
  175. }
  176. }
  177. })
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="scss" scoped>
  183. .container {
  184. position: relative;
  185. height: 100vh;
  186. background-color: #f2f2f2;
  187. .header {
  188. height: 480rpx;
  189. color: #fff;
  190. img {
  191. width: 100%;
  192. }
  193. .header_title {
  194. position: absolute;
  195. top: 65rpx;
  196. left: 308rpx;
  197. color: #fff;
  198. font-size: 28rpx;
  199. }
  200. .header_icon {
  201. position: absolute;
  202. top: 76rpx;
  203. left: 10rpx;
  204. width: 47rpx;
  205. height: 47rpx;
  206. }
  207. .header_type {
  208. position: absolute;
  209. top: 144rpx;
  210. left: 30rpx;
  211. font-size: 40rpx;
  212. font-weight: bold;
  213. }
  214. .header_info {
  215. position: absolute;
  216. top: 215rpx;
  217. left: 30rpx;
  218. font-size: 24rpx;
  219. }
  220. }
  221. .body {
  222. position: absolute;
  223. top: 278rpx;
  224. left: 0;
  225. right: 0;
  226. box-sizing: border-box;
  227. padding: 20rpx;
  228. height: calc(100vh - 278rpx);
  229. border-radius: 20rpx 20rpx 0 0;
  230. background-color: #ebeced;
  231. overflow-y: auto;
  232. .body_box {
  233. box-sizing: border-box;
  234. padding: 0 30rpx;
  235. margin-bottom: 20rpx;
  236. display: flex;
  237. flex-direction: column;
  238. height: 240rpx;
  239. border-radius: 14rpx;
  240. background-color: #fff;
  241. .box_title {
  242. line-height: 90rpx;
  243. font-size: 28rpx;
  244. font-weight: bold;
  245. border-bottom: 1rpx solid #e5e5e5;
  246. }
  247. .box_container {
  248. display: flex;
  249. margin-top: 25rpx;
  250. font-size: 28rpx;
  251. .container_key {
  252. width: 160rpx;
  253. color: #808080;
  254. }
  255. .container_value {
  256. }
  257. .container_copy {
  258. margin-left: auto;
  259. color: #096562;
  260. }
  261. .price {
  262. color: #ff5733;
  263. }
  264. }
  265. .box_info {
  266. display: flex;
  267. margin-top: 20rpx;
  268. height: 130rpx;
  269. img {
  270. width: 100rpx;
  271. height: 100rpx;
  272. border-radius: 10rpx;
  273. }
  274. .info_msg {
  275. display: flex;
  276. flex-direction: column;
  277. justify-content: space-around;
  278. margin-top: -10rpx;
  279. margin-left: 18rpx;
  280. width: 540rpx;
  281. .msg_name {
  282. font-size: 28rpx;
  283. font-weight: bold;
  284. }
  285. .msg_address {
  286. color: #808080;
  287. font-size: 24rpx;
  288. display: -webkit-box;
  289. -webkit-box-orient: vertical;
  290. -webkit-line-clamp: 2;
  291. overflow: hidden;
  292. }
  293. }
  294. }
  295. .box_btn {
  296. display: flex;
  297. justify-content: space-around;
  298. align-items: center;
  299. height: 110rpx;
  300. .btn_item {
  301. display: flex;
  302. align-items: center;
  303. width: 200rpx;
  304. .img {
  305. margin-right: 14rpx;
  306. width: 38rpx;
  307. height: 38rpx;
  308. }
  309. .img2 {
  310. width: 66rpx;
  311. height: 66rpx;
  312. }
  313. }
  314. }
  315. }
  316. .body_box2 {
  317. display: flex;
  318. flex-direction: column;
  319. box-sizing: border-box;
  320. padding: 0 30rpx;
  321. margin-bottom: 20rpx;
  322. height: 478rpx;
  323. border-radius: 15rpx;
  324. background-color: #fff;
  325. .info_time {
  326. display: flex;
  327. align-items: center;
  328. margin-top: 20rpx;
  329. font-size: 32rpx;
  330. font-weight: bold;
  331. .time_line {
  332. width: 17rpx;
  333. height: 1rpx;
  334. background-color: #096562;
  335. }
  336. .time_num {
  337. box-sizing: border-box;
  338. padding: 0 15rpx;
  339. height: 46rpx;
  340. line-height: 46rpx;
  341. font-size: 24rpx;
  342. font-weight: 400;
  343. border-radius: 66rpx;
  344. border: 1rpx solid #096562;
  345. background-color: #f0f2f5;
  346. }
  347. .gap {
  348. margin: 0 10rpx;
  349. }
  350. text {
  351. font-size: 24rpx;
  352. font-weight: 400;
  353. }
  354. }
  355. .info_msg {
  356. margin-top: 15rpx;
  357. font-size: 28rpx;
  358. font-weight: bold;
  359. }
  360. .info_type {
  361. display: flex;
  362. flex-wrap: wrap;
  363. margin-top: 15rpx;
  364. .type_item {
  365. box-sizing: border-box;
  366. padding: 0 15rpx;
  367. margin-right: 20rpx;
  368. height: 41rpx;
  369. line-height: 41rpx;
  370. font-size: 24rpx;
  371. color: #fff;
  372. border-radius: 34rpx;
  373. background-color: #096562;
  374. }
  375. }
  376. .info_tag {
  377. display: flex;
  378. flex-wrap: wrap;
  379. margin: 18rpx 0 0;
  380. box-sizing: border-box;
  381. padding-bottom: 30rpx;
  382. color: #808080;
  383. font-size: 24rpx;
  384. border-bottom: 1rpx solid #e5e5e5;
  385. .tag_item {
  386. margin-right: 20rpx;
  387. }
  388. }
  389. .info_box {
  390. display: flex;
  391. margin-top: 23rpx;
  392. font-size: 28rpx;
  393. .box_key {
  394. width: 160rpx;
  395. color: #808080;
  396. }
  397. .box_value {
  398. }
  399. }
  400. }
  401. .body_btn {
  402. box-sizing: border-box;
  403. padding: 0 32rpx;
  404. margin-top: 140rpx;
  405. display: flex;
  406. justify-content: space-between;
  407. height: 96rpx;
  408. .btn_item {
  409. display: flex;
  410. justify-content: center;
  411. align-items: center;
  412. width: 300rpx;
  413. height: 96rpx;
  414. border-radius: 64rpx;
  415. font-size: 32rpx;
  416. }
  417. .type {
  418. color: #d43030;
  419. border: 1rpx solid #d43030;
  420. }
  421. .type2 {
  422. color: #fff;
  423. background-color: #096562;
  424. }
  425. }
  426. }
  427. }
  428. </style>