s-activity-pop.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!-- 商品信息:满减送等营销活动的弹窗 -->
  2. <template>
  3. <su-popup :show="show" type="bottom" round="20" @close="emits('close')" showClose>
  4. <view class="model-box">
  5. <view class="title ss-m-t-16 ss-m-l-20 ss-flex">营销活动</view>
  6. <scroll-view
  7. class="model-content ss-m-t-50"
  8. scroll-y
  9. :scroll-with-animation="false"
  10. :enable-back-to-top="true"
  11. >
  12. <view v-for="item in state.activityInfo" :key="item.id">
  13. <view class="ss-flex ss-col-top ss-m-b-40" @tap="onGoodsList(item)">
  14. <view class="model-content-tag ss-flex ss-row-center">满减</view>
  15. <!-- TODO 芋艿:先简单做;未来再搞成满 xxx 减 yyy 元 -->
  16. <!-- <view class="ss-m-l-20 model-content-title ss-flex-1">-->
  17. <!-- <view class="ss-m-b-24" v-for="text in item.texts" :key="text">-->
  18. <!-- {{ text }}-->
  19. <!-- </view>-->
  20. <!-- </view>-->
  21. <view class="ss-m-l-20 model-content-title ss-flex-1">
  22. <view class="ss-m-b-24">
  23. {{ item.name }}
  24. </view>
  25. </view>
  26. <text class="cicon-forward" />
  27. </view>
  28. </view>
  29. </scroll-view>
  30. </view>
  31. </su-popup>
  32. </template>
  33. <script setup>
  34. import sheep from '@/sheep';
  35. import { computed, reactive } from 'vue';
  36. const props = defineProps({
  37. modelValue: {
  38. type: Object,
  39. default() {},
  40. },
  41. show: {
  42. type: Boolean,
  43. default: false,
  44. },
  45. });
  46. const emits = defineEmits(['close']);
  47. const state = reactive({
  48. activityInfo: computed(() => props.modelValue),
  49. });
  50. function onGoodsList(e) {
  51. sheep.$router.go('/pages/activity/index', {
  52. activityId: e.id,
  53. });
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .model-box {
  58. height: 60vh;
  59. .title {
  60. font-size: 36rpx;
  61. height: 80rpx;
  62. font-weight: bold;
  63. color: #333333;
  64. }
  65. }
  66. .model-content {
  67. padding: 0 20rpx;
  68. box-sizing: border-box;
  69. .model-content-tag {
  70. background: rgba(#ff6911, 0.1);
  71. font-size: 24rpx;
  72. font-weight: 500;
  73. color: #ff6911;
  74. line-height: 42rpx;
  75. width: 68rpx;
  76. height: 32rpx;
  77. border-radius: 5rpx;
  78. }
  79. .model-content-title {
  80. font-size: 26rpx;
  81. font-weight: 500;
  82. color: #333333;
  83. }
  84. .cicon-forward {
  85. font-size: 28rpx;
  86. color: #999999;
  87. }
  88. }
  89. </style>