SubmitConfirm.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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="content">
  25. <view>春节回收订单提醒:</view>
  26. <view class="mt-20">
  27. <span class="highlight">2月7日16:00</span>后提交的订单,审核将延后至<span
  28. class="highlight">2月21日(正月初五)</span>复工后陆续处理。着急的小伙伴建议年后再下单~
  29. </view>
  30. <view class="mt-20">
  31. 提前祝大家新年快乐,前程似锦!
  32. </view>
  33. </view>
  34. <view class="footer">
  35. <button class="cancel-btn" @click="handleCancel">取消</button>
  36. <button class="confirm-btn" :disabled="countdown > 0" @click="handleConfirm">
  37. 确定提交{{ countdown > 0 ? `(${countdown}s)` : "" }}
  38. </button>
  39. </view>
  40. </view>
  41. </view>
  42. </u-popup>
  43. </template>
  44. <script>
  45. export default {
  46. props: {
  47. width: {
  48. type: String,
  49. default: "92%",
  50. },
  51. },
  52. data() {
  53. return {
  54. showPopup: false,
  55. countdown: 15,
  56. };
  57. },
  58. methods: {
  59. openPopup() {
  60. this.showPopup = true;
  61. this.startCountdown();
  62. },
  63. closePopup() {
  64. this.showPopup = false;
  65. this.countdown = 15;
  66. },
  67. handleConfirm() {
  68. this.$emit("confirm");
  69. this.closePopup();
  70. },
  71. handleCancel() {
  72. this.$emit("cancel");
  73. this.closePopup();
  74. },
  75. startCountdown() {
  76. this.countdown = 15;
  77. const timer = setInterval(() => {
  78. if (this.countdown > 0) {
  79. this.countdown--;
  80. } else {
  81. clearInterval(timer);
  82. }
  83. }, 1000);
  84. },
  85. },
  86. };
  87. </script>
  88. <style lang="scss" scoped>
  89. .submit-confirm {
  90. background: #ffffff;
  91. border-radius: 26rpx;
  92. overflow: hidden;
  93. padding: 16rpx;
  94. background: linear-gradient(-90deg, #98e05f, #0de3ac);
  95. .container-form {
  96. background: #effcf3;
  97. border-radius: 26rpx;
  98. padding: 30rpx;
  99. padding-bottom: 40rpx;
  100. }
  101. .icon-wrapper {
  102. display: flex;
  103. align-items: center;
  104. justify-content: center;
  105. margin-bottom: 20rpx;
  106. .tip-icon {
  107. width: 48rpx;
  108. height: 48rpx;
  109. margin-right: 10rpx;
  110. }
  111. .tip-text {
  112. font-family: Source Han Sans CN;
  113. font-weight: bold;
  114. font-size: 36rpx;
  115. color: #37c148;
  116. }
  117. }
  118. .content {
  119. padding: 0 10rpx;
  120. font-size: 32rpx;
  121. color: #333333;
  122. line-height: 48rpx;
  123. view {
  124. font-size: 32rpx;
  125. }
  126. .highlight {
  127. color: #ff0000;
  128. }
  129. }
  130. .mt-20 {
  131. margin-top: 20rpx;
  132. }
  133. .footer {
  134. display: flex;
  135. gap: 30rpx;
  136. margin-top: 30rpx;
  137. padding: 0 10rpx;
  138. button {
  139. height: 88rpx;
  140. line-height: 88rpx;
  141. font-size: 32rpx;
  142. border: none;
  143. border-radius: 10rpx;
  144. &::after {
  145. border: none;
  146. }
  147. &.cancel-btn {
  148. flex: 1;
  149. background-color: #E3E3E3;
  150. color: #ffffff;
  151. width: 135rpx;
  152. }
  153. &.confirm-btn {
  154. flex: 2.5;
  155. width: 335rpx;
  156. background-color: #38c148;
  157. color: #ffffff;
  158. &:disabled {
  159. opacity: 0.7;
  160. }
  161. }
  162. }
  163. }
  164. }
  165. </style>