paySuccess.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="container">
  3. <view class="pay-icon">
  4. <view class="iconfont iconqueding"></view>
  5. </view>
  6. <view class="pay-title">支付成功</view>
  7. <view class="pay-text">您已支付成功,您所购买的商品正在向您飞奔, 请耐心等待!</view>
  8. <view class="pay-text">3秒后自动跳转订单详情...</view>
  9. <view class="pay-handle">
  10. <u-button type="success" shape="circle" :ripple="true" @click="goToOrderList()" class="button1">查看订单</u-button>
  11. <u-button type="success" shape="circle" :ripple="true" :hair-line="false" :plain="true" @click="goToIndex()" class="button2">返回首页</u-button>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. const NET = require('@/utils/request')
  17. const API = require('@/config/api')
  18. export default {
  19. data() {
  20. return {
  21. orderId: '',
  22. timeoutID:0
  23. }
  24. },
  25. onLoad(options) {
  26. this.orderId = options.orderId
  27. this.timeoutID = setTimeout(() => {
  28. uni.redirectTo({
  29. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  30. });
  31. },3000)
  32. },
  33. methods: {
  34. // 查看订单
  35. goToOrderList() {
  36. // uni.navigateTo({
  37. // url: '/pagesMain/orderList?type=1'
  38. // });
  39. clearTimeout(this.timeoutID)
  40. uni.navigateTo({
  41. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  42. });
  43. },
  44. // 返回首页
  45. goToIndex() {
  46. clearTimeout(this.timeoutID)
  47. uni.switchTab({
  48. url: '/pages/index/index'
  49. });
  50. },
  51. }
  52. }
  53. </script>
  54. <style lang="less" scoped>
  55. page {
  56. width: 100%;
  57. height: 100%;
  58. }
  59. .container {
  60. width: 100%;
  61. height: 100%;
  62. background-color: #F3F3F3;
  63. position: absolute;
  64. .pay-icon {
  65. width: 100%;
  66. height: 120px;
  67. margin-top: 50px;
  68. float: left;
  69. text-align: center;
  70. .iconqueding {
  71. color: #52A63A;
  72. font-size: 120px;
  73. font-size: 240px;
  74. line-height: 120px;
  75. }
  76. }
  77. .pay-title {
  78. width: 100%;
  79. height: 20px;
  80. float: left;
  81. margin: 16px 0 20px 0;
  82. font-size: 16px;
  83. font-family: PingFang SC;
  84. color: #333333;
  85. line-height: 20px;
  86. text-align: center;
  87. }
  88. .pay-text {
  89. width: 100%;
  90. float: left;
  91. box-sizing: border-box;
  92. padding: 0 60px;
  93. font-size: 13px;
  94. font-family: PingFang SC;
  95. color: #666666;
  96. line-height: 22px;
  97. text-align: center;
  98. }
  99. .pay-handle {
  100. width: 230px;
  101. height: 100px;
  102. float: left;
  103. position: absolute;
  104. bottom: 60px;
  105. left: 50%;
  106. transform: translateX(-50%);
  107. .button1 {
  108. /deep/button {
  109. background-color: #56a83a !important;
  110. border: none !important;
  111. }
  112. margin-bottom: 12px;
  113. float: left;
  114. width: 100%;
  115. height: 34px;
  116. }
  117. .button2 {
  118. /deep/button {
  119. background-color: #74bd60 !important;
  120. border: none !important;
  121. color: white !important;
  122. }
  123. float: left;
  124. width: 100%;
  125. height: 34px;
  126. }
  127. }
  128. }
  129. </style>