index.vue 24.1 KB
Newer Older
1
<template>
xd's avatar
xd committed
2
  <div class="main">
xd's avatar
xd committed
3 4
    <van-loading size="80px"  color="#1989fa" class="ld" v-if="overlayShow">加载中...</van-loading>
    <van-overlay :show="overlayShow" />
xd's avatar
xd committed
5 6 7 8
    <div class="main-manInfos">
      <div class="manInfo-logos">
        <img class="logos-logo" :src="test.manInfo.logoUrl" />
      </div>
9
      <div class="manInfo-name" @click="manInfoClick">我的专柜:{{test.manInfo.barName}}</div>
10
      <div class="manInfo-switch" @click="switchBarClick" v-if="flag == 1">
xd's avatar
xd committed
11 12 13 14 15 16 17
        <div class="switch-text">切换</div>
        <img class="switch-icon" :src="test.manInfo.icon['1']" />
      </div>
    </div>
    <div class="main-tips">
      <div class="tips-tip">店铺粉丝 {{test.barInfo.fans}}</div>
      <div class="tips-tip">个人粉丝 {{test.barInfo.personalFans}}</div>
18
      <div class="tips-tip">
19 20
        昨日新增
        <span>{{test.barInfo.newFans}}</span>
21 22 23
        <span>/</span>
        <span>{{test.barInfo.allNewFans}}</span>
      </div>
xd's avatar
xd committed
24 25 26
    </div>
    <div class="main-menus">
      <div class="menus-row">
leiqingsong's avatar
leiqingsong committed
27
        <div class="menu" @click="menu02Click" :style="flag == 1? '' : 'margin-right:10px;' ">
xd's avatar
xd committed
28 29
          <img class="menu-logo" :src="test.menuInfo.icon['2']" />
          <div class="menu-text">任务列表</div>
30
        </div>
leiqingsong's avatar
leiqingsong committed
31
        <div class="menu margin1" @click="menu05Click" v-if="flag == 1">
xd's avatar
xd committed
32 33 34
          <img class="menu-logo" :src="test.menuInfo.icon['5']" />
          <div class="menu-text">活动模版</div>
        </div>
xd's avatar
xd committed
35 36 37
        <div class="menu" @click="menu03Click">
          <img class="menu-logo" :src="test.menuInfo.icon['3']" />
          <div class="menu-text">活动列表</div>
38
        </div>
xd's avatar
xd committed
39 40
      </div>
      <div class="menus-row">
xd's avatar
xd committed
41
        <div class="menu" @click="menu04Click" :style="flag == 1? '' : 'margin-right:10px;' ">
xd's avatar
xd committed
42 43
          <img class="menu-logo" :src="test.menuInfo.icon['4']" />
          <div class="menu-text">专柜维护</div>
xulili's avatar
xulili committed
44
        </div>
leiqingsong's avatar
leiqingsong committed
45
        <div class="menu margin1" @click="handleCoupon" v-if="flag == 1">
xd's avatar
xd committed
46 47 48
          <img class="menu-logo" :src="test.menuInfo.icon['1']" />
          <div class="menu-text">优惠券管理</div>
        </div>
xd's avatar
xd committed
49 50 51
        <div class="menu" @click="menu06Click">
          <img class="menu-logo" :src="test.menuInfo.icon['6']" />
          <div class="menu-text">商品管理</div>
leiqingsong's avatar
leiqingsong committed
52
        </div>
xd's avatar
xd committed
53
      </div>
54
    </div>
xd's avatar
xd committed
55 56 57 58
    <div class="main-actives">
      <div class="actives-banners">
        <div class="actives-banner-title">现有开展活动</div>
      </div>
leiqingsong's avatar
leiqingsong committed
59
      <p v-if="currentActives.length === 0" style="font-size: 16px;">当前暂无活动</p>
60
      <template v-for="(item, index) in currentActives">
leiqingsong's avatar
leiqingsong committed
61 62 63 64 65 66
        <div
          v-if="index < active_limit"
          :key="item.id"
          class="actives-main"
          @click="toDetail(item.id, item.activityType)"
        >
