|
@@ -21,7 +21,6 @@ function checkLogin(){
|
21
|
21
|
ajax(apiUrl+"login",data,function(res){
|
22
|
22
|
alert({title:"登录提示",nav:res.msg,flag:res.code,next:function(){
|
23
|
23
|
if(res.code == 1){
|
24
|
|
- $.cookie.set("token",res.data.token);
|
25
|
24
|
window.location.href = "/";
|
26
|
25
|
}
|
27
|
26
|
}});
|
|
@@ -33,7 +32,6 @@ function loginout(){
|
33
|
32
|
ajax(apiUrl+"/loginOut",{},function(res){
|
34
|
33
|
alert(res.code.toString().decode(1, "登出成功。", "登出失败"), res.code, function(){
|
35
|
34
|
if(res.code == 1){
|
36
|
|
- $.cookie.remove("token");
|
37
|
35
|
window.location.href = "/";
|
38
|
36
|
}
|
39
|
37
|
});
|