Skip to content
Snippets Groups Projects
Commit f49d36fc authored by Ye Tian's avatar Ye Tian
Browse files

little change on current person id cookie getting method

parent 43b257a3
Branches
No related tags found
No related merge requests found
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
//全局变量:当前登录用户的id //全局变量:当前登录用户的id
var strcookie = document.cookie; var strcookie = document.cookie;
var userId = 0;
if(strcookie.length > 0){
var userIdStr = strcookie.split(";")[0]; var userIdStr = strcookie.split(";")[0];
var userId = userIdStr.split("=")[1]; userId = userIdStr.split("=")[1];
}
//全局变量: 选中用户的id,可能为0 //全局变量: 选中用户的id,可能为0
var url = window.location.href; var url = window.location.href;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment