result.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="bg">
  3. <app-layout :haveBackground="haveBackground">
  4. <view class="total dir-top-nowrap main-center cross-center">
  5. <view class="total-price">-{{detail.amount}}</view>
  6. <view>交易成功</view>
  7. </view>
  8. <view class="total-info">
  9. <view class="main-between cross-center total-item">
  10. <view class="label">原价</view>
  11. <view>¥{{detail.total_goods_original_price}}</view>
  12. </view>
  13. <view v-if="detail.member_discount_price != '0.00'" class="main-between cross-center total-item">
  14. <view class="label">会员折扣</view>
  15. <view>-¥{{detail.member_discount_price}}</view>
  16. </view>
  17. <view v-if="detail.integral_deduction_price != '0.00'" class="main-between cross-center total-item">
  18. <view class="label">积分抵扣</view>
  19. <view>-¥{{detail.integral_deduction_price}}</view>
  20. </view>
  21. <view v-if="detail.coupon_discount_price != '0.00'" class="main-between cross-center total-item">
  22. <view class="label">优惠券</view>
  23. <view>-¥{{detail.coupon_discount_price}}</view>
  24. </view>
  25. <view v-if="detail.full_reduce_price != '0.00'" class="main-between cross-center total-item">
  26. <view class="label">满减</view>
  27. <view>-¥{{detail.full_reduce_price}}</view>
  28. </view>
  29. <view v-if="detail.vip_card_discount != '0.00'" class="main-between cross-center total-item">
  30. <view class="label">超级会员卡</view>
  31. <view>-¥{{detail.vip_card_discount}}</view>
  32. </view>
  33. </view>
  34. <view class="total-info">
  35. <view class="main-between cross-center total-item">
  36. <view class="label">支付方式</view>
  37. <view>{{detail.pay_type}}</view>
  38. </view>
  39. <view class="main-between cross-center total-item">
  40. <view class="label">支付时间</view>
  41. <view>{{detail.created_at}}</view>
  42. </view>
  43. <view class="main-between cross-center total-item">
  44. <view class="label">交易单号</view>
  45. <view>{{detail.order_no}}</view>
  46. </view>
  47. </view>
  48. <view @click="toIndex" class="return-btn">返回首页</view>
  49. </app-layout>
  50. </view>
  51. </template>
  52. <script>
  53. import { mapState } from "vuex";
  54. export default {
  55. data() {
  56. return {
  57. detail: {}
  58. }
  59. },
  60. computed: {
  61. ...mapState({
  62. userInfo: state => state.user.info,
  63. })
  64. },
  65. methods: {
  66. toIndex() {
  67. uni.reLaunch({
  68. url:'/pages/index/index'
  69. })
  70. },
  71. },
  72. onLoad(options) {
  73. this.$request({
  74. url: this.$api.teller.search,
  75. data: {
  76. pay_code: options.code
  77. },
  78. method: 'post'
  79. }).then(response=>{
  80. this.$hideLoading();
  81. if(response.code == 0) {
  82. this.detail = response.data;
  83. }
  84. }).catch(response => {
  85. this.$hideLoading();
  86. });
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .bg {
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. width: 100%;
  96. height: 100%;
  97. background: #fff;
  98. padding: 0 #{24rpx};
  99. }
  100. .total {
  101. height: #{260rpx};
  102. width: 100%;
  103. color: #999999;
  104. font-size: #{28rpx};
  105. border-bottom: #{2rpx} solid #e2e2e2;
  106. .total-price {
  107. font-size: #{54rpx};
  108. color: #353535;
  109. margin-bottom: #{30rpx};
  110. }
  111. }
  112. .total-info {
  113. padding: #{10rpx} #{30rpx};
  114. font-size: #{28rpx};
  115. border-bottom: #{2rpx} solid #e2e2e2;
  116. .total-item {
  117. height: #{68rpx};
  118. .label {
  119. color: #999;
  120. }
  121. }
  122. }
  123. .return-btn {
  124. height: #{84rpx};
  125. border: #{2rpx} solid #ff4544;
  126. color: #ff4544;
  127. line-height: #{84rpx};
  128. width: 100%;
  129. font-size: #{28rpx};
  130. text-align: center;
  131. border-radius: #{42rpx};
  132. margin-top: #{80rpx};
  133. }
  134. </style>