FirstOrderFreePopup.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <u-popup v-model="showPopup" @close="closePopup" @open="openPopup" mode="center" border-radius="20" width="100%" class="first-order-free-popup">
  3. <view class="popup-content">
  4. <image
  5. class="gift-image"
  6. src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/free_dialog.png"
  7. mode="widthFix"
  8. @click="closePopup"
  9. />
  10. <view class="action-buttons">
  11. <view class="check-rules" @click="checkRules">查看规则 ></view>
  12. </view>
  13. </view>
  14. </u-popup>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'FirstOrderFreePopup',
  19. data() {
  20. return {
  21. showPopup: false
  22. };
  23. },
  24. methods: {
  25. openPopup() {
  26. this.showPopup = true;
  27. },
  28. closePopup() {
  29. this.showPopup = false;
  30. this.$emit('close');
  31. },
  32. startBuying() {
  33. this.$emit('start');
  34. this.closePopup();
  35. },
  36. checkRules() {
  37. // 跳转到卖书规则页面
  38. uni.navigateTo({
  39. url: '/pages-mine/pages/rules-for-sellbooks'
  40. });
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="scss" >
  46. .popup-content {
  47. position: relative;
  48. display: flex;
  49. flex-direction: column;
  50. align-items: center;
  51. padding-right: 16rpx;
  52. .gift-image {
  53. width: 100%;
  54. height: auto;
  55. }
  56. .action-buttons {
  57. position: absolute;
  58. bottom: 100rpx;
  59. width: 100%;
  60. display: flex;
  61. flex-direction: column;
  62. align-items: center;
  63. }
  64. .check-rules {
  65. font-size: 40rpx;
  66. color: #FFFFFF;
  67. text-align: center;
  68. padding: 10rpx;
  69. padding-left: 80rpx;
  70. }
  71. }
  72. </style>