home.vue 4.15 KB
Newer Older
xulili's avatar
xulili committed
1
<template>
Z's avatar
Z committed
2
  <!-- <div>
3
    <button @click="disClick">discount</button>
4
    <button @click="mainSaleClick">mainSale</button>
Z's avatar
Z committed
5 6 7 8 9 10
  </div>-->
  <div class="main">
    <!-- <div class="tops"></div> -->
    <div class="lists">
      <div v-for="(item, index) of list.main" :key="index">
        <div class="list" @click="listClick(item.redirect)">
11
          <div>
12
            <img class="list-logo" :src="item.logoUrl" alt />
13
          </div>
Z's avatar
Z committed
14 15 16 17 18 19
          <div class="list-infos">
            <div class="list-info-title">{{item.name}}</div>
            <div class="list-info-dsc">{{item.dsc}}</div>
          </div>
        </div>
      </div>
20 21
    <!-- <button class="testButton">Test0606</button> -->
    <!-- <button class="testButton">Test0606</button> -->
Z's avatar
Z committed
22 23
    </div>

24

Z's avatar
Z committed
25 26
    <div class="menus">
      <div class="menu" @click="buttonMainMarketingClick">精准营销</div>
Z's avatar
Z committed
27
      <div class="menu activeMenu" @click="buttonSingleMarketingClick">一对一营销侧边栏</div>
Z's avatar
Z committed
28
    </div>
29
  </div>
xulili's avatar
xulili committed
30 31 32
</template>

<script>
33 34 35
import { ApiTestCfPost, ApiTestEaPost } from "@/api/test/test";


36 37
export default {
  name: "home",
Z's avatar
Z committed
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
  data() {
    return {
      list: {
        main: [
          {
            name: "顾客画像",
            dsc:
              "亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点",
            redirect: "Discount",
            logoUrl: "/mainSale/test-city.png"
          },
          {
            name: "优惠券推送",
            dsc:
              "亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点",
            redirect: "Discount",
            logoUrl: "/mainSale/test-city.png"
          },
          {
            name: "爆品推送",
            dsc:
              "亿百分会员画像,通过一方消费者数据结合三方数据为营业员展示顾客特点",
            redirect: "Discount",
            logoUrl: "/mainSale/test-city.png"
          }
        ]
      }
    };
  },
67 68

  methods: {
Z's avatar
Z committed
69 70 71 72 73 74 75 76 77
    // disClick() {
    //   this.$router.push("Discount");
    // },
    // mainSaleClick() {
    //   this.$router.push("MainSale");
    // },

    listClick(inData) {
      this.$router.push(inData);
78
    },
Z's avatar
Z committed
79 80 81
    buttonSingleMarketingClick() {
      // this.$router.push("");
    },
Z's avatar
Z committed
82
    buttonMainMarketingClick() {
83
      this.$router.push("MainSale");
84 85 86
    },

    testButton(inCode){}
xulili's avatar
xulili committed
87
  }
88
};
xulili's avatar
xulili committed
89 90 91
</script>

<style scoped>
Z's avatar
Z committed
92 93 94 95 96 97
/* button {
  border: 1px solid gray;
  margin: 2px;
  border-radius: 4px;
  padding: 4px;
} */
98

Z's avatar
Z committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
.main {
  background-color: white;
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: start;
}
.lists {
  /* border: 2px solid red; */
  height: auto;
  min-height: 100%;
  padding: 4px 12px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.list {
  height: 140px;
  /* border: 2px solid orange; */
  box-shadow: 0px 2px 4px 0px rgb(187, 187, 187);
  margin: 6px 0px;
  padding: 0px 12px;
  border-radius: 6px;

  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
.list-logo {
  /* border: 1px solid red; */
  width: 100px;
  height: 100px;
  border-radius: 6px;
}
.list-infos {
  /* border: 1px solid orange; */
139
  width: 100;
Z's avatar
Z committed
140
  height: 100px;
141
  padding-left: 12px;
Z's avatar
Z committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.list-info-title {
  width: 100%;
  height: 18px;

  font-size: 16px;
  font-weight: bold;
  line-height: 18px;
}
.list-info-dsc {
  margin-top: 6px;
  width: 100%;
  height: 16px;

  font-size: 12px;
  font-weight: normal;
  line-height: 18px;
}

.menus {
  border-top: 1px solid rgb(194, 194, 194);

  position: fixed;
  bottom: 0px;
  left: 0px;
  width: 100%;
  height: 50px;
  background-color: white;

  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
}
.menu {
  /* border: 1px solid red; */
  height: 50px;
  /* width: 120px; */
  width: 50%;
  line-height: 50px;
  text-align: center;
  font-size: 14px;
  color: black;
}
.activeMenu {
  color: lightcoral;
}
xulili's avatar
xulili committed
194
</style>
195 196 197 198 199 200 201 202 203

<style scoped>
.testButton{
  border: 1px solid gray;
  width: 140px;
  font-size: 14px;
  
}
</style>