-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.html
516 lines (477 loc) · 22.4 KB
/
index.html
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>环信开发者中心</title>
<!--
<link href="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" media="screen"/>
-->
<link href="assets/css/bootstrap-2.3.2.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/bootstrap-responsive-2.3.2.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/font-awesome-3.1.0.min.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE 7]>
<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--fonts-->
<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" /> -->
<!--ace styles-->
<link href="assets/css/ace.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/ace-responsive.min.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="assets/css/ace-skins.min.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if lte IE 8]>
<link rel="stylesheet" href="assets/css/ace-ie.min.css" />
<![endif]-->
<link href="assets/css/management.css" rel="stylesheet" type="text/css" media="screen"/>
<!--
<script src="//cdnjscn.b0.upaiyun.com/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="//cdnjscn.b0.upaiyun.com/libs/json2/20130526/json2.min.js"></script>
-->
<script src="assets/js/jquery-1.7.2.min.js"></script>
<script src="assets/js/jquery.cookie-1.3.js"></script>
<script src="assets/js/bootstrap-2.3.2.min.js"></script>
<script src="assets/js/json2.js"></script>
<!-- 邮箱提示 -->
<script src="assets/js/email.js"></script>
<style type="text/css">
.out_box{border:1px solid #ccc; background:#fff; font:12px/20px Tahoma;}
.list_box{border-bottom:1px solid #eee; padding:0 5px; cursor:pointer;}
.focus_box{background:#f0f3f9;}
.mark_box{color:#c00;}
</style>
<!-- 邮箱提示 -->
<style type="text/css">
.login-layout {
background: none repeat scroll 0 0 #e3eaf0;
}
.login-layout .widget-box {
background-color: #ccc;
border-bottom: 0 none;
box-shadow: none;
overflow: hidden;
padding: 6px;
position: absolute;
transform: scale(0, 1) translate(-150px);
visibility: hidden;
width: 100%;
}
</style>
<script type="text/javascript">
$(function(){
var browserVersion = getBrowserVersion();
if(browserVersion != '' && browserVersion < 10){
alert('系统检测到您的浏览器版本是IE10以下,为了不影响您的使用,建议先升级浏览器或更换其它浏览器!')
}
//读取cookie
if($('#rememberme:checked').length>0){
$('#username').val($.cookie('tvs-cookies-userName'));
$('#password').val($.cookie('tvs-cookies-password'));
}else{
$('#username').val($.cookie('tvs-cookies-userName'));
$('#password').val($.cookie('tvs-cookies-password'));
}
$('#username').focus();
// 官网注册链接
var QSTR = getQueryString('comeFrom');
if(QSTR == 'easemobHome'){
$('#btnRegist').trigger('click');
}
var token = $.cookie('access_token');
if(token != null && typeof(token)!='undefined'){
window.location.href = 'app_list.html';
return;
}
});
/**
* 判断浏览器;
* @return
*/
function getBrowser() {
if(navigator.userAgent.indexOf("MSIE")>0) {
return "MSIE";
}
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
return "Firefox";
}
if(isChrome=navigator.userAgent.indexOf("Chrome")>0){
return "Chrome";
}
}
/**
* 判断浏览器具体版本号
* @return
*/
function getBrowserVersion() {
if(navigator.userAgent.indexOf("MSIE 6.0") > 0 ) {
return "6";
}
if(navigator.userAgent.indexOf("MSIE 7.0") > 0 ) {
return "7";
}
if(navigator.userAgent.indexOf("MSIE 8.0") > 0 ) {
return "8";
}
if(navigator.userAgent.indexOf("MSIE 9.0") > 0 ) {
return "9";
}
if(navigator.userAgent.indexOf("MSIE 10.0") > 0 ) {
return "10";
}
if(navigator.userAgent.indexOf("MSIE 11.0") > 0 ) {
return "11";
}
}
// 回车键登录
function keyLogin(){
if(!$('#login-box').hasClass('visible')){
return;
}
if(getBrowser() == 'Firefox'){
//判断IE还是火狐浏览器;
$("html").die().live("keydown",function(event){
if(event.keyCode==13){
//调用登陆方法;
$('#loginBtn').click();//调用登录按钮的登录事件
$('#loginBtn').attr('disable','true');
}
});
} else if(getBrowser() == 'MSIE' || getBrowser() == 'Chrome'){
if(event.keyCode==13){
//调用登陆方法;
$('#loginBtn').click();//调用登录按钮的登录事件
}
}
}
function onBlurRegOrgNameCheck(){
$('#regOrgName').val($('#regOrgName').val().trim());
var regOrgName = $('#regOrgName').val();
var regOrgNameRegex = /^(?!-)(?!.*?-$)[a-zA-Z0-9-]+$/;
if(regOrgName != '' && !regOrgNameRegex.test(regOrgName)){
$('#regOrgNameSMsg').css('display','none');
$('#regOrgNameEMsg').text('只能使用数字,字母,横线,且不能以横线开头和结尾!');
//$('#regOrgName').focus();
return;
}
if(regOrgName != '' && regOrgName.length < 3 || regOrgName.length > 18){
$('#regOrgNameSMsg').css('display','none');
$('#regOrgNameEMsg').text('企业ID长度在3-18个字符之间!');
//$('#regOrgName').focus();
return;
}
$('#regOrgNameSMsg').css('display','block');
$('#regOrgNameEMsg').text('');
}
function onBlurRegUserNameCheck(){
$('#regUserName').val($('#regUserName').val().trim());
var regUserName = $('#regUserName').val();
var regUserNameRegex = /^[0-9a-zA-Z]*$/;
if(regUserName != '' && !regUserNameRegex.test(regUserName)){
$('#regUserNameSMsg').css('display','none');
$('#regUserNameEMsg').text('只能使用字母,数字或字母数字组合!');
//$('#regUserName').focus();
return;
}
if(regUserName != '' && regUserName.length < 1 || regUserName.length > 18){
$('#regUserNameSMsg').css('display','none');
$('#regUserNameEMsg').text('用户长度在1-18个字符之间!');
//$('#regUserName').focus();
return;
}
$('#regUserNameSMsg').css('display','block');
$('#regUserNameEMsg').text('');
}
function onBlurRegPasswordCheck(){
$('#regPassword').val($('#regPassword').val().trim());
var regPassword = $('#regPassword').val();
if(regPassword != '' && regPassword.length < 6 || regPassword.length > 20){
$('#regPasswordSMsg').css('display','none');
$('#regPasswordEMsg').text('密码长度在6-20个字符之间!');
//$('#regPassword').focus();
return;
}
$('#regPasswordSMsg').css('display','block');
$('#regPasswordEMsg').text('');
}
function onBlurRegRePasswordCheck(){
var regPassword = $('#regPassword').val();
$('#regRePassword').val($('#regRePassword').val().trim());
var regRePassword = $('#regRePassword').val();
var regPassword = $('#regPassword').val();
if('' != regPassword && regPassword != regRePassword){
$('#regRePasswordEMsg').text('两次输入密码不一致!');
//$('#regRePassword').focus();
return;
}
$('#regRePasswordEMsg').text('');
}
function onBlurRegEmailCheck(){
$('#regEmail').val($('#regEmail').val().trim());
var regEmail = $('#regEmail').val();
var emailReg = /^([a-zA-Z0-9]+[_|\_|\-|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\-|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if(regEmail != '' && !emailReg.test(regEmail)){
$('#regEmailSEMsg').css('display','none');
$('#regEmailEMsg').text('请输入有效的邮箱!');
//$('#regEmail').focus();
return;
}else if(regEmail==''){
$('#regEmailSEMsg').css('display','none');
$('#regEmailEMsg').text('邮箱不能为空!');
return;
}
$('#regEmailEMsg').text('');
}
function onBlurRegTelCheck(){
$('#regTel').val($('#regTel').val().trim());
var regTel = $('#regTel').val();
var regTelReg = /^[0-9]*$/;
if(regTel != '' && !regTelReg.test(regTel)){
$('#regTelSEMsg').css('display','none');
$('#regTelEMsg').text('联系电话号码格式不符合要求!');
//$('#regEmail').focus();
return;
}
$('#regTellEMsg').text('');
}
function login(){
/*var adminType12 = $('#loginRole').find('option:selected').val();
if(adminType12 == 'app'){
if($('#yingyongname').val()==''){
//$('#regqiyeid').css('display','none');
$('#regyingyongname').text('企业应用不能为空!');
return;
}
appAdminLogin();
} else if(adminType12 == 'org'){
*/
orgAdminLogin();
//}
}
/*$(function(){
$('#qiyeid').hide();
$('#yingyongname').hide();
})*/
function app_org(){
var adminType = $('#loginRole').find('option:selected').val();
if(adminType == 'app'){
$('#qiyeid').show();
$('#yingyongname').show();
//appAdminLogin();
} else if(adminType == 'org'){
$('#qiyeid').hide();
$('#yingyongname').hide();
}
}
//function changeLabel(){
//var adminType = $('#loginRole').find('option:selected').val();
//if(adminType == 'app'){
//$('#appkeyLabel').show();
//} else if(adminType == 'org'){
// $('#appkeyLabel').hide();
//}
//}
// 点击返回登录清空注册数据
function clearBox(){
$('#regOrgName').val('');
$('#regUserName').val('');
$('#regPassword').val('');
$('#regRePassword').val('');
$('#regEmail').val('');
$('#regCompanyName').val('sss');
$('#regTel').val('');
$('#regOrgNameEMsg').text('');
$('#regUserNameEMsg').text('');
$('#regPasswordEMsg').text('');
$('#regRePasswordEMsg').text('');
$('#regEmailEMsg').text('');
$('#regTelEMsg').text('');
}
</script>
</head>
<body class="login-layout" onkeydown="keyLogin();" onLoad="app_org();">
<div id="main-container" class="container-fluid">
<div id="main-content">
<div class="row-fluid">
<div class="span12"><p>
<div class="login-container">
<div class="row-fluid">
<div class="center">
<h1 style="margin-top: 40px;" class="blue"> <img border="0" style="height:60px;" src="assets/images/login_logo.png" alt=""> </h1>
</div>
</div>
<div class="row-fluid">
<div class="position-relative">
<!-- ORG管理员登录 -->
<div class="visible widget-box no-border" id="login-box">
<div class="widget-body">
<div class="widget-main">
<div><h4 class="header blue lighter bigger"><img src="assets/images/cup.png" /> 请输入您的信息 </h4></div>
<div class="space-6"></div>
<fieldset>
<!-- 应用标示符 -->
<!--<label id="appkeyLabel"><span class="block input-icon input-icon-right">
<input type="text" placeholder="应用标识" nullmsg="应用标识!" datatype="*" class="span12" name="appkey" id="appkey"/>
<i class="icon-user"></i> <span class="Validform_checktip"></span></span>
<span id="appkeyEMsg" style="font-size:12px;color:red"></span>
</label>-->
<!-- 用户名 -->
<label><span class="block input-icon input-icon-right">
<input type="text" placeholder="用户名" nullmsg="请输入用户名!" datatype="*" class="span12" name="username" id="username" onClick="keyLogin()"/>
<i class="icon-user"></i> <span class="Validform_checktip"></span></span>
<span id="usernameEMsg" style="font-size:12px;color:red"></span>
</label>
<!-- 密码 -->
<label> <span class="block input-icon input-icon-right">
<input type="password" nullmsg="请输入密码!" placeholder="密码" class="span12" name="password" id="password" onClick="keyLogin()" />
<i class="icon-lock"></i> <span class="Validform_checktip"></span></span>
<span id="passwordEMsg" style="font-size:12px;color:red"></span>
</label>
<!--<label><span class="block input-icon input-icon-right">
<input type="text" placeholder="企业ID" nullmsg="请输入企业ID!" datatype="*" value="" class="span12" name="qiyeid" id="qiyeid" onclick="keyLogin()"/>
<span class="Validform_checktip"></span></span>
<span id="regqiyeid" style="font-size:12px;color:red"></span>
</label>
<label><span class="block input-icon input-icon-right">
<input type="text" placeholder="应用名称" nullmsg="请输入应用名称!" datatype="*" class="span12" name="yingyongname" id="yingyongname" onclick="keyLogin()"/><span class="Validform_checktip"></span><span id="regyingyongname" style="font-size:12px;color:red"></span></span>
</label>
<div class="row-fluid">
<div class="span8">
<select name="loginRole" id="loginRole" style="WIDTH:300px" onchange="app_org()">
<option value="org">企业管理员</option>
<option value="app">APP管理员</option>
</select>
</div>
</div>
-->
<div class="space"></div>
<div class="row-fluid">
<div class="span8">
<input type="checkbox" checked="true" name="rememberme" id="rememberme">
<span class="lbl">记住我</span>
</div>
<button id="loginBtn" class="span4 btn btn-small btn-primary" onClick="login();"> <i class="icon-key"></i> <span id="cont">登录</span> </button>
</div>
</fieldset>
</div>
<div class="toolbar clearfix">
<div>
<a href="javascript:void(0);" onClick="show_box('forgot-box'); return false;" class="forgot-password-link">
<i class="icon-arrow-left"></i>
忘记密码?
</a>
</div>
<div>
<a href="javascript:void(0);" id="btnRegist" onClick="show_box('signup-box'); return false;" class="forgot-password-link">
去注册
<i class="icon-arrow-right"></i>
</a>
</div>
</div>
</div>
</div>
<!-- ORG管理员找回密码 -->
<div class="widget-box no-border" id="forgot-box">
<div class="widget-body">
<div class="widget-main">
<h4 class="header red lighter bigger"> <i class="icon-key"></i> 找回密码 </h4>
<div class="space-6"></div>
<p> 请输入您的注册时使用的邮箱 </p>
<fieldset>
<label> <span class="block input-icon input-icon-right">
<input type="text" id="email" name="email" placeholder="Email" class="span12" value="">
<i class="icon-envelope"></i> </span>
<span id="emailEMsg" style="font-size:12px;color:red"></span>
</label>
<div class="row-fluid">
<a class="span5 offset7 btn btn-small btn-danger" onClick="resetPasswd();"> <i class="icon-lightbulb"></i> 找回!</a>
</div>
</fieldset>
</div>
<div class="toolbar center"> <a class="back-to-login-link" onClick="show_box('login-box'); return false;" href="javascript:void(0);"> 返回登录 <i class="icon-arrow-right"></i> </a> </div>
</div>
</div>
<!-- ORG管理员注册 -->
<div class="widget-box no-border" id="signup-box">
<div class="widget-body">
<div class="widget-main">
<h4 class="header green lighter bigger"> <i class="icon-group blue"></i> 新用户注册 </h4>
<div class="space-6"></div>
<p> 请详细输入您的信息: </p>
<fieldset>
<label> <span class="block input-icon input-icon-right">
<input type="text" id="regOrgName" name="regOrgName" placeholder="企业ID" class="span12" onBlur="onBlurRegOrgNameCheck()" value="" onKeyUp="value=value.replace(/[\uFF00-\uFFFF]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\uFF00-\uFFFF]/g,''))" />
<i class="icon-home"></i></span>
<span id="regOrgNameSMsg" style="font-size:12px">3~18个字符,可使用字母,数字,横线,不能以横线开头</span>
<div id="regOrgNameSMsg" style="font-size:12px;clear:both;">说明:企业ID是账户的唯一标识,一个企业ID下可以注册多个App </div>
<span id="regOrgNameEMsg" style="font-size:12px;color:red"></span>
</label>
<label> <span class="block input-icon input-icon-right">
<input type="text" id="regUserName" placeholder="用户名" class="span12" name="regUserName" value="" onBlur="onBlurRegUserNameCheck()">
<i class="icon-user"></i></span>
<span id="regUserNameSMsg" style="font-size:12px">1~18个字符,可使用字母、数字</span>
<span id="regUserNameEMsg" style="font-size:12px;color:red"></span>
</label>
<label> <span class="block input-icon input-icon-right">
<input type="password" id="regPassword" placeholder="密码" class="span12" name="regPassword" value="" onBlur="onBlurRegPasswordCheck()">
<i class="icon-lock"></i> </span>
<span id="regPasswordSMsg" style="font-size:12px">6~20个字符,区分大小写</span>
<span id="regPasswordEMsg" style="font-size:12px;color:red"></span>
</label>
<label> <span class="block input-icon input-icon-right">
<input type="password" id="regRePassword" placeholder="重复密码" class="span12" name="regRePassword" value="" onBlur="onBlurRegRePasswordCheck()" />
<i class="icon-lock"></i> </span>
<span id="regRePasswordEMsg" style="font-size:12px;color:red"></span>
</label>
<label> <span class="block input-icon input-icon-right">
<input type="text" id="regEmail" placeholder="电子邮件" size="48px" class="span12" name="regEmail" value="" onBlur="onBlurRegEmailCheck()">
<i class="icon-envelope"></i></span>
<span id="regEmailSEMsg" style="font-size:12px;"></span>
<span id="regEmailEMsg" style="font-size:12px;color:red"></span>
</label>
<script type="text/javascript">
$("#regEmail").mailAutoComplete({
boxClass: "out_box", //外部box样式
listClass: "list_box", //默认的列表样式
focusClass: "focus_box", //列表选样式中
markCalss: "mark_box", //高亮样式
autoClass: false,
textHint: true //提示文字自动隐藏
});
</script>
<label> <span class="block input-icon input-icon-right">
<input type="text" id="regCompanyName" placeholder="企业名称" class="span12" name="regCompanyName" value="" />
<i class="icon-home" style="z-index:0;"></i></span>
<span id="regCompanyNameSEMsg" style="font-size:12px;"></span>
<span id="regCompanyNameEMsg" style="font-size:12px;color:red"></span>
</label>
<label><span class="block input-icon input-icon-right">
<input type="text" id="regTel" placeholder="联系电话" class="span12" name="regTel" value="" onBlur="onBlurRegTelCheck()">
<i class="icon-dashboard" style="z-index:0;"></i></span>
<span id="regTelSEMsg" style="font-size:12px;">固话或者移动电话号码</span>
<span id="regTelEMsg" style="font-size:12px;color:red"></span>
</label>
<label>
<input type="checkbox" id="agreeCBox" checked="checked">
<span class="lbl"> 同意遵守<a href="http://easemob.com/about/terms/" target="_blank">【环信开发者平台服务协议】</a></span>
</label>
<div class="space-24"></div>
<div class="row-fluid">
<button class="span6 btn btn-small" id="resetForm" onClick="resetForm()"> <i class="icon-refresh"></i> 重新填写 </button>
<button class="span6 btn btn-small" id="formSubBtn" onClick="formSubmit();"> 注册 <i class="icon-arrow-right icon-on-right"></i> </button>
</div>
</fieldset>
</div>
<div class="toolbar center"> <a class="back-to-login-link" onClick="clearBox();show_box('login-box');" href="javascript:void(0);"> <i class="icon-arrow-left"></i> 返回登录 </a> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="assets/js/management.js"></script>
</html>