withdrawal-progress.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <u-popup
  3. v-model="popupShow"
  4. mode="center"
  5. border-radius="30"
  6. :mask-close-able="true"
  7. @close="handleClose"
  8. width="86%"
  9. >
  10. <view class="modal-content">
  11. <view class="container-form">
  12. <!-- Header with progress title -->
  13. <view class="icon-wrapper">
  14. <image src="/static/tabbar/home2.png" class="tip-icon"></image>
  15. <text class="tip-text">提现进度</text>
  16. </view>
  17. <!-- Progress steps -->
  18. <view class="progress-steps">
  19. <!-- Step 1: 申请提现 -->
  20. <view class="step-item completed">
  21. <u-icon class="step-icon yuan-icon" name="red-packet" color="#ffffff" size="40"></u-icon>
  22. <view class="step-label">申请提现</view>
  23. </view>
  24. <!-- Arrow 1 -->
  25. <view class="step-arrow">
  26. <text class="arrow-text">→</text>
  27. </view>
  28. <!-- Step 2: 后台审核 -->
  29. <view
  30. class="step-item"
  31. :class="{ completed: orderInfo.status > 1, current: orderInfo.status == 1 }"
  32. >
  33. <u-icon class="step-icon yuan-icon" name="account" color="#ffffff" size="40"></u-icon>
  34. <view class="step-label">后台审核</view>
  35. </view>
  36. <!-- Arrow 2 -->
  37. <view class="step-arrow">
  38. <text class="arrow-text">→</text>
  39. </view>
  40. <!-- Step 3: 申请人确认 -->
  41. <view
  42. class="step-item"
  43. :class="{ completed: orderInfo.status > 2, current: orderInfo.status == 2 }"
  44. >
  45. <u-icon class="step-icon yuan-icon" name="checkmark-circle" color="#ffffff" size="40"></u-icon>
  46. <view class="step-label">申请人确认</view>
  47. </view>
  48. </view>
  49. <!-- Action button - based on status -->
  50. <view class="action-button" @click="handleAction">
  51. <!-- Status 1: 知道了 button -->
  52. <text v-if="orderInfo.status == 1">知道了</text>
  53. <!-- Status 2: 确认立即到账 button -->
  54. <text v-else-if="orderInfo.status == 2">确认立即到账</text>
  55. </view>
  56. </view>
  57. </view>
  58. </u-popup>
  59. </template>
  60. <script>
  61. export default {
  62. name: "WithdrawalProgress",
  63. props: {
  64. orderInfo: {
  65. type: Object,
  66. default: () => ({
  67. status: 1,
  68. orderNo: "",
  69. }),
  70. },
  71. },
  72. data() {
  73. return {
  74. popupShow: false,
  75. };
  76. },
  77. methods: {
  78. // Open modal
  79. openModal() {
  80. this.popupShow = true;
  81. },
  82. // Close modal
  83. handleClose() {
  84. this.popupShow = false;
  85. },
  86. // Handle button action based on status
  87. handleAction() {
  88. if (this.orderInfo.status == 1) {
  89. // For status 1: Close the modal for "知道了" button
  90. this.popupShow = false;
  91. } else if (this.orderInfo.status == 2) {
  92. // For status 2: Emit confirm event for "确认立即到账" button
  93. this.$emit("confirm", this.orderInfo);
  94. }
  95. },
  96. },
  97. };
  98. </script>
  99. <style lang="scss" scoped>
  100. .modal-content {
  101. background: linear-gradient(-90deg, #98e05f, #0de3ac);
  102. border-radius: 26rpx;
  103. overflow: hidden;
  104. padding: 16rpx;
  105. .container-form {
  106. background: #effcf3;
  107. border-radius: 26rpx;
  108. padding: 30rpx;
  109. padding-bottom: 40rpx;
  110. display: flex;
  111. flex-direction: column;
  112. align-items: center;
  113. }
  114. }
  115. .icon-wrapper {
  116. display: flex;
  117. align-items: center;
  118. justify-content: center;
  119. margin-bottom: 60rpx;
  120. .tip-icon {
  121. width: 48rpx;
  122. height: 48rpx;
  123. margin-right: 10rpx;
  124. }
  125. .tip-text {
  126. font-family: Source Han Sans CN;
  127. font-weight: bold;
  128. font-size: 36rpx;
  129. color: #37c148;
  130. }
  131. }
  132. .progress-steps {
  133. display: flex;
  134. align-items: center;
  135. justify-content: space-between;
  136. width: 100%;
  137. margin-bottom: 50rpx;
  138. padding: 0 20rpx;
  139. .step-item {
  140. display: flex;
  141. flex-direction: column;
  142. align-items: center;
  143. position: relative;
  144. width: 25%;
  145. .step-icon {
  146. width: 80rpx;
  147. height: 80rpx;
  148. border-radius: 50%;
  149. background-color: #cccccc;
  150. display: flex;
  151. align-items: center;
  152. justify-content: center;
  153. font-size: 32rpx;
  154. color: #ffffff;
  155. margin-bottom: 20rpx;
  156. transition: all 0.3s ease;
  157. &.yuan-icon {
  158. font-size: 40rpx;
  159. font-weight: bold;
  160. }
  161. .icon-text {
  162. font-size: 36rpx;
  163. font-weight: 500;
  164. color: #ffffff;
  165. }
  166. }
  167. .step-label {
  168. font-size: 26rpx;
  169. color: #999999;
  170. text-align: center;
  171. transition: all 0.3s ease;
  172. }
  173. &.completed {
  174. .step-icon {
  175. background-color: #37c148;
  176. }
  177. .step-label {
  178. color: #37c148;
  179. font-weight: 500;
  180. }
  181. }
  182. // &.current {
  183. // .step-icon {
  184. // background-color: #37c148;
  185. // box-shadow: 0 0 10rpx rgba(55, 193, 72, 0.5);
  186. // transform: scale(1.05);
  187. // }
  188. // .step-label {
  189. // color: #37c148;
  190. // font-weight: bold;
  191. // transform: scale(1.05);
  192. // }
  193. // }
  194. }
  195. .step-arrow {
  196. width: 12.5%;
  197. display: flex;
  198. align-items: center;
  199. justify-content: center;
  200. .arrow-text {
  201. font-size: 36rpx;
  202. color: #dddddd;
  203. }
  204. }
  205. }
  206. .action-button {
  207. width: 90%;
  208. height: 90rpx;
  209. background-color: #37c148;
  210. border-radius: 45rpx;
  211. display: flex;
  212. align-items: center;
  213. justify-content: center;
  214. margin-top: 20rpx;
  215. box-shadow: 0 6rpx 10rpx rgba(55, 193, 72, 0.2);
  216. transition: all 0.2s ease;
  217. &:active {
  218. transform: scale(0.98);
  219. opacity: 0.9;
  220. }
  221. text {
  222. color: #fff;
  223. font-size: 32rpx;
  224. font-weight: 500;
  225. }
  226. }
  227. </style>