error.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 | NumFormat }}</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. filters: {
  45. NumFormat(value) {
  46. //处理金额
  47. return Number(value).toFixed(2)
  48. }
  49. },
  50. computed: {
  51. ...mapGetters(['isIphoneX']),
  52. hanldOrder() {
  53. return {
  54. order: this.orderInfo
  55. }
  56. }
  57. },
  58. methods: {
  59. initOrderInfo() {
  60. this.orderInfo = uni.getStorageSync('orderInfo')
  61. uni.removeStorageSync('orderInfo')
  62. },
  63. // 查看订单
  64. searchOrder() {
  65. this.$api.redirectTo('/pages/order/order-detail?type=confim&orderId=' + this.orderInfo.orderId)
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. page {
  72. background-color: #f7f7f7;
  73. height: auto !important;
  74. }
  75. .container-cash {
  76. width: 100%;
  77. .container-wrapper {
  78. width: 100%;
  79. margin: 0 auto;
  80. margin-top: 120rpx;
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. background-color: #ffffff;
  85. .cash-icon {
  86. width: 210rpx;
  87. height: 210rpx;
  88. margin-top: 112rpx;
  89. image {
  90. width: 210rpx;
  91. height: 210rpx;
  92. }
  93. }
  94. .cash-text {
  95. font-size: $font-size-28;
  96. color: #666666;
  97. line-height: 104rpx;
  98. font-weight: bold;
  99. }
  100. }
  101. .container-money {
  102. width: 100%;
  103. height: 90rpx;
  104. float: left;
  105. line-height: 90rpx;
  106. font-size: $font-size-28;
  107. box-sizing: border-box;
  108. padding: 0 24rpx;
  109. margin-top: 20rpx;
  110. background-color: #ffffff;
  111. .label {
  112. float: left;
  113. color: #333333;
  114. }
  115. .money {
  116. float: right;
  117. color: #666666;
  118. }
  119. }
  120. .container-button {
  121. width: 100%;
  122. height: auto;
  123. float: left;
  124. display: flex;
  125. flex-direction: column;
  126. align-items: center;
  127. margin-top: 160rpx;
  128. .btn {
  129. width: 600rpx;
  130. height: 90rpx;
  131. border-radius: 45rpx;
  132. line-height: 90rpx;
  133. text-align: center;
  134. font-size: $font-size-26;
  135. color: #ffffff;
  136. box-sizing: border-box;
  137. border: 1px solid $color-system;
  138. margin-bottom: 24rpx;
  139. &.btn-open {
  140. color: $color-system;
  141. }
  142. &.btn-pay {
  143. border-color: $color-system;
  144. background: $btn-confirm;
  145. }
  146. }
  147. }
  148. }
  149. </style>