newqlogin.html
11.7 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>快捷登陆 </title>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.8.2.min.js"></script>
<style type="text/css">
ul li{ width:100%; height:50px; line-height:50px;}
input{ width:100%;}
#com1{ line-height:30px; height:30px; width:90%;}
#com2{ line-height:30px; height:30px; width:90%;}
table td{ border:1px solid #000;}
</style>
</head>
<body>
<div style=" width:1000px; height:auto; min-height:300px; margin:0 auto; border:1px solid #aaaaaa;">
<table>
<tr>
<td width="200" align="center">常用:</td><td><input id="com1" value="" /></td><td align="center"><a href="" target="_blank">前台</a></td>
</tr>
<tr>
<td>
<form id="form1" action="">
<input name="key" type="text" id="key" style=" width:80%;" value="{$key}" /><a href="common.aspx">置空</a>
<input type="submit" value="搜哦" id="btnSearch" />
</form>
</td><td >商家后台用户:<input id="com2" name="ERPUser" value="" /></td><td width="100" align="center"><a href="" target="_blank">后台</a></td>
</tr>
<tr>
<td>
<select name="store_list" id="store_list" onkeydown="strkeydown(event, this, 'sumbitbtn')">
<option value="">请选择</option>
<?php foreach( $storelist as $key=>$v): ?>
<option value="{$v['store_id']}">{$v['store_name']}({$v['ERPId']})</option>
<?php endforeach;?>
</select>
</td><td colspan="2">手机号码:<input style=" width:120px;" id="com5" value="" />
<select name="DropWeb" id="DropWeb">
<option value="1">本地</option>
<option value="2">测试</option>
<option value="3">网上</option>
</select>
登陆密码: <input name="loginpwd" type="password" id="loginpwd" style=" width:100px;" value="" />
<span onclick="go1()">跳转后台</span>
<span id="com4">跳转前台</span> <span id="com6">获取数据</span> <span id="com7">验证线下</span> <span id="com8">微信信息</span></td>
</tr>
<tr>
<td colspan="3">
<textarea id="com3" rows="5" cols="5" style=" width:500px; height:200px;">
</textarea>
</td>
</tr>
</table>
</div>
<input type="hidden" id="hidindex" value="" />
</form>
</body>
</html>
<script type="text/javascript">
function change(obj) {
//aa = $(obj).val().split(",");
$("#hidindex").val($(obj).val());
};
//后台
function go1() {
var selstore=$('#store_list').val();
if (selstore=="")
{
alert('请选择商家');
return false;
}
var getloginpwd=$("#loginpwd").val();
if (getloginpwd=="")
{
alert('登陆密码不能为空');
$("#loginpwd").focus();
return false;
}
var aa = $("#hidindex").val().split(",");
var urlhttp = "";
switch ($("#DropWeb").val())
{
case "1":
urlhttp = "{:curHostURL()}";
break;
case "2":
urlhttp = "http://jmh.xinda100.cn";
break;
case "3":
urlhttp = "https://mshop.yolipai.net";
break;
}
var gourl11 = "";
$.ajax({
url: "/test/Login/go",
data: { storeid: selstore,loginpwd: $("#loginpwd").val(),erpuser:$("#com2").val() },
dataType: "json",
type: "POST",
success: function (data) {
if (data.code==0)
{
gourl11=urlhttp+"/admin/index/get_post/?url="+data.link;
window.open(gourl11);
}
else
{
alert(data.msg);
}
},
beforeSend: function () {
// showLoading();
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("通讯异常");
}
});
};
$("#com4").click(function () {
var aa = $("#hidindex").val().split(",");
//验证
var Mobile = $("#com5").val();
if (Mobile=="")
{
alert('手机号码不能为空');
$("#com5").focus();
return false;
}
var getloginpwd=$("#loginpwd").val();
if (getloginpwd=="")
{
alert('登陆密码不能为空');
$("#loginpwd").focus();
return false;
}
var supplyid = aa[1];
var stoid=$("#store_list").val();
var urlhttp = "";
switch ($("#DropWeb").val())
{
case "1":
urlhttp = "{:curHostURL()}";
break;
case "2":
urlhttp = "http://jmh.xinda100.cn";
break;
case "3":
urlhttp = "https://mshop.yolipai.net";
break;
}
urlhttp+="/mobile/index/index/stoid/"+stoid+".html";
// alert("/test/Login/mlogin/storeid/1/mobile/13599727122/loginpwd/111");
$.ajax({
url: "/mobile/fast/fast_login/stoid/"+stoid+"/mobile/"+Mobile+"/loginpwd/"+getloginpwd,
dataType: "json",
type: "POST",
success: function (data) {
if (data.code==0) {
window.open(urlhttp);
}
else
{
alert(data.msg);
}
},
beforeSend: function () {
// showLoading();
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("通讯异常");
}
});
});
// $("#com6").click(function () {
// var aa = $("#hidindex").val().split(",");
// //验证
// var Mobile = $("#com5").val();
// var supplyid = aa[1];
//
// // if (Mobile == "") {
// // alert("手机号码不能为空!");
// // return;
// // }
//
//
// $.ajax({
// url: "commonzfl.ashx?Method=mobile",
// data: { mobile: Mobile, supplyid: supplyid },
// async: false,
// dataType: "json",
// type: "POST",
// success: function (data) {
// var reg = data.result.toString().split("|");
// if ("ok" == reg[0].toString()) {//成功
// //alert(aa[1]);
// if (Mobile != "") {
// $("#com3").val("前台:WXLogin/JsDefault.aspx?supplyid=" + supplyid + "&wx_openid=" + reg[1].toString() + "&verifypass=" + reg[2].toString() + "————————————————————" + "后台:App_admin/Main.aspx?SupplyId=" + supplyid + "&webpass=" + reg[3].toString() + "————————————————————" + "会员ID: " + reg[4].toString());
// }
// else {
// if ($("#DropSel").val() == "1") {
// $("#com3").val("App_admin/Main.aspx?SupplyId=" + supplyid + "&webpass=" + reg[1].toString());
// } else {
// $("#com3").val("m_admin/Main.aspx?SupplyId=" + supplyid + "&webpass=" + reg[1].toString());
// }
// }
// }
// else {
// alert(data.result);
// }
//
// },
// beforeSend: function () {
// // showLoading();
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// alert("通讯异常");
// }
// });
//
// });
//
// $("#com7").click(function () {
// var aa = $("#hidindex").val().split(",");
// //验证
// var Mobile = $("#com5").val();
// var supplyid = aa[1];
//
// // if (Mobile == "") {
// // alert("手机号码不能为空!");
// // return;
// // }
//
//
// $.ajax({
// url: "commonzfl.ashx?Method=erp",
// data: { mobile: Mobile, supplyid: supplyid },
// async: false,
// dataType: "json",
// type: "POST",
// success: function (data) {
// //alert(decodeURIComponent(data.result)); return;
// var reg = data.result.toString().split("|");
// if ("ok" == reg[0].toString()) {//成功
// $("#com3").val(HtmlUtil.htmlDecodeByRegExp(reg[1].toString()));
//
// }
// else if ("nomobile" == reg[0].toString()) {
// alert("请输入手机号码");
// }
// else {
// alert(data.result);
// }
//
// },
// beforeSend: function () {
// // showLoading();
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// alert("通讯异常");
// }
// });
//
// });
// $("#com8").click(function () {
// var aa = $("#hidindex").val().split(",");
// //验证
// var openid = $("#com5").val();
// var supplyid = aa[1];
//
// // if (Mobile == "") {
// // alert("手机号码不能为空!");
// // return;
// // }
// $("#com3").val('');
// $("#img").remove();
//
// $.ajax({
// url: "commonzfl.ashx?Method=weixin",
// data: { openid: openid, supplyid: supplyid },
// async: false,
// dataType: "json",
// type: "POST",
// success: function (data) {
// //alert(decodeURIComponent(data.result)); return;
// var reg = data.result.toString().split("|");
// if ("ok" == reg[0].toString()) {//成功
//
// $("#com3").val("昵称:" + reg[1].toString());
// $("#com3").after("<img id='img' style=' width:100px; height:100px;' src='" + reg[2].toString() + "' alt=''>");
//
// }
// else {
// alert(data.result);
// }
//
// },
// beforeSend: function () {
// // showLoading();
// },
// error: function (XMLHttpRequest, textStatus, errorThrown) {
// alert("通讯异常");
// }
// });
//
// });
var HtmlUtil = {
/*1.用正则表达式实现html转码*/
htmlEncodeByRegExp: function (str) {
var s = "";
if (str.length == 0) return "";
s = str.replace(/&/g, "&");
s = s.replace(/</g, "<");
s = s.replace(/>/g, ">");
s = s.replace(/ /g, " ");
s = s.replace(/\'/g, "'");
s = s.replace(/\"/g, """);
return s;
},
/*2.用正则表达式实现html解码*/
htmlDecodeByRegExp: function (str) {
var s = "";
if (str.length == 0) return "";
s = str.replace(/&/g, "&");
s = s.replace(/</g, "<");
s = s.replace(/>/g, ">");
s = s.replace(/ /g, " ");
s = s.replace(/'/g, "\'");
s = s.replace(/"/g, "\"");
return s;
}
};
</script>