SubmitConfirm.vue 4.0 KB

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