KindReminder.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <u-popup v-model="showPopup" @close="closePopup" mode="center" border-radius="30" :width="width">
  3. <view class="kind-reminder">
  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 class="reminder-text">
  11. 卖书前请务必仔细阅读
  12. </view>
  13. <text class="highlight">《书嗨卖书答疑》</text>
  14. </view>
  15. <view class="footer">
  16. <button class="rule-btn" @click="handleViewRules">查看规则</button>
  17. <button class="start-btn" @click="handleStartSelling">开始卖书</button>
  18. </view>
  19. </view>
  20. </view>
  21. </u-popup>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. width: {
  27. type: String,
  28. default: "80%",
  29. },
  30. },
  31. data() {
  32. return {
  33. showPopup: false,
  34. };
  35. },
  36. methods: {
  37. openPopup() {
  38. this.showPopup = true;
  39. },
  40. closePopup() {
  41. this.showPopup = false;
  42. },
  43. handleStartSelling() {
  44. this.$emit("start");
  45. this.closePopup();
  46. },
  47. handleViewRules() {
  48. this.$emit("viewRules");
  49. uni.navigateTo({
  50. url: '/pages-mine/pages/rules-for-sellbooks'
  51. });
  52. this.closePopup();
  53. },
  54. },
  55. };
  56. </script>
  57. <style lang="scss" scoped>
  58. .kind-reminder {
  59. background: #ffffff;
  60. border-radius: 26rpx;
  61. overflow: hidden;
  62. padding: 16rpx;
  63. background: linear-gradient(-90deg, #98e05f, #0de3ac);
  64. .container-form {
  65. background: #effcf3;
  66. border-radius: 26rpx;
  67. padding: 30rpx;
  68. padding-bottom: 40rpx;
  69. }
  70. .icon-wrapper {
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. margin-bottom: 20rpx;
  75. .tip-icon {
  76. width: 48rpx;
  77. height: 48rpx;
  78. margin-right: 10rpx;
  79. }
  80. .tip-text {
  81. font-family: Source Han Sans CN;
  82. font-weight: bold;
  83. font-size: 36rpx;
  84. color: #37c148;
  85. }
  86. }
  87. .content {
  88. padding: 20rpx 10rpx;
  89. font-size: 32rpx;
  90. color: #333333;
  91. line-height: 48rpx;
  92. text-align: center;
  93. .reminder-text {
  94. font-size: 36rpx;
  95. font-weight: 500;
  96. }
  97. }
  98. .footer {
  99. display: flex;
  100. gap: 30rpx;
  101. margin-top: 30rpx;
  102. padding: 0 10rpx;
  103. button {
  104. height: 88rpx;
  105. line-height: 88rpx;
  106. font-size: 32rpx;
  107. border: none;
  108. border-radius: 10rpx;
  109. &::after {
  110. border: none;
  111. }
  112. &.rule-btn {
  113. flex: 1;
  114. background-color: rgba(56, 193, 72, 0.4);
  115. color: #ffffff;
  116. }
  117. &.start-btn {
  118. flex: 1;
  119. background-color: #38c148;
  120. color: #ffffff;
  121. }
  122. }
  123. }
  124. }
  125. </style>