|
|
@@ -1,5 +1,5 @@
|
|
1
|
1
|
<!DOCTYPE html>
|
|
2
|
|
-<html class="ui-page-login">
|
|
|
2
|
+<html class="ui-page-login" style="height: 100%">
|
|
3
|
3
|
<head>
|
|
4
|
4
|
<meta charset="utf-8">
|
|
5
|
5
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
|
@@ -11,7 +11,7 @@
|
|
11
|
11
|
<script src="Script/Common/huayi.http.js"></script>
|
|
12
|
12
|
<script src="Script/Common/huayi.config.js"></script>
|
|
13
|
13
|
</head>
|
|
14
|
|
- <body>
|
|
|
14
|
+ <body style="height: 100%">
|
|
15
|
15
|
<div class="mui-content">
|
|
16
|
16
|
<form id='login-form' class="mui-input-group">
|
|
17
|
17
|
<!--logo-->
|
|
|
@@ -38,19 +38,25 @@
|
|
38
|
38
|
</div>
|
|
39
|
39
|
</div>
|
|
40
|
40
|
<script src="js/mui.min.js"></script>
|
|
41
|
|
-
|
|
42
|
41
|
<script>
|
|
43
|
42
|
//var openid = helper.cookies.get("openid");
|
|
44
|
43
|
var menucode = helper.request.queryString("menuCode");
|
|
45
|
44
|
var code = helper.request.queryString("code");
|
|
46
|
45
|
var openid = helper.request.queryString("openid");
|
|
|
46
|
+ //var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
|
|
47
|
47
|
var typeUser = helper.cookies.get("typeUser");
|
|
48
|
48
|
if (typeUser) {
|
|
49
|
49
|
typeUser = helper.cookies.get("typeUser");
|
|
50
|
50
|
} else{
|
|
51
|
51
|
typeUser=5;
|
|
52
|
52
|
}
|
|
53
|
|
-
|
|
|
53
|
+ if (typeUser==1) {
|
|
|
54
|
+ $(".staff").hide();
|
|
|
55
|
+ $(".company").show();
|
|
|
56
|
+ } else if(typeUser==5){
|
|
|
57
|
+ $(".staff").show();
|
|
|
58
|
+ $(".company").hide();
|
|
|
59
|
+ }
|
|
54
|
60
|
//登陆验证
|
|
55
|
61
|
$(".staff").on('tap', function() {
|
|
56
|
62
|
$(this).hide();
|
|
|
@@ -71,7 +77,6 @@
|
|
71
|
77
|
mui.alert("密码不能为空")
|
|
72
|
78
|
return;
|
|
73
|
79
|
}
|
|
74
|
|
- debugger
|
|
75
|
80
|
login();
|
|
76
|
81
|
})
|
|
77
|
82
|
function login () {
|
|
|
@@ -89,24 +94,22 @@
|
|
89
|
94
|
//openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
|
|
90
|
95
|
},
|
|
91
|
96
|
success: function(data) {
|
|
92
|
|
- debugger
|
|
93
|
97
|
if(data.state == "success") {
|
|
94
|
98
|
var UserWord=$("#password").val();
|
|
95
|
99
|
helper.cookies.set("typeUser", typeUser, 7);
|
|
96
|
100
|
helper.cookies.set("UserWord", UserWord, 7);
|
|
|
101
|
+ debugger
|
|
97
|
102
|
if (openid) {
|
|
98
|
103
|
helper.cookies.set("openid", openid, 7);
|
|
|
104
|
+ debugger
|
|
99
|
105
|
if (typeUser=="5") {
|
|
100
|
106
|
gourl();
|
|
101
|
107
|
} else if(typeUser=="1"){
|
|
102
|
108
|
gourlStaff();
|
|
103
|
109
|
}
|
|
104
|
|
- }else{
|
|
105
|
|
- helper.cookies.set("openid", openid, 7);
|
|
106
|
|
- window.location.href = "content/company.html";
|
|
107
|
110
|
}
|
|
108
|
111
|
}
|
|
109
|
|
- }
|
|
|
112
|
+ }
|
|
110
|
113
|
})
|
|
111
|
114
|
}
|
|
112
|
115
|
function gourl() {
|
|
|
@@ -115,7 +118,7 @@
|
|
115
|
118
|
window.location.replace("content/AddInvoice.html");
|
|
116
|
119
|
break; //我要开票
|
|
117
|
120
|
case "WDGS":
|
|
118
|
|
- window.location.replace("content/company.html");
|
|
|
121
|
+ window.location.replace("content/company.html?menucode=WDGS");
|
|
119
|
122
|
break; //我的公司
|
|
120
|
123
|
case "WDCW":
|
|
121
|
124
|
window.location.replace("content/finance.html");
|
|
|
@@ -140,7 +143,7 @@
|
|
140
|
143
|
window.location.replace("content/AddInvoice.html");
|
|
141
|
144
|
break; //我要开票
|
|
142
|
145
|
case "WDGS":
|
|
143
|
|
- window.location.replace("content/personal.html");
|
|
|
146
|
+ window.location.replace("content/company.html?menucode=WDGS");
|
|
144
|
147
|
break; //我的公司
|
|
145
|
148
|
case "WDCW":
|
|
146
|
149
|
window.location.replace("content/personal.html");
|