67 68 69 70 71
          <div class="active-logos">
            <!-- <img class="active-logo" :src="test.activeInfo.icon['1']" /> -->
            <img class="active-logo" :src="item.logo" />
          </div>
          <div class="active-infos">
leiqingsong's avatar
leiqingsong committed
72
            <div class="active-title">{{item.activityName}}</div>
73 74
            <div class="active-dsc">{{item.des}}</div>
          </div>
xd's avatar
xd committed
75
        </div>
76 77
      </template>
      <div v-if="currentActives.length > 3 && !finished" class="actives-mores" @click="handleMore">
xd's avatar
xd committed
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
        <div class="mores-title">查看更多</div>
        <img class="mores-icon" :src="test.cache.arrowRightDark" />
      </div>
    </div>
    <div class="main-menuBar">
      <div class="menuBar-menu" @click="menuBarClick('MainSale')">
        <img class="menuBar-icon" :src="test.menuBarInfo.icon.now['1']" />
        <div class="menuBar-title menuBar-title-ac">活动</div>
      </div>
      <div class="menuBar-menu" @click="menuCase()">
        <img class="menuBar-icon" :src="test.menuBarInfo.icon.now['2']" />
        <div class="menuBar-title">案例</div>
      </div>
      <div class="menuBar-menu" @click="menuProfit()">
        <img class="menuBar-icon" :src="test.menuBarInfo.icon.now['3']" />
        <div class="menuBar-title">收益</div>
      </div>
      <div class="menuBar-menu" @click="menuTask()">
        <img class="menuBar-icon" :src="test.menuBarInfo.icon.now['4']" />
        <div class="menuBar-title">任务</div>
      </div>
      <div class="menuBar-menu" @click="menuBarClick('Me')">
        <img class="menuBar-icon" :src="test.menuBarInfo.icon.now['5']" />
        <div class="menuBar-title">我的</div>
      </div>
    </div>
  </div>
105 106 107
</template>

<script>
108
import axios from "axios";
109 110 111 112 113
import {
  getStoreDetail,
  getMemberListByCode,
  getDirector
} from "@/api/sidebar/voucher";
114
import { configWx, getUserInfo } from "@/utils/aCommon";
xd's avatar
xd committed
115
import { getUserInfoByUserId } from "@/api/sidebar/voucher";
116 117
import { getCurrentActive } from "@/api/active";
import { log } from "util";
xd's avatar
xd committed
118 119 120 121
export default {
  name: "discountIndex",
  data() {
    return {
122 123 124
      finished: false,
      active_limit: 3,
      currentActives: [],
xd's avatar
xd committed
125 126 127 128 129 130
      test: {
        cache: {
          imgUrl: "/hi.jpg",
          actDsc: "由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状。",
          nowMenuBar: "1",
          arrowRightDark: "/mainSale/icon-arrow-right-dark.png"
131
        },
xd's avatar
xd committed
132 133
        manInfo: {
          bk_logoUrl: "https://ezhq.xyz/img/main/logo_sona.jpg",
xd's avatar
xd committed
134 135 136
          logoUrl: "",
          barFrom: "",
          barName: "",
xd's avatar
xd committed
137 138 139
          icon: {
            "1": "/mainSale/icon-arrow-right-light.png"
          }
Z's avatar
Z committed
140
        },
xd's avatar
xd committed
141
        barInfo: {
xd's avatar
xd committed
142 143 144 145
          fans: "",
          personalFans: "",
          newFans: "",
          allNewFans: ""
xd's avatar
xd committed
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
        },
        menuInfo: {
          icon: {
            "1": "/mainSale/icon-menu-01.png",
            "2": "/mainSale/icon-menu-02.png",
            "3": "/mainSale/icon-menu-03.png",
            "4": "/mainSale/icon-menu-04.png",
            "5": "/mainSale/icon-menu-05.png",
            "6": "/mainSale/icon-menu-06.png"
          }
        },
        activeInfo: {
          icon: {
            "0": "/mainSale/icon-active-title.png",
            "1": "/mainSale/icon-active-1.png",
            "2": "/mainSale/icon-active-2.png",
            "3": "/mainSale/icon-active-3.png"
          }
        },
        menuBarInfo: {
          list: {
            main: [
              {
                name: "",
                iconUaUrl: "",
                iconAcUrl: ""
              }
            ]
          },
          icon: {
            now: {
              "1": "",
              "2": "",
              "3": "",
              "4": "",
              "5": ""
xd's avatar
xd committed
182
            },
xd's avatar
xd committed
183 184 185 186 187 188
            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"
xd's avatar
xd committed
189
            },
xd's avatar
xd committed
190 191 192 193 194 195 196 197
            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"
            }
          }
198
        }
xd's avatar
xd committed
199 200
      },
      dis: {},
201 202
      oyStallCode: "",
      userId: "",
xd's avatar
xd committed
203 204 205 206 207 208 209
      zcache: {
        nowUrl: "",
        preAuthCodeUrl: "",
        code: "",
        userId: "",
        userInfoResOld: "",
        userInfoResNew: ""
xd's avatar
xd committed
210
      },
xd's avatar
xd committed
211
      flag: 1,
212 213
      overlayShow: false,
      memberList: []
214
    };
