- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPage.js
More file actions
Latest commit
66 lines (66 loc) · 2.25 KB
/
Copy pathPage.js
File metadata and controls
66 lines (66 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* Created by Administrator on 2014/4/20.
*/
varPage={};
Page.location=String(window.location);
Page.Editor=[];
Page.getDocumentName=function(){
if(this.location.match(/\?(\d{6}_\w+_*\w+)/i))
returnthis.location.match(/\?(\d{6}_\w+_*\w+)/i)[1];
};
Page.getHashNumber=function(){
if(this.location.match("#"))
returnthis.location.match(/#(\d+)/i)[1];
};
Page.checkAccout=function(func){
$.ajax({
url: '/Users/AjaxHandler/LoginCheck.aspx',
type: "post",
async: true,
data: "checktype=getinfouser",
error: function(XMLHttpRequest,strError,strObject){
alert("ajax服务器请求超时!错误详情"+strObject);
returnfalse;
},
success: function(json){
vararrJson=newArray();
varmodels=eval("("+json+")");
if(models.UserID>0){
$.ajax({
type: "POST",
data: {
name: encodeURI(models.UserName),
url: encodeURI(this.documentName)
},
sync:false,
url: '/subject/edit/login.aspx',
timeout: 20000,
error: function(XMLHttpRequest,strError,strObject){
Page.returnToLogin();
returnfalse;
},
success: function(response){
if(response=="True"){
varadminCookie=newGzlCookie("admin");
adminCookie.setCookie("Checked",30);
func.call();
}else{
$body.text("非指定用户!");
vart=setTimeout("window.location.href ='http://www.gzl.com.cn/error/Error404.html'",1000);
returnfalse;
}
}
})
}else{
Page.returnToLogin();
returnfalse;
}
}
});
};
Page.clearEditor=function(){
Page.Editor=[];
};
Page.returnToLogin=function(){
window.location.href="/subject/edit/LoginFail.html";
};