Преглед на файлове

feat:分流入口修改

wangxiaogang преди 3 години
родител
ревизия
5239e05e0b

+ 4 - 6
src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

@@ -9,6 +9,7 @@ var vm = new Vue({
       counts: [],
       kfCount: 0,
       isTabs: '',
+      shunted: {},
       imgSrcs: [
         { type: '0', title: '全部', url: '/images/pc/quanbu@2x.png' }, { type: '1', title: '活动优惠', url: '/images/pc/huodong@2x.png' },
         { type: '2', title: '服务通知', url: '/images/pc/fuwu@2x.png' }, { type: '3', title: '订阅消息', url: '/images/pc/dingyue@2x.png' },
@@ -26,6 +27,8 @@ var vm = new Vue({
     }
   },
   created() {
+    this.shunted = JSON.parse(localStorage.getItem('kf-shunt-data'))
+    console.log(this.shunted)
     this.tabsCount()
     this.tabsData('0')
     this.kfData()
@@ -43,12 +46,7 @@ var vm = new Vue({
       })
     },
     kfHref() {
-      var shunt = JSON.parse(localStorage.getItem('kf-shunt-data'))
-      if (shunt.url && shunt.url == 'zcpc') {
-        $('.help-slide-zx.open-customer').trigger('click')
-      } else {
-        location.href = shunt.url + '&mini=1'
-      }
+      location.href = shunted.url + '&mini=1'
     },
     kfClick() {
       $('.help-slide-zx.open-customer').trigger('click')

+ 6 - 1
src/web/staticres/public-pc/js/pc-bottom.js

@@ -98,7 +98,7 @@ function kfContact() {
         localStorage.setItem('kf-shunt-data', kfDatas)
       }
       kfType = localStorage.getItem('kf-shunt-data')
-      console.info(JSON.parse(kfType).url)
+      console.info(JSON.parse(kfType).isShunt,JSON.parse(kfType).url)
       if (JSON.parse(kfType).isShunt && JSON.parse(kfType).url == 'zcpc') {
         ;(function (w, d, e, x) {
           w[e] = function () { w.cbk = w.cbk || []; w.cbk.push(arguments); }
@@ -190,6 +190,11 @@ $(window).on('click', function (e) {
     var shunt = JSON.parse(localStorage.getItem('kf-shunt-data'))
     console.info(shunt)
     if (!shunt.url && shunt.url !== 'zcpc') {
+      // 登录判断
+      if (!loginflag) {
+        openLoginDig()
+        return
+      }
       location.href = shunt.url + '&mini=0'
     }
     $(".icon-badge-number").removeAttr('data-badge-number');

+ 1 - 1
src/web/templates/frontRouter/pc/messageCenter/sess/index.html

@@ -76,7 +76,7 @@
                   ></el-pagination>
                 </div>
               </el-tab-pane>
-              <el-tab-pane>
+              <el-tab-pane v-if="shunted.shunt && shunted.url !== zcpc">
                 <div class="msg-label" slot="label" @click="kfHref">
                   <img src='{{Msg "seo" "cdn"}}/frontRouter/pc/mesgCenter/image/sixin@2x.png?v={{Msg "seo" "version"}}'>
                   <i class="b-item" v-show="kfCount">{kfCount > 99 ? '99+' : kfCount}</i>