xd's avatar
xd committed
215 216
  },
  created() {
xd's avatar
xd committed
217
    this.checkNowMenuBar()
218 219 220
    if (sessionStorage.getItem("userId")) {
      if (sessionStorage.getItem("avatar")) {
        this.test.manInfo.logoUrl = sessionStorage.getItem("avatar");
xd's avatar
xd committed
221
      }
222 223
      if (sessionStorage.getItem("personalFan")) {
        this.test.barInfo.personalFans = sessionStorage.getItem("personalFan");
xd's avatar
xd committed
224
      }
225 226
      if (sessionStorage.getItem("barName")) {
        this.test.manInfo.barName = sessionStorage.getItem("barName");
227
      }
228 229
      if (sessionStorage.getItem("allFans")) {
        this.test.barInfo.fans = sessionStorage.getItem("allFans");
230
      }
231 232
      if (sessionStorage.getItem("newFans")) {
        this.test.barInfo.newFans = sessionStorage.getItem("newFans");
233
      }
234 235
      if (sessionStorage.getItem("allNewFans")) {
        this.test.barInfo.allNewFans = sessionStorage.getItem("allNewFans");
xd's avatar
xd committed
236
      }
237 238
      if (sessionStorage.getItem("role")) {
        this.flag = sessionStorage.getItem("role");
xd's avatar
xd committed
239
      }
240
    } else {
241
      this.zReadyUserId()
xd's avatar
xd committed
242
      this.zTestGetNowUrlInfo()
xd's avatar
xd committed
243
    }
xd's avatar
xd committed
244
    this.GET_CurrentActive()
xd's avatar
xd committed
245 246
  },
  methods: {
leiqingsong's avatar
leiqingsong committed
247 248 249 250 251 252 253 254 255 256
    // 跳转到 活动详情
    toDetail(active_id, type) {
      this.$router.push({
        path: "/activeDetail",
        query: {
          id: active_id,
          active_type: type
        }
      });
    },
257 258 259 260 261 262 263 264 265 266
    handleMore() {
      this.active_limit += 3;
      if (this.active_limit === this.currentActives.length - 3) {
        this.finished = true;
        return;
      }
    },
    // 获取当前 活动
    GET_CurrentActive() {
      getCurrentActive().then(res => {
leiqingsong's avatar
leiqingsong committed
267
        this.currentActives = res.data || [];
xd's avatar
xd committed
268
      })
269
    },
xd's avatar
xd committed
270 271
    // 获取用户角色
    getDirector(userId) {
272 273 274 275 276 277 278 279
      getDirector({ userId }).then(res => {
        if (res.data == true) {
          this.flag = 1;
        } else {
          this.flag = 2;
        }
        sessionStorage.setItem("role", this.flag);
      });
xd's avatar
xd committed
280
    },
281
    // 获取用户头像信息
xd's avatar
xd committed
282 283 284 285
    getUserInfo() {
      let headerData = {
        agentId: "1000033",
        corpId: "ww4df265003b43fa0d"
286 287 288
      }
      return new Promise((resolve, reject) => {
        axios({
289
        url:  "http://139.155.48.151:8085/workWx/auth/user/get?userId=" + this.zcache.userId,
xd's avatar
xd committed
290 291 292
        method: "get",
        headers: headerData
      })
293 294 295 296 297 298 299
        .then(res => {      
          if(res.data != null) {
            sessionStorage.setItem("avatar", res.data.data.avatar)
            resolve(res.data.data.avatar)
          }else {
            resolve('')
          }         
xd's avatar
xd committed
300 301
        })
        .catch(err => {
302
          reject(err)
xd's avatar
xd committed
303
        });
304 305
      })
      
xd's avatar
xd committed
306
    },
xd's avatar
xd committed
307
    // 获取个人粉丝
xd's avatar
xd committed
308
    getFans() {
309
      let headerData = {
xd's avatar
xd committed
310 311
        agentId: "1000033",
        corpId: "ww4df265003b43fa0d"
312 313 314 315 316 317 318 319 320
      }
      return new Promise((resolve, reject) => {
        axios({
          url:
            "http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId=" + this.zcache.userId,
            method: "get",
            headers: headerData
           })
          .then(res => {
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
            console.log(res);
            
            if(res.data.data != null) {
              if(res.data != []) {
                sessionStorage.setItem("personalFan", res.data.data.length)
                resolve(res.data.data.length)  
              }else {
                sessionStorage.setItem("personalFan", '')
                resolve('')
              }
                          
            }else {
              console.log('zheli');              
              if(res.data.errorCode == "84061") {             
                sessionStorage.setItem("personalFan", 0)
                resolve(0)
              }else {   
                console.log('?');                           
                sessionStorage.setItem("personalFan", '')
                resolve('')
              }
            }
343 344 345 346
          })
          .catch(err => {
            reject(err)
          })
xd's avatar
xd committed
347
      })
348
      
xd's avatar
xd committed
349
    },
xd's avatar
xd committed
350
    // 获取店铺所有粉丝
xd's avatar
xd committed
351 352 353 354
    getAllFans() {
      let headerData = {
        agentId: "1000033",
        corpId: "ww4df265003b43fa0d"
355 356 357 358 359 360 361
      }    
      return new Promise((resolve, reject) => {
        axios({
          url: "http://139.155.48.151:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode=" + this.oyStallCode,
          method: "get",
          headers: headerData
        })
xd's avatar
xd committed
362
        .then(res => {
363 364 365 366 367 368 369
          let newList = []
          res.data.data.forEach(item => {
            if(item != null) {
              newList.push(item)
            }
          })
          sessionStorage.setItem("allFans", newList.length)
370
          resolve(newList.length)
371 372
        })
        .catch(err => {
373 374 375 376
          reject(err)
        })
      })
      
377
    },
378
    getAllNewFans() {
379 380
      let params = {
        oyStallCode: this.oyStallCode
381 382 383 384 385 386 387
      }
        getMemberListByCode(params).then(res => {
          this.memberList = res.data
          this.getAllInfo(res.data)
        }).catch(err => {
          console.log(err);          
        })      
388
    },
389
    getAddFans(flag, userId) {
390
      let JsonStr = {}
391 392
      if (flag == 1) {
        JsonStr.userid = [userId];
393 394
      } else {                  
        JsonStr.userid = userId
395
      }
396 397 398
      let timeNow = Math.round(new Date() / 1000);
      JsonStr.start_time = timeNow - 24 * 60 * 60;
      JsonStr.end_time = timeNow;
399 400
      return new Promise((resolve, reject) => {
        axios({
401 402
        url:
          "http://139.155.48.151:8085/workWx/auth/contact/getUserBehaviorData",
403 404
        method: "post",
        headers: {
405 406 407 408
          "Content-Type": "application/json",
          agentId: "1000033",
          corpId: "ww4df265003b43fa0d"
        },
409
        data: JsonStr
410
      }).then(res => {
411 412
          let data = JSON.parse(res.data.data);
          if (flag == 1) {
413
            // 获取个人新增粉丝
414 415 416 417 418 419 420 421
            if(data != null) {
              let newFans = data.behavior_data[0].new_contact_cnt + data.behavior_data[1].new_contact_cnt;
              sessionStorage.setItem("newFans", newFans);
              resolve(newFans)
            }else {
              sessionStorage.setItem("newFans", '')
              resolve('')
            } 
422
          } else {
423 424 425 426 427 428 429 430
             if(data != null) {
              let allNewFans = data.behavior_data[0].new_contact_cnt + data.behavior_data[1].new_contact_cnt;
              sessionStorage.setItem("allNewFans", allNewFans);
              resolve(allNewFans)
            }else {
              sessionStorage.setItem("allNewFans", '');
              resolve('')
            }
431
          }
xd's avatar
xd committed
432 433
        })
        .catch(err => {
434 435 436 437
          reject(err)
        })
      })
      
xd's avatar
xd committed
438
    },
xd's avatar
xd committed
439 440 441 442
    // 获取店铺信息
    getStore() {
      let params = {
        oyStallCode: this.oyStallCode
443 444 445 446 447 448 449 450 451 452 453 454 455 456
      }
      return new Promise((resolve, reject) => {
        getStoreDetail(params).then(res => {
          if (res.data.stallInfo != null) {
            sessionStorage.setItem("barName", res.data.stallInfo.name)
            resolve(res.data.stallInfo.name)
          }
        }).catch(err => {
          reject(err)
        })
      })     
    },
    getAllInfo(list) {
      console.log('getAllInfo');     
xd's avatar
xd committed
457
      Promise.all([this.getUserInfo(), this.getFans(), this.getAllFans(),this.getAddFans(1,this.zcache.userId),this.getAddFans(2,list), this.getStore()]).then(res => {
458 459 460 461 462 463 464
        console.log('进来了');        
        console.log(res,'promise');
        this.test.manInfo.logoUrl = res[0]
        this.test.barInfo.personalFans = res[1]
        this.test.barInfo.fans = res[2]
        this.test.barInfo.newFans = res[3]
        this.test.barInfo.allNewFans = res[4]
xd's avatar
xd committed
465
        this.test.manInfo.barName = res[5]
466
        this.overlayShow = false   
467
      })
xd's avatar
xd committed
468 469 470 471
    },
    checkNowMenuBar() {
      let inData = "1";
      this.test.menuBarInfo.icon.now = this.test.menuBarInfo.icon.ua;
472 473 474
      this.test.menuBarInfo.icon.now[inData] = this.test.menuBarInfo.icon.ac[
        inData
      ];
xd's avatar
xd committed
475 476 477 478
    },
    manInfoClick() {
      this.$router.push("counterInfo");
    },
479
    switchBarClick() {
xd's avatar
xd committed
480
      this.$router.push({
481 482
        path: "ChangeCounter",
        query: {
xd's avatar
xd committed
483 484
          userId: this.zcache.userId
        }
485
      });
xd's avatar
xd committed
486 487 488 489
    },
    testButtonClick() {},
    menu01Click() {},
    menu02Click() {
490
      this.$router.push("Task");
xd's avatar
xd committed
491 492
    },
    menu03Click() {
493
      this.$router.push("activeList");
xd's avatar
xd committed
494 495
    },
    menu04Click() {
496
      this.$router.push("counterInfo");
xd's avatar
xd committed
497 498
    },
    menu05Click() {
499
      this.$router.push("ActTemplate");
xd's avatar
xd committed
500 501
    },
    menu06Click() {
502
      this.$router.push("goodManage");
xd's avatar
xd committed
503
    },
xd's avatar
xd committed
504
    handleCoupon() {
505
      this.$router.push("coupon");
xd's avatar
xd committed
506
    },
xd's avatar
xd committed
507 508 509 510
    menuBarClick(inData) {
      this.$router.push(inData);
    },
    menuCase() {
xd's avatar
xd committed
511
      this.$router.push({ path: "/case" })
xd's avatar
xd committed
512 513
    },
    menuProfit() {
xd's avatar
xd committed
514
      this.$router.push({ path: "/profitList" })
xd's avatar
xd committed
515 516
    },
    menuTask() {
xd's avatar
xd committed
517
      this.$router.push({ path: "/taskList" })
xd's avatar
xd committed
518 519 520
    },
    // 获取code
    zReadyUserId() {
521
      if (this.$route.query.code === undefined) {
xd's avatar
xd committed
522
        // alert('没code')
523
        this.zTestPreAuthCode();
xd's avatar
xd committed
524 525
      } else {
        // alert('有code')
xd's avatar
xd committed
526
        this.overlayShow = true
527 528
        this.zTestGetNowUrlInfo();
        this.zTestGetUserInfoByOldToken();
xd's avatar
xd committed
529 530 531 532
      }
    },
    // 测试-获取当前Url信息
    zTestGetNowUrlInfo() {
533 534 535
      this.zcache.nowUrl = JSON.stringify(this.$route.query)
      this.zcache.code = String(this.$route.query.code)
      this.url = this.zcache.nowUrl
xd's avatar
xd committed
536
    },
537
    zTestPreAuthCode() {
xd's avatar
xd committed
538 539
      console.log('获取code')     
      this.overlayShow = true
xd's avatar
xd committed
540 541 542 543 544 545 546 547 548 549
      // alert('获取code')
      const basicInfo = {
        head: "https://open.weixin.qq.com/connect/oauth2/authorize?",
        // appId: "wwd1cdbca7b8b2b6c4",
        appId: "ww4df265003b43fa0d",
        redirectUrI: encodeURIComponent("oysales.oywanhao.com:8087"),
        responseType: "code",
        scope: "snsapi_base",
        state: "ztest",
        tail: "#wechat_redirect"
xd's avatar
xd committed
550
      }
xd's avatar
xd committed
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
      let url =
        basicInfo.head +
        "appid=" +
        basicInfo.appId +
        "&redirect_uri=" +
        basicInfo.redirectUrI +
        "&response_type=" +
        basicInfo.responseType +
        "&scope=" +
        basicInfo.scope +
        "&state=" +
        basicInfo.state +
        basicInfo.tail;
      this.zcache.preAuthCodeUrl = url;
      window.location.href = url;
    },
xd's avatar
xd committed
567
    // 获取userId
xd's avatar
xd committed
568 569
    zTestGetUserInfoByOldToken() {
      let postData = {
570
        code: this.zcache.code
xd's avatar
xd committed
571 572 573 574 575
      };
      let headerData = {
        agentId: "1000033",
        corpId: "ww4df265003b43fa0d"
      };
576
      this.zcache.userInfoResOld = "PostData:" + JSON.stringify(postData);
xd's avatar
xd committed
577
      axios({
578
        url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
xd's avatar
xd committed
579
        method: "post",
580
        headers: headerData
xd's avatar
xd committed
581 582
      })
        .then(res => {
583
          sessionStorage.setItem("userId", String(res.data.data.userId))
584 585
          this.zcache.userId = String(res.data.data.userId);
          this.getUserFromId(this.zcache.userId);
586
          // this.getUserInfo();
587
          this.getDirector(res.data.data.userId);
xd's avatar
xd committed
588 589
        })
        .catch(err => {
590
          console.log(err);
xd's avatar
xd committed
591 592
        });
    },
593
    // 获取店铺code
594 595 596
    getUserFromId(id) {   
      console.log(1);
         
597
      let userName = id;
598
      getUserInfoByUserId({ userName }).then(res => {       
xd's avatar
xd committed
599
        sessionStorage.setItem("oyStallCode", res.data[0].oyStallCode)
600 601
        this.oyStallCode = res.data[0].oyStallCode;     
        // this.getAllInfo()
xd's avatar
xd committed
602 603 604
        this.getAllNewFans()
      })
      .catch(err => {})
xd's avatar
xd committed
605 606 607
    }
  }
};
608 609 610
</script>

