paySuccess.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. }
  23. },
  24. onLoad(options) {
  25. this.orderId = options.orderId
  26. setTimeout(() => {
  27. uni.redirectTo({
  28. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  29. });
  30. },3000)
  31. },
  32. methods: {
  33. // 查看订单
  34. goToOrderList() {
  35. // uni.navigateTo({
  36. // url: '/pagesMain/orderList?type=1'
  37. // });
  38. uni.navigateTo({
  39. url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 2
  40. });
  41. },
  42. // 返回首页
  43. goToIndex() {
  44. uni.switchTab({
  45. url: '/pages/index/index'
  46. });
  47. },
  48. }
  49. }
  50. </script>
  51. <style lang="less" scoped>
  52. page {
  53. width: 100%;
  54. height: 100%;
  55. }
  56. .container {
  57. width: 100%;
  58. height: 100%;
  59. background-color: #F3F3F3;
  60. position: absolute;
  61. .pay-icon {
  62. width: 100%;
  63. height: 120px;
  64. margin-top: 50px;
  65. float: left;
  66. text-align: center;
  67. .iconqueding {
  68. color: #52A63A;
  69. font-size: 120px;
  70. font-size: 240px;
  71. line-height: 120px;
  72. }
  73. }
  74. .pay-title {
  75. width: 100%;
  76. height: 20px;
  77. float: left;
  78. margin: 16px 0 20px 0;
  79. font-size: 16px;
  80. font-family: PingFang SC;
  81. color: #333333;
  82. line-height: 20px;
  83. text-align: center;
  84. }
  85. .pay-text {
  86. width: 100%;
  87. float: left;
  88. box-sizing: border-box;
  89. padding: 0 60px;
  90. font-size: 13px;
  91. font-family: PingFang SC;
  92. color: #666666;
  93. line-height: 22px;
  94. text-align: center;
  95. }
  96. .pay-handle {
  97. width: 230px;
  98. height: 100px;
  99. float: left;
  100. position: absolute;
  101. bottom: 60px;
  102. left: 50%;
  103. transform: translateX(-50%);
  104. .button1 {
  105. /deep/button {
  106. background-color: #56a83a !important;
  107. border: none !important;
  108. }
  109. margin-bottom: 12px;
  110. float: left;
  111. width: 100%;
  112. height: 34px;
  113. }
  114. .button2 {
  115. /deep/button {
  116. background-color: #74bd60 !important;
  117. border: none !important;
  118. color: white !important;
  119. }
  120. float: left;
  121. width: 100%;
  122. height: 34px;
  123. }
  124. }
  125. }
  126. </style>