order-res.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <template>
  2. <view v-if="loading">
  3. <u-modal v-model="loading" :show-title="false" :show-confirm-button="false">
  4. <view class="slot-content center flex-direction">
  5. <image class="loading-icon" src="../../static/pay/loading.png"></image>
  6. <view class="tips center">处理中</view>
  7. </view>
  8. </u-modal>
  9. </view>
  10. <view v-else class="check-panel flex-direction">
  11. <image src="../../static/pay/success.png"></image>
  12. <view class="text-status center">付款成功</view>
  13. <view class="order-des center">{{orderDes}}</view>
  14. <view class=" fee center">¥{{amount}}</view>
  15. <button class="finish" @click="backToHome">完成</button>
  16. <view class="bottom-line center">联兑通提供技术支持</view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. onLoad(option) {
  22. this.timer = setInterval(this.queryOrderStatus,500);
  23. },
  24. data() {
  25. return {
  26. counter: 0,
  27. timer: null,
  28. loading: true,
  29. amount: 100,
  30. orderDes: '扫码付款'
  31. }
  32. },
  33. methods: {
  34. queryOrderStatus(){
  35. this.counter++;
  36. console.log("轮询订单状态!");
  37. if(this.counter>10){
  38. clearInterval(this.timer);
  39. this.loading = false;
  40. }
  41. },
  42. backToHome(){
  43. uni.switchTab({
  44. url: '/pages/mine/mine'
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss" scoped>
  51. .check-panel{
  52. background-color: #FFFFFF;
  53. border-radius: 25rpx;
  54. width: 90%;
  55. min-height: 900rpx;
  56. margin: 20rpx 5%;
  57. image{
  58. width: 150rpx;
  59. height: 150rpx;
  60. margin-top: 100rpx;
  61. margin-left: calc(50% - 75rpx);
  62. }
  63. .order-des{
  64. margin-top: 100rpx;
  65. color: #575959;
  66. width: 100%;
  67. font-size: 30rpx;
  68. letter-spacing: 2rpx;
  69. height: 100rpx;
  70. }
  71. .fee{
  72. height: 80rpx;
  73. width: 100%;
  74. color: #484a4b;
  75. font-size: 80rpx;
  76. // font-style: italic;
  77. font-weight: 350;
  78. }
  79. .text-status{
  80. color: #E1961A;
  81. height: 70rpx;
  82. width: 100%;
  83. }
  84. .finish{
  85. position: absolute;
  86. width: 40%;
  87. left: 30%;
  88. bottom: 15%;
  89. color: #E1961A;
  90. border-color: #E1961A ;
  91. letter-spacing: 20rpx;
  92. background: transparent ;
  93. }
  94. }
  95. .slot-content{
  96. height: 300rpx;
  97. .loading-icon{
  98. width: 100rpx;
  99. height: 100rpx;
  100. animation: round 1s infinite linear;
  101. }
  102. .tips{
  103. height: 80rpx;
  104. color: #565757;
  105. }
  106. }
  107. .bottom-line{
  108. position: absolute;
  109. bottom: 50rpx;
  110. left: 0;
  111. width: 100%;
  112. color: #dddddd;
  113. }
  114. @keyframes round {
  115. from{
  116. transform: rotate(360deg);
  117. }
  118. }
  119. </style>