pay-success.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="pay-result">
  3. <!-- 提示图标 -->
  4. <view class="tip-icon">
  5. <image class="icon" :src="staticUrl + 'icon-pay-success.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="toBuy">
  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 class="share"> <text class="btn-tip">分享后可获得优惠券领取资格</text> </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. orderInfo: {
  38. collageId: '0',
  39. orderId: '18897',
  40. orderMark: '#18897#',
  41. orderNo: 'H164783438949249',
  42. payTotalFee: '0',
  43. payableAmount: '0'
  44. }
  45. }
  46. },
  47. beforeDestroy() {
  48. uni.removeStorageSync('PAY_ORDER_INFO')
  49. },
  50. onLoad() {
  51. this.orderInfo = uni.getStorageSync('PAY_ORDER_INFO')
  52. },
  53. methods: {
  54. toBuy() {
  55. this.$router.switchTab('home')
  56. },
  57. onSearch() {
  58. this.$router.redirectTo('order/order-list')
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .pay-result {
  65. height: 100vh;
  66. .tip-icon {
  67. @extend .cm-flex-center;
  68. flex-direction: column;
  69. background-color: #fff;
  70. height: 340rpx;
  71. .icon {
  72. width: 210rpx;
  73. height: 210rpx;
  74. }
  75. .tip {
  76. margin-top: 24rpx;
  77. font-size: 28rpx;
  78. font-weight: bold;
  79. color: #666;
  80. }
  81. }
  82. .payAmount {
  83. @extend .cm-flex-between;
  84. height: 90rpx;
  85. padding: 0 24rpx;
  86. margin-top: 24rpx;
  87. background-color: #fff;
  88. font-size: 28rpx;
  89. .label {
  90. color: #333333;
  91. }
  92. .price {
  93. color: #666666;
  94. }
  95. }
  96. .control {
  97. @extend .cm-flex-between;
  98. flex-direction: column;
  99. height: 280rpx;
  100. margin-top: 150rpx;
  101. .share {
  102. color: #ff457b;
  103. .btn-tip {
  104. font-size: 24rpx;
  105. }
  106. }
  107. }
  108. }
  109. </style>