orderStatus.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="container">
  3. <view class="backHeader">
  4. <image class="backIcon" src="../../../static/index/convenient-services/return.png" @click="goBack"></image>
  5. <text class="pageTitle">订单状态</text>
  6. </view>
  7. <view class="statusBox">
  8. <view class="orderStatus">
  9. <image class="statusIcon" :src="statusImgSrc[Number(orderStatus)]"></image>
  10. <text class="statusTitle">{{ (istopUp ? '充值' : '转赠') + (orderStatus ? '成功' : '失败') }}</text>
  11. </view>
  12. <image class="orderType" :src="imgSrc[Number(istopUp)]"></image>
  13. <view class="orderForm">{{ istopUp ? '代金券充值-平台充值' : '代金券转赠-平台转赠' }}</view>
  14. <view class="orderCount">{{ count }}</view>
  15. <button class="goBackFn" @click="goBack">{{ istopUp ? '再次充值' : '再次转赠' }}</button>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. name: 'OrderStatus',
  22. data() {
  23. return {
  24. count: 0,
  25. istopUp: false,
  26. orderStatus: true,
  27. imgSrc: [require('../../../static/images/user/voucher/zhuan.png'), require('../../../static/images/user/voucher/chon.png')],
  28. statusImgSrc: [require('../../../static/images/user/voucher/error.png'), require('../../../static/images/user/voucher/great.png')]
  29. }
  30. },
  31. onLoad(options) {
  32. console.log(options)
  33. this.count = Number(options.count)
  34. this.istopUp = Boolean(Number(options.istopUp))
  35. this.orderStatus = Boolean(Number(options.orderStatus))
  36. // console.log(this.count,this.istopUp,this.orderStatus);
  37. },
  38. methods: {
  39. goBack() {
  40. uni.navigateBack()
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .container {
  47. width: 100vw;
  48. height: 100vh;
  49. background-color: #F5F5F5;
  50. .backHeader {
  51. position: relative;
  52. width: 750rpx;
  53. height: 88rpx;
  54. background-color: #F6F6F8;
  55. display: flex;
  56. align-items: center;
  57. .backIcon {
  58. width: 60rpx;
  59. height: 60rpx;
  60. }
  61. .pageTitle {
  62. font-family: 思源黑体;
  63. font-size: 32rpx;
  64. font-weight: 600;
  65. line-height: 44rpx;
  66. letter-spacing: 0.32rpx;
  67. color: #222229;
  68. position: absolute;
  69. left: 50%;
  70. transform: translateX(-50%);
  71. }
  72. }
  73. .statusBox {
  74. width: 750rpx;
  75. height: 750rpx;
  76. background: #FFFFFF;
  77. display: flex;
  78. flex-direction: column;
  79. align-items: center;
  80. .orderStatus {
  81. margin-top: 126rpx;
  82. display: flex;
  83. align-items: center;
  84. .statusIcon {
  85. width: 52rpx;
  86. height: 52rpx;
  87. border-radius: 50%;
  88. }
  89. .statusTitle {
  90. margin-left: 10rpx;
  91. font-family: Source Han Sans;
  92. font-size: 36rpx;
  93. font-weight: normal;
  94. line-height: 40rpx;
  95. text-align: center;
  96. font-feature-settings: "kern" on;
  97. color: #208F57;
  98. }
  99. }
  100. .orderType {
  101. margin-top: 74rpx;
  102. width: 90rpx;
  103. height: 90rpx;
  104. border-radius: 50%;
  105. background: #3982F1;
  106. }
  107. .orderForm {
  108. margin-top: 24rpx;
  109. font-size: 36rpx;
  110. line-height: 40rpx;
  111. text-align: center;
  112. font-feature-settings: "kern" on;
  113. color: #222229;
  114. }
  115. .orderCount {
  116. margin-top: 32rpx;
  117. font-size: 52rpx;
  118. font-weight: 500;
  119. line-height: 40rpx;
  120. text-align: center;
  121. font-feature-settings: "kern" on;
  122. color: #222229;
  123. }
  124. .goBackFn {
  125. margin-top: 104rpx;
  126. width: 216rpx;
  127. height: 88rpx;
  128. border-radius: 50rpx;
  129. font-family: Source Han Sans;
  130. font-size: 32rpx;
  131. line-height: 88rpx;
  132. font-weight: normal;
  133. }
  134. }
  135. }
  136. </style>