activeList.vue 3.11 KB
Newer Older
xd's avatar
xd committed
1
<template>
xd's avatar
xd committed
2
  <div class="container">
xd's avatar
xd committed
3 4 5 6 7
    <div class="title">
      <span>会员分裂</span>
      <span class="fr">查看更多<span class="icon">></span></span>
    </div>
    <div class="active">
8
      <div class="list" v-for="item in activeList" :key="item.id" @click="toDetail(item.id, item.type)">
xd's avatar
xd committed
9 10
          <div class="left"></div>
          <div class="right">
11 12
            <h3>{{ item.activeName }}</h3>
            <p>{{ item.description }}</p>
xd's avatar
xd committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
          </div>
      </div>
    </div>
    <div class="fg">复购</div>
    <div class="active">
      <div class="list">
          <div class="left"></div>
          <div class="right">
            <h3>大转盘抽奖</h3>
            <p>由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。</p>
          </div>
      </div>
      <div class="list list3">
          <div class="left"></div>
          <div class="right">
            <h3>砸金蛋抽奖</h3>
            <p>由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。</p>
          </div>
xd's avatar
xd committed
31 32 33 34 35 36
      </div>
    </div>
  </div>
</template>

<script>
37
import * as API from '@/api/active';
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
export default {
  data() {
    return {
      activeList: [
        {
          id: 1,
          type: 'coupon',
          activeName: '砍价',
          description: '由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。'
        },
        {
          id: 2,
          type: 'wheel',
          activeName: '集赞',
          description: '由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。'
        }
      ]
    }
  },
  methods: {
58 59 60 61 62
    // 获取 欧亚 活动列表
    getOYActiveList() {

    },
    // 跳转到 活动详情
63 64 65 66 67 68 69 70 71 72 73
    toDetail(active_id, type) {
      this.$router.push({
        path: '/activeDetail',
        query: {
          id: active_id,
          type: type
        }
      })
    }
  }
};
xd's avatar
xd committed
74 75 76
</script>

<style scoped>
xd's avatar
xd committed
77
.container {
xd's avatar
xd committed
78
  height: auto;
xd's avatar
xd committed
79
  background-color: rgba(248, 248, 248, 1);
xd's avatar
xd committed
80 81 82 83
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
xd's avatar
xd committed
84
}
xd's avatar
xd committed
85 86 87
.title {
  height: 44px;
  background: rgba(248, 248, 248, 1);
xd's avatar
xd committed
88 89 90
  display: flex;
  justify-content: space-between;
  align-items: center;
xd's avatar
xd committed
91 92 93 94
  padding: 0 16px;
  font-size: 12px;
  color: rgba(45, 71, 106, 1);
}
xd's avatar
xd committed
95 96 97 98 99 100 101
.fg {
  padding: 0 16px;
  font-size: 12px;
  color: rgba(45, 71, 106, 1);
  height: 44px;
  line-height: 44px; 
}
xd's avatar
xd committed
102 103 104 105
.icon {
  font-weight: 800;
}
.active {
xd's avatar
xd committed
106 107 108
  background-color: #fff;
  padding: 12px 12px 0 12px;
  box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
xd's avatar
xd committed
109 110
}
.list {
xd's avatar
xd committed
111
  height: 94px;
xd's avatar
xd committed
112 113 114
  width: 100%;
  background-color: #fff;
  display: flex;
xd's avatar
xd committed
115 116 117 118 119 120 121
  justify-content: space-between;
  border-bottom: 1px solid rgba(238,238,238,1);
  margin-bottom: 14px;
}
.list3 {
  border-bottom: none;
  margin-bottom: 0;
xd's avatar
xd committed
122 123
}
.left,.right {
xd's avatar
xd committed
124
  height: 80px;
xd's avatar
xd committed
125 126
}
.left {
xd's avatar
xd committed
127 128
  width: 80px; 
  background:rgba(248,248,248,1);  
xd's avatar
xd committed
129 130
}
.right {
xd's avatar
xd committed
131
  width: 76%;
xd's avatar
xd committed
132
  padding-left: 10px;
xd's avatar
xd committed
133 134 135 136 137 138 139 140 141 142 143
  background-color: #fff;
}
h3 {
  font-size: 14px;
  font-weight:bold;
  color:rgba(45,71,106,1);
}
p {
  margin-top: 10px;
  font-size:12px;
  color:rgba(45,71,106,0.8);
xd's avatar
xd committed
144 145
}
</style>