解决全局共享值的问题

This commit is contained in:
Yang Zhao 2016-12-29 12:57:49 +00:00
parent 6c67b0ca34
commit 2a90c817b6
2 changed files with 14 additions and 1 deletions

View File

@ -160,7 +160,8 @@
<script src="dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<script>
<!-- Custom Scripts -->
<script src="include/main.js">
$(document).ready(function(){
$.ajax({
type: "get",
@ -171,6 +172,11 @@
$("#name1").text(data.name);
$("#name2").text(data.name);
$("#created_at").text(data.created_at.substr(0,10)+"加入");
// save
LoginUserInfo.id=data.id;
LoginUserInfo.name=data.name;
LoginUserInfo.email=data.email;
LoginUserInfo.phone=data.phone;
},
401:function(){// 未授权
alert("未登录!");

View File

@ -0,0 +1,7 @@
var LoginUserInfo={
selectProject:-1,
name:'',
id:-1,
email:'',
phone:''
}