index.vue 7.74 KB
Newer Older
Z's avatar
Z committed
1
<template>
xd's avatar
xd committed
2 3 4 5
  <div class="main">
    <div class="backgrounds">
      <img class="background-img" :src="cache.icon.testImg" />
    </div>
Z's avatar
Z committed
6

xd's avatar
xd committed
7 8 9 10
    <div class="infos">
      <div class="info">
        <div class="info-logos">
          <img class="info-logo" :src="cache.icon.testImg" />
Z's avatar
Z committed
11
        </div>
xd's avatar
xd committed
12 13 14 15 16
        <div class="info-msgs">
          <div class="msg">
            <div class="msg-title">未完成任务</div>
            <div class="msg-num">
              <div class="msg-num-red">15</div>
Z's avatar
Z committed
17
            </div>
xd's avatar
xd committed
18 19 20 21 22
          </div>
          <div class="msg msg-latest">
            <div class="msg-title">未完成任务</div>
            <div class="msg-num">
              <div class="msg-num-blue">5</div>
Z's avatar
Z committed
23
            </div>
xd's avatar
xd committed
24
          </div>
Z's avatar
Z committed
25
        </div>
xd's avatar
xd committed
26 27
      </div>
    </div>
Z's avatar
Z committed
28

xd's avatar
xd committed
29 30 31 32 33 34 35 36 37 38 39 40 41
    <div class="lists">
      <div class="list">
        <div class="list-title">我的客户</div>
        <img class="list-icon" :src="cache.icon.arrowRightDark" />
      </div>
      <div class="list" @click="listTaskClick">
        <div class="list-title">任务列表</div>
        <img class="list-icon" :src="cache.icon.arrowRightDark" />
      </div>
      <div class="list list-latest">
        <div class="list-title">我的收益</div>
        <img class="list-icon" :src="cache.icon.arrowRightDark" />
      </div>
Z's avatar
Z committed
42
    </div>
xd's avatar
xd committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

    <div class="main-menuBar">
      <div class="menuBar-menu" @click="menuBarClick('MainSale')">
        <img class="menuBar-icon" :src="menuBarInfo.icon.now['1']" />
        <div class="menuBar-title">活动</div>
      </div>
      <div class="menuBar-menu" @click="menuCase()">
        <img class="menuBar-icon" :src="menuBarInfo.icon.now['2']" />
        <div class="menuBar-title">案例</div>
      </div>
      <div class="menuBar-menu" @click="menuProfit()">
        <img class="menuBar-icon" :src="menuBarInfo.icon.now['3']" />
        <div class="menuBar-title">收益</div>
      </div>
      <div class="menuBar-menu" @click="menuTask()">
        <img class="menuBar-icon" :src="menuBarInfo.icon.now['4']" />
        <div class="menuBar-title">任务</div>
      </div>
      <div class="menuBar-menu" @click="menuBarClick('Me')">
        <img class="menuBar-icon" :src="menuBarInfo.icon.now['5']" />
        <div class="menuBar-title menuBar-title-ac">我的</div>
      </div>
    </div>
  </div>
Z's avatar
Z committed
67 68 69
</template>

<script>
xd's avatar
xd committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
export default {
  name: "me",
  data() {
    return {
      cache: {
        icon: {
          testImg: "/mainSale/test-city.png",
          arrowRightLight: "/mainSale/icon-arrow-right-light.png",
          arrowRightDark: "/mainSale/icon-arrow-right-dark.png"
        }
      },
      menuBarInfo: {
        list: {
          main: [
            {
              name: "",
              iconUaUrl: "",
              iconAcUrl: ""
            }
          ]
Z's avatar
Z committed
90
        },
xd's avatar
xd committed
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
        icon: {
          now: {
            "1": "",
            "2": "",
            "3": "",
            "4": "",
            "5": ""
          },
          ua: {
            "1": "/mainSale/icon-menuBar-1-ua.png",
            "2": "/mainSale/icon-menuBar-2-ua.png",
            "3": "/mainSale/icon-menuBar-3-ua.png",
            "4": "/mainSale/icon-menuBar-4-ua.png",
            "5": "/mainSale/icon-menuBar-5-ua.png"
          },
          ac: {
            "1": "/mainSale/icon-menuBar-1-ac.png",
            "2": "/mainSale/icon-menuBar-2-ac.png",
            "3": "/mainSale/icon-menuBar-3-ac.png",
            "4": "/mainSale/icon-menuBar-4-ac.png",
            "5": "/mainSale/icon-menuBar-5-ac.png"
          }
Z's avatar
Z committed
113
        }
xd's avatar
xd committed
114
      }
Z's avatar
Z committed
115
    };
xd's avatar
xd committed
116 117 118 119 120 121 122
  },
  created() {
    this.checkNowMenuBar();
  },
  methods: {
    checkNowMenuBar() {
      let inData = "5";
Z's avatar
Z committed
123

xd's avatar
xd committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
      this.menuBarInfo.icon.now = this.menuBarInfo.icon.ua;
      this.menuBarInfo.icon.now[inData] = this.menuBarInfo.icon.ac[inData];
    },
    menuBarClick(inData) {
      this.$router.push(inData);
    },
    listTaskClick() {
      this.$router.push("Task");
    },
    menuProfit() {
      this.$router.push({ path: "/profitList" });
    },
    menuTask() {
      this.$router.push({ path: "/taskList" });
    },
    menuCase() {
      this.$router.push({ path: "/case" });
Z's avatar
Z committed
141
    }
xd's avatar
xd committed
142 143 144
  }
};
</script>
Z's avatar
Z committed
145

