fuliqi
2024-01-24 29c1e7eb5ac16e90d8991a86c1c071bc312ec8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
  <NewModal v-if='visable' :visable="visable" title="活动详情" @close-modal="closeModal" class="active-modal">
    <scroll-view scroll-y slot="modal-content" class="modal-content-box">
      <div v-for="(item, index) in activeList" :key="index"
           class="mt20 active-item row-between coloum-center">
        <div class="row-start coloum-center">
          <image src="/static/images/active-icon1.png" mode="" class="common-right-icon"></image>
          <div class="item-name ml20">{{ item.promotionName }}</div>
        </div>
        <div class="common-txt-color ml20" v-if="item.preferentialAmount">
          满{{ item.preferentialMaxAmount }}减{{ item.preferentialAmount }}</div>
        <div class="common-txt-color ml20" v-else-if="item.productUrl && item.productUrl.length">
          满{{ item.preferentialMaxAmount }}元加赠礼品</div>
      </div>
    </scroll-view>
  </NewModal>
</template>
 
<script>
import NewModal from '@/components/new-modal/index.vue'
export default {
  components: {
    NewModal
  },
  props: {
    list: {
      type: Array,
      default () {
        return []
      }
    },
    visable: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      activeList: this.list
    }
  },
  methods: {
    closeModal () {
      this.$emit('close-modal')
    }
  },
  watch: {
    list (newVal) {
      this.activeList = newVal
    }
  }
}
</script>
 
<style lang="scss" scoped>
.active-modal {
  z-index: 100001;
 
  .active-item {
    padding: 20px 0;
    // border-bottom: 1px solid #f2f2f2;
  }
  .modal-content-box {
    max-height: 800px;
    min-height: 300px;
    overflow-y: scroll;
  }
}
.modal-box-open {
  left: 0;
}
</style>