order-res.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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">{{orderDetail.billsTitle}}</view>
  14. <view class=" fee center">¥{{orderDetail.payAmount}}</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(options) {
  22. this.orderId=options.orderId
  23. this.timer = setInterval(this.queryOrderStatus,500);
  24. },
  25. data() {
  26. return {
  27. orderId:'',//订单id
  28. counter: 0,
  29. timer: null,
  30. loading: true,
  31. orderDetail:{},
  32. paySuccess:false
  33. }
  34. },
  35. methods: {
  36. async queryOrderStatus(){
  37. let res=await this.$api.billRecord.detail({id:this.orderId})
  38. if(res.data.payStatus==this.$global.payStatus.IS_PAY){
  39. this.orderDetail=res.data
  40. //已支付
  41. clearInterval(this.timer)
  42. this.loading = false
  43. this.paySuccess=true
  44. return
  45. }
  46. this.counter++;
  47. if(this.counter>10){
  48. clearInterval(this.timer)
  49. this.loading = false
  50. this.paySuccess=false
  51. }
  52. },
  53. backToHome(){
  54. uni.switchTab({
  55. url: '/pages/mine/mine'
  56. })
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .check-panel{
  63. background-color: #FFFFFF;
  64. border-radius: 25rpx;
  65. width: 90%;
  66. min-height: 900rpx;
  67. margin: 20rpx 5%;
  68. image{
  69. width: 150rpx;
  70. height: 150rpx;
  71. margin-top: 100rpx;
  72. margin-left: calc(50% - 75rpx);
  73. }
  74. .order-des{
  75. margin-top: 100rpx;
  76. color: #575959;
  77. width: 100%;
  78. font-size: 30rpx;
  79. letter-spacing: 2rpx;
  80. height: 100rpx;
  81. }
  82. .fee{
  83. height: 80rpx;
  84. width: 100%;
  85. color: #484a4b;
  86. font-size: 80rpx;
  87. // font-style: italic;
  88. font-weight: 350;
  89. }
  90. .text-status{
  91. color: #E1961A;
  92. height: 70rpx;
  93. width: 100%;
  94. }
  95. .finish{
  96. position: absolute;
  97. width: 40%;
  98. left: 30%;
  99. bottom: 25%;
  100. color: #E1961A;
  101. border-color: #E1961A ;
  102. letter-spacing: 20rpx;
  103. background: transparent ;
  104. }
  105. }
  106. .slot-content{
  107. height: 300rpx;
  108. .loading-icon{
  109. width: 100rpx;
  110. height: 100rpx;
  111. animation: round 1s infinite linear;
  112. }
  113. .tips{
  114. height: 80rpx;
  115. color: #565757;
  116. }
  117. }
  118. .bottom-line{
  119. position: absolute;
  120. bottom: 50rpx;
  121. left: 0;
  122. width: 100%;
  123. color: #dddddd;
  124. }
  125. @keyframes round {
  126. from{
  127. transform: rotate(360deg);
  128. }
  129. }
  130. </style>