error.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="container cashier">
  3. <view class="container-cash clearfix">
  4. <view class="container-wrapper">
  5. <view class="cash-icon"><image :src="StaticUrl + 'icon-pay-fail.png'" mode=""></image></view>
  6. <view class="cash-text">
  7. <text>{{ successText }}</text>
  8. </view>
  9. </view>
  10. <view class="container-money">
  11. <view class="label">支付金额</view>
  12. <view class="money">¥{{ orderInfo.payableAmount | formatPrice }}</view>
  13. </view>
  14. <view class="container-button">
  15. <view class="btn btn-pay" @click="miniWxPayFor(orderInfo)">重新支付</view>
  16. <view class="btn btn-open" @click="searchOrder">查看订单</view>
  17. </view>
  18. </view>
  19. <cm-loading :visible="isSubLoading" :text="loadingText"></cm-loading>
  20. </view>
  21. </template>
  22. <script>
  23. import authorize from '@/common/authorize.js'
  24. import CmLoading from '@/components/cm-module/cm-loading/cm-loading.vue'
  25. import wechatPay from './mixins/wechatPay.js'
  26. import { mapGetters } from 'vuex'
  27. export default {
  28. components: {
  29. CmLoading
  30. },
  31. // 混入支付
  32. mixins: [wechatPay],
  33. data() {
  34. return {
  35. StaticUrl: this.$Static,
  36. orderId: '',
  37. successText: '订单支付失败',
  38. orderInfo: {}
  39. }
  40. },
  41. onLoad() {
  42. this.initOrderInfo()
  43. },
  44. computed: {
  45. ...mapGetters(['isIphoneX']),
  46. hanldOrder() {
  47. return {
  48. order: this.orderInfo
  49. }
  50. }
  51. },
  52. methods: {
  53. initOrderInfo() {
  54. this.orderInfo = uni.getStorageSync('orderInfo')
  55. uni.removeStorageSync('orderInfo')
  56. },
  57. // 查看订单
  58. searchOrder() {
  59. this.$api.redirectTo('/pages/order/order-detail?type=confim&orderId=' + this.orderInfo.orderId)
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. page {
  66. background-color: #f7f7f7;
  67. height: auto !important;
  68. }
  69. .container-cash {
  70. width: 100%;
  71. .container-wrapper {
  72. width: 100%;
  73. margin: 0 auto;
  74. margin-top: 120rpx;
  75. display: flex;
  76. flex-direction: column;
  77. align-items: center;
  78. background-color: #ffffff;
  79. .cash-icon {
  80. width: 210rpx;
  81. height: 210rpx;
  82. margin-top: 112rpx;
  83. image {
  84. width: 210rpx;
  85. height: 210rpx;
  86. }
  87. }
  88. .cash-text {
  89. font-size: $font-size-28;
  90. color: #666666;
  91. line-height: 104rpx;
  92. font-weight: bold;
  93. }
  94. }
  95. .container-money {
  96. width: 100%;
  97. height: 90rpx;
  98. float: left;
  99. line-height: 90rpx;
  100. font-size: $font-size-28;
  101. box-sizing: border-box;
  102. padding: 0 24rpx;
  103. margin-top: 20rpx;
  104. background-color: #ffffff;
  105. .label {
  106. float: left;
  107. color: #333333;
  108. }
  109. .money {
  110. float: right;
  111. color: #666666;
  112. }
  113. }
  114. .container-button {
  115. width: 100%;
  116. height: auto;
  117. float: left;
  118. display: flex;
  119. flex-direction: column;
  120. align-items: center;
  121. margin-top: 160rpx;
  122. .btn {
  123. width: 600rpx;
  124. height: 90rpx;
  125. border-radius: 45rpx;
  126. line-height: 90rpx;
  127. text-align: center;
  128. font-size: $font-size-26;
  129. color: #ffffff;
  130. box-sizing: border-box;
  131. border: 1px solid $color-system;
  132. margin-bottom: 24rpx;
  133. &.btn-open {
  134. color: $color-system;
  135. }
  136. &.btn-pay {
  137. border-color: $color-system;
  138. background: $btn-confirm;
  139. }
  140. }
  141. }
  142. }
  143. </style>