wangxiaogang преди 3 години
родител
ревизия
ebcb81f562
променени са 2 файла, в които са добавени 10 реда и са изтрити 6 реда
  1. 2 1
      src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js
  2. 8 5
      src/web/staticres/public-pc/js/pc-bottom.js

+ 2 - 1
src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

@@ -46,12 +46,13 @@ var vm = new Vue({
       })
     },
     kfHref() {
-      location.href = shunted.url + '&mini=1'
+      location.href = this.shunted.url + '&mini=1'
     },
     kfClick() {
       $('.help-slide-zx.open-customer').trigger('click')
     },
     tabClick(val) {
+      console.log(val)
       this.isTabs = val.name
       this.tabsList.offset = 1
       this.tabsData(val.name)

+ 8 - 5
src/web/staticres/public-pc/js/pc-bottom.js

@@ -75,9 +75,8 @@ function getKfDate(res) {
 }
 var kfType = {}
 function kfContact() {
-  /* 客服咨询 */
   $.post({
-    url: '/jyapi/message/obtainShunt',// 分流
+    url: '/jyapi/social/obtainShunt',// 分流
     type: 'POST',
     data: JSON.stringify({type: 'PC'}),
     contentType: 'application/json',
@@ -90,6 +89,7 @@ function kfContact() {
       var getDates = localStorage.getItem('kf-shunt-data')
       var currents = new Date(new Date()).toLocaleDateString()
       console.info(getDates, currents)
+      kfType = localStorage.getItem('kf-shunt-data')
       if (getDates) {
         if (currents !== JSON.parse(getDates).currentDate) {
           localStorage.setItem('kf-shunt-data', kfDatas)
@@ -97,9 +97,12 @@ function kfContact() {
       } else {
         localStorage.setItem('kf-shunt-data', kfDatas)
       }
-      kfType = localStorage.getItem('kf-shunt-data')
+      if (!JSON.parse(kfType).isShunt) {
+        localStorage.setItem('kf-shunt-data', kfDatas)
+      }
       console.info(JSON.parse(kfType).isShunt,JSON.parse(kfType).url)
-      if (JSON.parse(kfType).isShunt && JSON.parse(kfType).url == 'zcpc') {
+      if (!JSON.parse(kfType).isShunt || 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); }
           x = d.createElement('script');
@@ -189,7 +192,7 @@ $(window).on('click', function (e) {
     openCustomDig = true
     var shunt = JSON.parse(localStorage.getItem('kf-shunt-data'))
     console.info(shunt)
-    if (!shunt.url && shunt.url !== 'zcpc') {
+    if (shunt.url && shunt.url !== 'zcpc') {
       // 登录判断
       if (!loginflag) {
         openLoginDig()