ServiceGuarantee.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <u-popup v-model="showPopup" @close="closePopup" @open="openPopup" mode="center" border-radius="20">
  3. <view class="popup-content">
  4. <view class="popup-title">服务保障</view>
  5. <view class="guarantee-list">
  6. <!-- 免费退回 -->
  7. <view class="guarantee-item">
  8. <view class="item-header">
  9. <image src="/static/img/1-1.png" mode="widthFix" class="item-icon"></image>
  10. <text class="item-title">免费退回</text>
  11. </view>
  12. <view class="item-desc">本单不合格书籍可免费退回,您可在订单审核完成后,提交申请退回。</view>
  13. </view>
  14. <!-- 5天验 -->
  15. <view class="guarantee-item">
  16. <view class="item-header">
  17. <image src="/static/img/1-2.png" mode="widthFix" class="item-icon"></image>
  18. <text class="item-title">{{ verifyPeriodLabel }}</text>
  19. </view>
  20. <view class="item-desc">本单获得{{ verifyPeriodLabel }}资格,订单将在到仓签收后{{ verifyCompleteDays }}天内验货完毕,未完成验货将获得3元补贴到余额,可随验货书款一起提现。</view>
  21. </view>
  22. <!-- 极速打款 -->
  23. <view class="guarantee-item">
  24. <view class="item-header">
  25. <image src="/static/img/1-3.png" mode="widthFix" class="item-icon"></image>
  26. <text class="item-title">极速打款</text>
  27. </view>
  28. <view class="item-desc">余额提现后,将在24小时内到账。</view>
  29. </view>
  30. <!-- 卖亏必赔 -->
  31. <view class="guarantee-item">
  32. <view class="item-header">
  33. <image src="/static/img/1-4.png" mode="widthFix" class="item-icon"></image>
  34. <text class="item-title">卖亏必赔</text>
  35. </view>
  36. <view class="item-desc">订单完成后15天内,若发现订单内所售书籍发生涨价,可以申请补差。</view>
  37. </view>
  38. </view>
  39. <button class="confirm-btn" @click="closePopup">确定</button>
  40. </view>
  41. </u-popup>
  42. </template>
  43. <script>
  44. export default {
  45. props: {
  46. verifyPeriodDays: {
  47. type: [Number, String],
  48. default: null,
  49. },
  50. },
  51. computed: {
  52. /** 结算时效展示:15/7 天验,未选默认 5 天验 */
  53. verifyPeriodDisplayDays() {
  54. const days = Number(this.verifyPeriodDays)
  55. if (days === 15) return 15
  56. if (days === 7) return 7
  57. return 7
  58. },
  59. verifyPeriodLabel() {
  60. return `${this.verifyPeriodDisplayDays}天验`
  61. },
  62. /** 验货完成时限:15 天验为 15 天内,7 天验或未选为 7 天内 */
  63. verifyCompleteDays() {
  64. return Number(this.verifyPeriodDays) === 15 ? 15 : 7
  65. },
  66. },
  67. data() {
  68. return {
  69. showPopup: false
  70. };
  71. },
  72. methods: {
  73. openPopup() {
  74. this.showPopup = true;
  75. },
  76. closePopup() {
  77. this.showPopup = false;
  78. }
  79. }
  80. };
  81. </script>
  82. <style lang="scss">
  83. .popup-content {
  84. background: #FFFFFF;
  85. padding: 30rpx;
  86. width: 600rpx;
  87. border-radius: 20rpx;
  88. padding-left: 46rpx;
  89. .popup-title {
  90. font-size: 34rpx;
  91. color: #333333;
  92. font-weight: 600;
  93. text-align: center;
  94. margin-bottom: 30rpx;
  95. }
  96. .guarantee-list {
  97. .guarantee-item {
  98. margin-bottom: 30rpx;
  99. .item-header {
  100. display: flex;
  101. align-items: center;
  102. margin-bottom: 10rpx;
  103. .item-icon {
  104. width: 28rpx;
  105. height: 28rpx;
  106. }
  107. .item-title {
  108. font-size: 30rpx;
  109. color: #333333;
  110. font-weight: 600;
  111. margin-left: 10rpx;
  112. }
  113. }
  114. .item-desc {
  115. font-size: 26rpx;
  116. color: #333333;
  117. font-weight: 400;
  118. line-height: 1.5;
  119. }
  120. }
  121. }
  122. .confirm-btn {
  123. width: 280rpx;
  124. height: 80rpx;
  125. line-height: 80rpx;
  126. background-color: #4CD964;
  127. color: #FFFFFF;
  128. font-size: 32rpx;
  129. border-radius: 10rpx;
  130. border: none;
  131. margin-top: 20rpx;
  132. margin-left: 50%;
  133. transform: translateX(-50%);
  134. }
  135. }
  136. </style>