推拿小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
2.5 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" color="#fff" />
  4. <view class="page-content">
  5. <view class="page-label">订单详情</view>
  6. <!-- 商品详情 -->
  7. <productCard :data="orderDetail.massageItem" size="medium" :readonly="true"></productCard>
  8. <view class="info">
  9. <view class="info-header">订单信息</view>
  10. <view class="info-content">
  11. <view class="flex info-row">
  12. <text>实付款</text>
  13. <text class="price"><text class="price-unit">¥</text>{{ orderDetail.amount }}</text>
  14. </view>
  15. <view class="flex info-row">
  16. <text>订单号</text>
  17. <text>{{ orderDetail.id }}</text>
  18. </view>
  19. <view class="flex info-row">
  20. <text>付款时间</text>
  21. <text>{{ orderDetail.payTime }}</text>
  22. </view>
  23. <view class="flex info-row">
  24. <text>核销时间</text>
  25. <text>{{ orderDetail.validTime }}</text>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import productCard from '@/components/product/productCard.vue'
  34. import {
  35. mapState
  36. } from 'vuex'
  37. export default {
  38. components: {
  39. productCard
  40. },
  41. computed: {},
  42. data() {
  43. return {
  44. id: null,
  45. orderDetail: {},
  46. }
  47. },
  48. onLoad(args) {
  49. this.id = args.id
  50. this.fetchOrderDetail()
  51. },
  52. onPullDownRefresh() {
  53. this.fetchOrderDetail()
  54. },
  55. methods: {
  56. async fetchOrderDetail() {
  57. try {
  58. this.orderDetail = await this.$fetch('queryOrderById', { id: this.id })
  59. } catch (err) {
  60. }
  61. uni.stopPullDownRefresh()
  62. },
  63. }
  64. }
  65. </script>
  66. <style scoped lang="scss">
  67. .page {
  68. height: 100vh;
  69. background-color: #FFFFFF;
  70. /deep/ .nav-bar__view {
  71. background-image: linear-gradient(#84A73F, #D8FF8F);
  72. }
  73. /deep/ .product-card__view {
  74. padding: 19rpx 7rpx 28rpx 7rpx !important;
  75. }
  76. &-content {
  77. padding: 35rpx 46rpx;
  78. }
  79. &-label {
  80. color: #000000;
  81. font-size: 28rpx;
  82. padding-left: 11rpx;
  83. position: relative;
  84. margin-left: 7rpx;
  85. &:before {
  86. content: ' ';
  87. width: 5rpx;
  88. height: 40rpx;
  89. background-image: linear-gradient(#84A73F, #D8FF8F);
  90. border-radius: 3rpx;
  91. position: absolute;
  92. left: 0;
  93. }
  94. }
  95. }
  96. .info {
  97. padding: 30rpx 7rpx;
  98. border-top: 1px dashed #707070;
  99. color: #999999;
  100. font-size: 22rpx;
  101. &-header {
  102. color: #000000;
  103. font-size: 28rpx;
  104. }
  105. &-row {
  106. justify-content: space-between;
  107. margin-top: 23rpx;
  108. }
  109. .price {
  110. color: #000000;
  111. &-unit {
  112. font-size: 14rpx;
  113. }
  114. }
  115. }
  116. </style>