pay-faild.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="pay-result">
  3. <!-- 提示图标 -->
  4. <view class="tip-icon">
  5. <image class="icon" :src="staticUrl + 'icon-pay-fail.png'"></image>
  6. <view class="tip">订单支付失败~~</view>
  7. </view>
  8. <!-- 支付金额 -->
  9. <view class="payAmount">
  10. <text class="label">支付金额:</text>
  11. <text class="price">¥{{ orderInfo.payableAmount | priceFormat }}</text>
  12. </view>
  13. <!-- 执行操作 -->
  14. <view class="control">
  15. <tui-button type="base" width="600rpx" height="90rpx" shape="circle" :size="28" @click="onPayAgain">
  16. 重新支付
  17. </tui-button>
  18. <tui-button
  19. type="base"
  20. :plain="true"
  21. width="600rpx"
  22. height="90rpx"
  23. shape="circle"
  24. :size="28"
  25. @click="onSearch"
  26. >
  27. 查看订单
  28. </tui-button>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import wechatPayMixin from '@/pages/views/order/mixins/wechatPay.js'
  34. export default {
  35. mixins: [wechatPayMixin],
  36. data() {
  37. return {
  38. orderInfo: {
  39. collageId: '0',
  40. orderId: '18897',
  41. orderMark: '#18897#',
  42. orderNo: 'H164783438949249',
  43. payTotalFee: '0',
  44. payableAmount: '0'
  45. }
  46. }
  47. },
  48. beforeDestroy() {
  49. uni.removeStorageSync('PAY_ORDER_INFO')
  50. },
  51. onLoad() {
  52. this.orderInfo = uni.getStorageSync('PAY_ORDER_INFO')
  53. },
  54. methods: {
  55. onPayAgain() {
  56. this.miniWxPayFor(this.orderInfo)
  57. },
  58. onSearch() {
  59. this.$router.redirectTo('order/order-detail?orderId=' + this.orderInfo.orderId)
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .pay-result {
  66. height: 100vh;
  67. .tip-icon {
  68. @extend .cm-flex-center;
  69. flex-direction: column;
  70. height: 340rpx;
  71. background-color: #fff;
  72. .icon {
  73. width: 210rpx;
  74. height: 210rpx;
  75. }
  76. .tip {
  77. margin-top: 24rpx;
  78. font-size: 28rpx;
  79. font-weight: bold;
  80. color: #666;
  81. }
  82. }
  83. .payAmount {
  84. @extend .cm-flex-between;
  85. height: 90rpx;
  86. padding: 0 24rpx;
  87. margin-top: 24rpx;
  88. font-size: 28rpx;
  89. background-color: #fff;
  90. .label {
  91. color: #333333;
  92. }
  93. .price {
  94. color: #666666;
  95. }
  96. }
  97. .control {
  98. @extend .cm-flex-between;
  99. flex-direction: column;
  100. height: 204rpx;
  101. margin-top: 100rpx;
  102. }
  103. }
  104. </style>