|
@@ -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()
|