s-activity-pop.vue 2.7 KB

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