xd's avatar
xd committed
146 147 148 149 150 151 152 153 154 155 156 157
<style scoped>
.main {
  /*border: 1px solid red;*/
  background-color: rgba(248, 248, 248, 1);
  width: 100%;
  height: auto;
  min-height: 100%;
  /*padding: ;*/
  padding-bottom: 94px;
  display: flex;
  flex-direction: column;
  justify-content: start;
Z's avatar
Z committed
158

xd's avatar
xd committed
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
  overflow: auto;
}
.backgrounds {
  /*border: 1px solid dodgerblue;*/
  width: 100%;
  height: 124px;
  overflow: hidden;
  background-color: rgba(10, 10, 10, 0.5);
}
.background-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}
Z's avatar
Z committed
174

xd's avatar
xd committed
175 176 177 178 179 180 181 182 183 184 185
.infos {
  /*border: 1px solid orange;*/
  width: 100%;
  height: 44px;
  margin-top: 12px;
}
.info {
  /*border: 1px solid red;*/
  width: 100%;
  height: 148px;
  padding: 0px 16px;
Z's avatar
Z committed
186

xd's avatar
xd committed
187 188
  position: relative;
  bottom: 106px;
Z's avatar
Z committed
189

xd's avatar
xd committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;
}
.info-logos {
  /*background-color: #96CEDC;*/
  width: 100%;
  height: 48px;
}
.info-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid white;
  object-fit: cover;
}
.info-msgs {
  width: 100%;
  height: 80px;
  margin-bottom: 12px;
  background-color: rgba(255, 255, 255, 1);
  border-radius: 2px;
  box-shadow: 0px 2px 4px 0px rgba(221, 221, 221, 1);
  padding: 14px 19px;
Z's avatar
Z committed
215

xd's avatar
xd committed
216 217 218 219 220 221 222 223 224 225
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.msg {
  width: 50%;
  height: 100%;
  /*border: 1px solid red;*/
  border-right: 1px solid rgba(238, 238, 238, 1);
Z's avatar
Z committed
226

xd's avatar
xd committed
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}
.msg-latest {
  border-right: none;
  align-items: flex-end;
}
.msg-title {
  width: 120px;
  height: 14px;
  font-size: 12px;
  font-weight: bold;
  line-height: 14px;
  color: rgba(45, 71, 106, 1);
  text-align: center;
}
.msg-num {
  width: 120px;
  height: 32px;
  border-radius: 16px;
  background-color: rgba(248, 248, 248, 1);
Z's avatar
Z committed
250

xd's avatar
xd committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.msg-num-red {
  color: rgba(208, 2, 27, 1);
  font-size: 18px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
}
.msg-num-blue {
  color: rgba(117, 178, 253, 1);
  font-size: 18px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
}
Z's avatar
Z committed
270

xd's avatar
xd committed
271 272 273 274 275 276
.lists {
  /*border: 1px solid red;*/
  width: 100%;
  height: auto;
  padding: 0px 0px 0px 16px;
  background-color: rgba(255, 255, 255, 1);
Z's avatar
Z committed
277

xd's avatar
xd committed
278 279 280 281 282 283
  box-shadow: 0px 1px 3px 0px rgba(221, 221, 221, 1);
}
.list {
  /*border: 1px solid dodgerblue;*/
  width: 100%;
  height: 44px;
Z's avatar
Z committed
284

xd's avatar
xd committed
285
  border-bottom: 1px solid rgba(221, 221, 221, 1);
Z's avatar
Z committed
286

xd's avatar
xd committed
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.list-latest {
  border-bottom: none;
}
.list-title {
  width: auto;
  height: 16px;
  font-size: 14px;
  font-weight: bold;
  line-height: 16px;
  color: rgba(45, 71, 106, 1);
}
.list-icon {
  margin-right: 16px;
  width: 8px;
  height: 13px;
  object-fit: cover;
}
Z's avatar
Z committed
309

xd's avatar
xd committed
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
.main-menuBar {
  /*border: 1px solid darkviolet;*/
  box-shadow: inset 0px 1px 2px 0px rgba(221, 221, 221, 1);
  width: 100%;
  height: 82px;
  position: fixed;
  bottom: 0px;
  left: 0px;
  background-color: #fafafa;
  padding: 0px 14px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.menuBar-menu {
  /*background-color: greenyellow;*/
  width: 48px;
  height: 47px;
Z's avatar
Z committed
328

xd's avatar
xd committed
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.menuBar-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
}
.menuBar-title {
  width: auto;
  height: 12px;
  font-size: 10px;
  font-weight: bold;
  color: rgba(67, 119, 188, 0.4);
  text-align: center;
}
.menuBar-title-ac {
  color: rgba(67, 119, 188, 1);
}
Z's avatar
Z committed
350
</style>