SubmitConfirm.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <u-popup v-model="showPopup" @close="closePopup" mode="center" border-radius="30" :width="width">
  3. <view class="submit-confirm">
  4. <view class="container-form">
  5. <view class="icon-wrapper">
  6. <image src="/static/tabbar/home2.png" class="tip-icon"></image>
  7. <text class="tip-text">温馨提示</text>
  8. </view>
  9. <view class="content">
  10. <view
  11. >目前回收订单在包裹签收后<span class="highlight">15天内</span
  12. >完成品相审核与打款,审核时效内<span class="highlight">勿催~</span>
  13. </view>
  14. <view class="mt-20"
  15. >为避免混单,影响审核到账时间,您需核对订单书籍,<span class="highlight">自行打包</span
  16. >后,交给取件员(<span class="highlight">包装上备注书嗨+物流单号</span
  17. >)。如随意放置包裹导致订单书籍遗失,平台概不负责。</view
  18. >
  19. <view class="mt-20"
  20. ><span class="highlight">卖书运费(不含包装费)由书嗨承担</span
  21. >,我们会安排京东、德邦或顺丰上门取件(不支持自寄和到付件),不需要您垫付运费。</view
  22. >
  23. </view>
  24. <view class="footer">
  25. <button class="cancel-btn" @click="handleCancel">取消</button>
  26. <button class="confirm-btn" :disabled="countdown > 0" @click="handleConfirm">
  27. 确定提交{{ countdown > 0 ? `(${countdown}s)` : "" }}
  28. </button>
  29. </view>
  30. </view>
  31. </view>
  32. </u-popup>
  33. </template>
  34. <script>
  35. export default {
  36. props: {
  37. width: {
  38. type: String,
  39. default: "92%",
  40. },
  41. },
  42. data() {
  43. return {
  44. showPopup: false,
  45. countdown: 15,
  46. };
  47. },
  48. methods: {
  49. openPopup() {
  50. this.showPopup = true;
  51. this.startCountdown();
  52. },
  53. closePopup() {
  54. this.showPopup = false;
  55. this.countdown = 15;
  56. },
  57. handleConfirm() {
  58. this.$emit("confirm");
  59. this.closePopup();
  60. },
  61. handleCancel() {
  62. this.$emit("cancel");
  63. this.closePopup();
  64. },
  65. startCountdown() {
  66. this.countdown = 15;
  67. const timer = setInterval(() => {
  68. if (this.countdown > 0) {
  69. this.countdown--;
  70. } else {
  71. clearInterval(timer);
  72. }
  73. }, 1000);
  74. },
  75. },
  76. };
  77. </script>
  78. <style lang="scss" scoped>
  79. .submit-confirm {
  80. background: #ffffff;
  81. border-radius: 26rpx;
  82. overflow: hidden;
  83. padding: 16rpx;
  84. background: linear-gradient(-90deg, #98e05f, #0de3ac);
  85. .container-form {
  86. background: #effcf3;
  87. border-radius: 26rpx;
  88. padding: 30rpx;
  89. padding-bottom: 40rpx;
  90. }
  91. .icon-wrapper {
  92. display: flex;
  93. align-items: center;
  94. justify-content: center;
  95. margin-bottom: 20rpx;
  96. .tip-icon {
  97. width: 48rpx;
  98. height: 48rpx;
  99. margin-right: 10rpx;
  100. }
  101. .tip-text {
  102. font-family: Source Han Sans CN;
  103. font-weight: bold;
  104. font-size: 36rpx;
  105. color: #37c148;
  106. }
  107. }
  108. .content {
  109. padding: 0 10rpx;
  110. font-size: 32rpx;
  111. color: #333333;
  112. line-height: 48rpx;
  113. view {
  114. font-size: 32rpx;
  115. }
  116. .highlight {
  117. color: #ff0000;
  118. }
  119. }
  120. .mt-20 {
  121. margin-top: 20rpx;
  122. }
  123. .footer {
  124. display: flex;
  125. gap: 30rpx;
  126. margin-top: 30rpx;
  127. padding: 0 10rpx;
  128. button {
  129. height: 88rpx;
  130. line-height: 88rpx;
  131. font-size: 32rpx;
  132. border: none;
  133. border-radius: 10rpx;
  134. &::after {
  135. border: none;
  136. }
  137. &.cancel-btn {
  138. flex: 1;
  139. background-color: #E3E3E3;
  140. color: #ffffff;
  141. width: 135rpx;
  142. }
  143. &.confirm-btn {
  144. flex: 2.5;
  145. width: 335rpx;
  146. background-color: #38c148;
  147. color: #ffffff;
  148. &:disabled {
  149. opacity: 0.7;
  150. }
  151. }
  152. }
  153. }
  154. }
  155. </style>