<style scoped>
xd's avatar
xd committed
611 612 613 614 615 616 617 618 619 620
.ld >>> .van-loading__text {
  color: #fff;
}
.ld {
  z-index: 1000;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);  
}
xd's avatar
xd committed
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
.testCube {
  width: 60px;
  height: 10px;
  background-color: lightcoral;
  border: 1px solid white;
}

.main {
  background-color: rgb(237, 239, 243);
  width: 100%;
  height: auto;
  padding-bottom: 94px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  overflow: auto;
}

.main-manInfos {
  width: 100%;
  height: 72px;
  background-color: #4377bc;
  padding: 0px 16px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.manInfo-logos {
  width: 48px;
  height: 48px;
  /*border: 1px solid white;*/

  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
}

.logos-logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;

  border: 2px solid white;
}

.manInfo-name {
  width: 100%;
  height: 18px;
  padding: 0px 12px;
  margin-right: 60px;

  color: white;

  font-size: 14px;
  line-height: 16px;
  font-weight: bold;
}

.manInfo-switch {
  width: 100px;
  height: 18px;

  font-size: 14px;
  line-height: 18px;
  font-weight: bold;

  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

.switch-icon {
  width: 5px;
  height: 8px;
}

.switch-text {
  color: white;

  padding-right: 4px;

  font-size: 14px;
  line-height: 16px;
  font-weight: normal;
}

.main-tips {
  width: 100%;
  height: 48px;
  background-color: #f8f8f8;

  padding: 0px 16px;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.tips-tip {
  /*border: 1px solid darkorange;*/
  width: 30%;
  height: 16px;

  color: #4377bc;
  font-size: 12px;
  font-weight: normal;
  line-height: 16px;
  text-align: center;
}

.main-menus {
  /*border: 1px solid lightseagreen;*/
  width: 100%;
  height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: start;
}

.menus-row {
  width: 100%;
  height: 120px;
  padding: 12px 16px 0px 16px;
  display: flex;
  flex-direction: row;
xd's avatar
xd committed
752
  justify-content: flex-start;
xd's avatar
xd committed
753 754 755 756 757 758
}

.menu {
  width: 108px;
  height: 108px;
  background-color: #f8f8f8;
xd's avatar
xd committed
759
  flex: 1;
xd's avatar
xd committed
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.menu-logo {
  width: 48px;
  height: 48px;

  object-fit: cover;
}

.menu-text {
  font-size: 14px;
  font-weight: bold;
  color: #2d476a;
}

.main-actives {
  width: 100%;
  margin-top: 36px;
  padding: 0px 12px;
  background-color: white;

  display: flex;
  flex-direction: column;
  justify-content: start;
}

.actives-banners {
  border-bottom: 1px solid #eeeeee;
  width: 100%;
  height: 25px;

  display: flex;
  flex-direction: row;
  justify-content: center;
}

.actives-banner-small {
  width: 220px;
  height: 30px;

  object-fit: cover;

  position: relative;
  bottom: 7px;
}

.actives-banner-title {
  background: url(/mainSale/icon-active-title.png);
  background-repeat: no-repeat;
  background-size: 100% 100%;

  width: 220px;
  height: 30px;

  font-size: 16px;
  line-height: 16px;
  color: #2d476a;
  text-align: center;

  position: relative;
  bottom: 7px;
}

.actives-banner-main {
  width: 148px;
  height: 24px;
  border-radius: 40px;
  margin: 0px 4px;

  font-size: 16px;
  font-weight: bold;
  line-height: 18px;
  text-align: center;
  color: #2d476a;

  background: linear-gradient(#ffffff, 50%, #e4f9ff);
  box-shadow: 0px 1px 1px 0px #96cedc;

  position: relative;
  bottom: 12px;
}

.actives-main {
  border-bottom: 1px solid #eeeeee;
  width: 100%;
  height: 105px;
  padding: 12px 0px;

  display: flex;
  flex-direction: row;
  justify-content: start;
}

.active-logos {
  background-color: #f8f8f8;
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.active-logo {
  width: 56px;
  height: 56px;
}

.active-infos {
  width: 100%;
  height: 80px;
  padding-left: 12px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.active-title {
  height: 16px;
  font-size: 14px;
  font-weight: bold;
  line-height: 14px;
  margin-bottom: 8px;
}

.active-dsc {
  height: 36px;
  width: 100%;
  font-size: 12px;
  font-weight: normal;
}

.actives-mores {
  width: 100%;
  height: 40px;
  /*border: 1px solid red;*/

  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.mores-title {
  width: auto;
  height: 14px;

  margin-right: 4px;

  font-size: 12px;
  font-weight: normal;
  line-height: 14px;
  color: #2d476a;
}

.mores-icon {
  width: 10px;
  height: 14px;
}

.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;

  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);
}
xd's avatar
xd committed
969 970 971 972 973 974
.margin1 {
  margin: 0 10px;
}
.margin2 {
  margin-right: 10px;
}
975
</style>