843 lines
36 KiB
HTML
843 lines
36 KiB
HTML
|
|
<!doctype html>
|
|
<html style="background:#114b57 url(image/login_bg.png) no-repeat 0 0; background-size: 100% 100%">
|
|
|
|
<head runat="server">
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
|
|
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
|
|
<title>会员登录</title>
|
|
<link rel="stylesheet" type="text/css" href="/css/api.css" />
|
|
<link rel="stylesheet" type="text/css" href="/css/content.css" />
|
|
<link rel="stylesheet" type="text/css" href="/css/switch.css" />
|
|
<script type="text/javascript" src="/scripts/jquery-2.0.2.min.js"></script>
|
|
<script type="text/javascript" src="/scripts/jquery.cookie.min.js"></script>
|
|
<script type="text/javascript" src="/script/main.js"></script>
|
|
<script type="text/javascript" src="/layer/layer.js"></script>
|
|
<script type="text/javascript" src="/Scripts/long.js"></script>
|
|
<script type="text/javascript" src="/script/api.js"></script>
|
|
<style>
|
|
html, body {
|
|
overflow: hidden;
|
|
background-color: #051E54;
|
|
}
|
|
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
|
|
color: #bbb;
|
|
}
|
|
|
|
.showthjto {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.8em;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.showthjto_box {
|
|
position: relative;
|
|
border-radius: 0.5em;
|
|
width: 100%;
|
|
}
|
|
|
|
.showthjto h3 span {
|
|
float: left;
|
|
margin-top: 0.8em;
|
|
margin-left: 0em;
|
|
display: block;
|
|
width: 100%;
|
|
height: 2em;
|
|
text-align: center;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.tixin-item .account {
|
|
border: 0;
|
|
}
|
|
.layer, .notice-layer {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 100;
|
|
background: rgba(0, 0, 0, .5);
|
|
text-align: center;
|
|
padding: 0;
|
|
display: none;
|
|
align-items: center;
|
|
justify-items: center;
|
|
}
|
|
|
|
.notice-layer .notice-box {
|
|
float: none;
|
|
width: 95%;
|
|
margin: 0 auto;
|
|
margin-top: 0;
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: #fff;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
|
|
.notice-box .n-tit {
|
|
width: 100%;
|
|
margin-top: 0;
|
|
height: 4rem;
|
|
position: relative;
|
|
padding: 0;
|
|
line-height: 4rem;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
font-size: 1.2em;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.notice-box .cont {
|
|
margin: 0.5rem;
|
|
height: 28rem;
|
|
overflow-y: scroll;
|
|
text-align: left;
|
|
}
|
|
|
|
.notice-box .cont p {
|
|
font-size: 1em;
|
|
line-height: 2.2rem;
|
|
margin-bottom: .8rem;
|
|
}
|
|
|
|
.notice-box .btn {
|
|
padding: 0.8em;
|
|
}
|
|
|
|
.notice-box .btn div {
|
|
float:left;
|
|
display: block;
|
|
width: 50%;
|
|
height: 2.8rem;
|
|
line-height: 2.8rem;
|
|
text-align: center;
|
|
color: #fff;
|
|
margin: 0.8em auto;
|
|
border-radius: 15px;
|
|
font-size: 1.6rem;
|
|
text-decoration: none;
|
|
}
|
|
.notice-box .btn div.mybtn.hovered {
|
|
color: #848484;
|
|
}
|
|
.input_box input[type='checkbox'], .input_box input[type='radio'] {
|
|
width: 1.4em;
|
|
height: 1.4em;
|
|
}
|
|
|
|
.input_box input[type='checkbox'] {
|
|
border: 0;
|
|
background: url("../image/wxz.png") no-repeat 0 0;
|
|
background-size: 100% 100%;
|
|
}
|
|
|
|
.input_box input[type='checkbox']:checked {
|
|
background-image: url("../image/xz.png");
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header class="renwuheader" id="aui-header">
|
|
<div class="ub">
|
|
<div class="nav-btn" id="nav-left" style=" margin:0; padding:0; padding-top:0.2em; min-width:4em" onclick="closeWin()">
|
|
|
|
<img src="/image/faifei.png" style="margin-left:0; margin-top:0em; height:1.2em;width:1.2em;" />
|
|
|
|
|
|
</div>
|
|
<h1 class="ub-f1" tabindex="0" style=" margin:0; padding:0; position:relative; font-size:16px; ">
|
|
登录
|
|
</h1>
|
|
<div class="nav-btn blue" id="nav-right" style=" margin:0; padding:0; min-width:4em">
|
|
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="up ub ub-ver" style="padding:0.8em;">
|
|
|
|
<!--header结束--><!--content开始-->
|
|
<div id="content" class="ub-f1 tx-l " style="">
|
|
<div class="ub ub-ac ub-pc ub-ver" style=" padding-top:2em; padding-bottom: 2em;"><img src="/image/logo.png" style="width:8em;height:8em;border-radius: 0.4em;" /><!--<div style="width:100%; margin-top:.5em; text-align: center; font-size: 1.5em; font-weight:500;color:#fff;">全域播商</div>--></div>
|
|
|
|
<div class="ub ub-pc ub-ac dlnav" style="">
|
|
|
|
<div class="ub ub-pc ub-ac hovered" id="nav0" onclick="onnav(0)">账号密码登录</div>
|
|
<div class="ub ub-pc ub-ac" id="nav1" onclick="onnav(1)">验证码登录</div>
|
|
|
|
|
|
</div>
|
|
<div class="ub ub-ver" style="padding:0; background-color:rgb(12,34,93,0.4);border-radius: .4em; border: solid 1px #20A7A3;">
|
|
<div class="ub ub-ver" id="dlbox0">
|
|
<div class="ub uinput5" style="width:100%; height: 2.5em;border-bottom: none;padding:0 0.8em;box-sizing:border-box;">
|
|
<div class="ub" style="width:1.6em;height:100%; overflow: hidden;">
|
|
<img src="/image/userico.png" style=" margin:0; padding:0;margin-top:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
<div class="ub ub-f1" style="height:100%; overflow: hidden;padding:0;">
|
|
<input style="margin:0;padding:0;width:100%; height:100%; " type="text" id="txtusername" placeholder="请输入账号" />
|
|
</div>
|
|
<div class="ub" onclick="showbox(0)" style="width:1.2em;height:100%; overflow: hidden;">
|
|
<img src="/image/faifeidown.png" style=" margin:0; padding:0;margin-top:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
</div>
|
|
<div class="ub uinput5" style="width:100%; height: 2.5em; border-top: solid 1px #0B8A85;border-bottom: solid 1px #0B8A85;padding:0 0.8em;box-sizing:border-box;">
|
|
<div class="ub" style="width:1.6em;height:100%; overflow: hidden;">
|
|
<img src="/image/pwdico0.png" style="margin:0 0em; padding:0;margin-top:0.5em;height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
<div class="ub ub-f1" style="height:100%; overflow: hidden;padding:0;">
|
|
<input style="margin:0; padding:0; width:100%; height:100%; " type="password" placeholder="请输入密码" id="txtpsd" />
|
|
</div>
|
|
<div class="ub" onclick="showmm()" style="width:1.2em;height:100%; overflow: hidden;">
|
|
<img src="/image/showmm.png" id="showmm" style="margin:0; padding:0;margin-top:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="ub ub-ver uhide" id="dlbox1">
|
|
<div class="ub uinput5" style="height: 2.5em;border-bottom: none;padding:0 0.8em;box-sizing:border-box">
|
|
<div class="ub" style="width:1.6em;height:100%; overflow: hidden;">
|
|
<img src="/image/userico.png" style=" margin:0; margin-top:0.5em; padding:0; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
<div class="ub ub-f1" style="height:100%; overflow: hidden;">
|
|
<input style="width:100%;" type="text" id="userphone" placeholder="请输入手机号码" />
|
|
</div>
|
|
<div class="ub" onclick="showbox(0)" style="width:1.2em;height:100%; overflow: hidden;">
|
|
<img src="/image/faifeidown.png" style=" margin:0; padding:0;margin-top:0.5em; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
</div>
|
|
<div class="ub uinput5" style="margin:0; border-top: solid 1px #0B8A85;border-bottom: solid 1px #0B8A85;padding:0 0.8em;box-sizing:border-box">
|
|
<div class="ub" style="width:1.4em;height:100%; overflow: hidden;">
|
|
<img src="/image/yzmico.png" style=" margin:0;margin-top:0.5em; padding:0; height:1.2em; width:1.2em; vertical-align: middle;">
|
|
</div>
|
|
<div class="ub ub-f1" style="height: 2.5em;margin-right:0;padding:0 0.2em">
|
|
<input class="ub" style="width: 100%;margin:0;" type="text" maxlength="6" placeholder="请输入验证码" id="usercode" />
|
|
</div>
|
|
<div class="ub" style="width:auto;height:100%; overflow: hidden;">
|
|
<input class="tx-c" id="getcode" type="button" style=" border:0;width:100%;margin:0;padding-left:0.5em; height:2.4em;background:none;box-sizing:border-box;color:#23B6B2" value="获取验证码" onclick="getcode()" />
|
|
|
|
</div>
|
|
<input type="hidden" id="ttype" value="0" />
|
|
</div>
|
|
</div>
|
|
<div class="ub" style="padding:0 0.8em;margin-top: 1em;">
|
|
|
|
<div class="am-switch" onclick="onSwitch()">
|
|
<div class="am-switch-handle"></div>
|
|
</div>
|
|
<div class="ub ub-pc ub-ac" id="switch_title" style="padding-left:0.5em;color:#E1FFFF;">记住账号和密码</div>
|
|
|
|
|
|
</div>
|
|
<div class="ub ub-pc ub-ac" style="padding:0 0.8em;width:100%;box-sizing:border-box;">
|
|
<div id="login" class="ub ub-pc ub-ac" onclick="login()" style="width:100%;padding: .6em 2.5em;margin-top: 1.2em;border-radius: .4em;box-sizing:border-box;">
|
|
登录
|
|
</div>
|
|
</div>
|
|
<div class="ub ub-pc ub-ac">
|
|
<div class="ub input_box" style="margin: 0 auto; padding: 0.8em 0; width: auto; font-size: 0.85em;">
|
|
<div class="ub" style="width:1.4em;"><input type="checkbox" id="IFYYD" /></div>
|
|
<div class="ub-f1" style="margin-left: 0.2em; text-align: left;color:#fff">
|
|
<span id="readed">登录即表示您已同意</span><span onclick="showkhxy(341)" id="read_title" style="color: #23B6B2;">《用户协议》</span>和<span onclick="showkhxy(224167)" id="read_title0" style="color: #23B6B2;">《隐私政策》</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ub ub-pc ub-ac" style="height: 2em;padding:0 0em;margin: 1.2em;">
|
|
<div id="fgpsd" class="ub ub-f1 ub-pc ub-ac" onclick="onlink('/mobile/getpsd.html')" style="width: 50%;font-size: .8em;padding:.7em;color:#23B6B2;">
|
|
忘记密码
|
|
</div>
|
|
<div id="register" class="ub ub-f1 ub-pc ub-ac" onclick="onlink('/mobile/register.html')" style="width: 50%;font-size: .8em;padding:.7em;color:#23B6B2;">
|
|
注册新会员
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--content结束-->
|
|
</div>
|
|
<footer style="border-top: 0;background:none;">
|
|
<div class="ub ub-ac ub-pc ub-ver" style="margin: 0 auto; width: 100%; text-align: center; ">
|
|
|
|
<div class="ub uhide" id="icp_box" style="margin: 0 auto; padding: 0.8em 0; width: auto; font-size: 0.85em;color:#fff">
|
|
© 湖南盛世丰花生物科技股份有限公司 2025 <a href="https://beian.miit.gov.cn/" target="_blank">湘ICP备2025145656号-1</a>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
<div class="showthjto uhide" id="showthjto0" onclick='hideshowthjto(0);'>
|
|
<div class="showthjto_box" onclick="stopPropagation(event)">
|
|
<h3><span>选择账号</span><!--<span class="close" onclick='hideshowthjto(0);'>X</span>--></h3>
|
|
|
|
<div class="tixin-item" style="background:none; color:#848484; margin-bottom: .08em; padding:0.8em 0; border:0; border-radius:0;box-shadow:none;max-height:20em; overflow:hidden; overflow-y:auto;">
|
|
<ul class="account" id="showthjto_body"></ul>
|
|
</div>
|
|
|
|
<div class="ub ub-ac ub-pc" style="margin-bottom: .08em;">
|
|
<input type="button" class="mybtn" id="btntj" onclick='onqk(0);' value="清空" />
|
|
<input type="button" class="mybtn hovered" id="btnqx" onclick='hideshowthjto(0);' value="取消" />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="showthjto uhide" id="showthjto3" onclick='hideshowthjto(3);'>
|
|
<div class="showthjto_box" onclick="stopPropagation(event)">
|
|
<h3><span>用户服务协议和隐私政策</span><!--<span class="close" onclick='hideshowthjto(0);'>X</span>--></h3>
|
|
|
|
<div class="ub ub-ac" id="showthjto_body" style="background-color: #FFFFFF; color:#848484; margin-bottom: .08em; padding:0.8em 0;">
|
|
请您务必审慎阅读、充分理解<span class="blue" onclick="showkhxy(341)">《用户服务协议》</span>和<span class="blue" onclick="showkhxy(224167)">《隐私政策》</span>各条款,
|
|
包括但不限于:为了更好的向您提供服务,我们需要收集您的设备标识、操作日志等信息用于分析、优化应用性能。您可阅读
|
|
<span class="blue" onclick="showkhxy(341)">《用户服务协议》</span>和<span class="blue" onclick="showkhxy(224167)">《隐私政策》</span>了解详细信息。如果您同意,请点击
|
|
下面按钮开始接受我们的服务。
|
|
</div>
|
|
|
|
<div class="ub ub-ac ub-pc" style="margin-bottom: .08em;">
|
|
<input type="button" class="mybtn tx-c" id="btntj" onclick="setreadprivacy()" value="同意并接受" />
|
|
<input type="button" class="tx-c" id="btnqx" onclick='hideshowthjto(3);' value="暂不同意" />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="notice-layer" id="notice-detial">
|
|
<div class="notice-box">
|
|
<div class="n-tit" id="notice_title"></div>
|
|
<div class="cont" id="notice_body">
|
|
<div style="text-align:center;"><img src="image/load.gif" /><br>正在加载...</div>
|
|
</div>
|
|
<div class="btn">
|
|
<div onclick='$("#IFYYD").prop("checked",true); $("#notice-detial").fadeOut();' class="mybtn" id="yreaded">同意</div>
|
|
<div onclick='$("#IFYYD").prop("checked",false);$("#notice-detial").fadeOut();' class="mybtn hovered" id="yreaded0">不同意</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="ajaxLoader ub ub-ac uhide" onclick="reload()">
|
|
<div class="ub ub-ac ub-ver"><img src="image/load.gif" /><br>正在加载...</div>
|
|
</div>
|
|
<!--<script type="text/javascript" src="./script/particles.min.js"></script>
|
|
<script type="text/javascript" src="./script/particles-app.js"></script>-->
|
|
</body>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var isjz=0;
|
|
var ifsq = 0, ifapp = 0, ifvideo = 0;
|
|
var IFUpdating = 0;
|
|
$(document).ready(function () {
|
|
var app = $.getUrlParam("app");
|
|
if (app != null) {
|
|
ifapp = app;
|
|
|
|
} else {
|
|
var aifapp = getlocalStorage("ifapp");
|
|
if (aifapp != null) {
|
|
ifapp = aifapp;
|
|
}
|
|
}
|
|
var aifvideo = $.getUrlParam("ifvideo");
|
|
if (aifvideo != null) {
|
|
ifvideo = aifvideo;
|
|
setlocalStorage("ifvideo", ifvideo);
|
|
}
|
|
if (ifapp == 1) {
|
|
$("header").addClass("appheader");
|
|
setlocalStorage("ifapp", 1);
|
|
$("#icp_box").addClass("uhide");
|
|
} else {
|
|
$("#icp_box").removeClass("uhide");
|
|
}
|
|
var userId = getlocalStorage("userId");
|
|
var LoginId = getlocalStorage("LoginId");
|
|
if (userId != null && LoginId != null) {
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: "/apiajax.ashx?action=updateonline&userId=" + userId + "&LoginId=" + LoginId,
|
|
dataType: "json",
|
|
error: function (xhr, type) {
|
|
etishi3(etype == 0 ? "读取数据错误" : "Error reading data");
|
|
},
|
|
success: function (data) {
|
|
if (data) {
|
|
|
|
if (data.status == 1) {
|
|
onlink("/mobile/");
|
|
} else {
|
|
|
|
}
|
|
} else {
|
|
etishi3(etype == 0 ? "网络异常,请稍后重试" : "Network exception, please try again later");
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
var LoginUserData = getlocalStorage("LoginUserData");
|
|
if (LoginUserData != null) {
|
|
|
|
var LoginDatas = LoginUserData.split(",");
|
|
var html = "";
|
|
for (var i = 0; i < LoginDatas.length; i++) {
|
|
if (LoginDatas[i] != "") {
|
|
var UserData = LoginDatas[i].split("|");
|
|
html += "<li class='flex-end item_box' id='item_box_" + UserData[0] + "' onclick='onitem(\"" + UserData[0] + "\")' psd='" + UserData[1] + "'><p>" + UserData[0] + "</p><i class='current " + (i == 0 ? "on" : "") + "'></i></li>";
|
|
if (i == LoginDatas.length-1) {
|
|
$("#txtusername").val(UserData[0]);
|
|
$("#userphone").val(UserData[0]);
|
|
if (UserData[1] != "") {
|
|
$("#txtpsd").val(new Base64().decode(UserData[1]));
|
|
}
|
|
isjz = 1;
|
|
$(".am-switch").addClass("am-active");
|
|
}
|
|
}
|
|
}
|
|
$("#showthjto_body").html(html);
|
|
}
|
|
if (ifapp == 1) {
|
|
var setreadprivacyData = getlocalStorage("setreadprivacyData1");
|
|
|
|
if (setreadprivacyData == null) {
|
|
showbox(3);
|
|
}
|
|
}
|
|
});
|
|
|
|
function onSwitch() {
|
|
if ($(".am-switch").hasClass("am-active")) {
|
|
isjz = 0;
|
|
$(".am-switch").removeClass("am-active");
|
|
} else {
|
|
isjz = 1;
|
|
$(".am-switch").addClass("am-active");
|
|
}
|
|
}
|
|
var updatecontent="";
|
|
function onnav(t) {
|
|
$("#ttype").val(t);
|
|
if (t == 0) {
|
|
$("#nav0").addClass("hovered");
|
|
$("#nav1").removeClass("hovered");
|
|
$("#dlbox0").removeClass("uhide");
|
|
$("#dlbox1").addClass("uhide");
|
|
$("#switch_title").html("记住手机号码和密码");
|
|
} else {
|
|
$("#nav1").addClass("hovered");
|
|
$("#nav0").removeClass("hovered");
|
|
$("#dlbox1").removeClass("uhide");
|
|
$("#dlbox0").addClass("uhide");
|
|
$("#switch_title").html("记住手机号码");
|
|
}
|
|
}
|
|
function showbox(type) {
|
|
$("#showthjto" + type).removeClass("uhide");
|
|
$(".account .current.on").removeClass('on');
|
|
var t = $("#ttype").val();
|
|
var uid = $("#txtusername").val();
|
|
if (t == 1) {
|
|
uid = $("#userphone").val();
|
|
}
|
|
$("#item_box_" + uid + " .current").addClass('on');
|
|
}
|
|
function setreadprivacy() {
|
|
setlocalStorage("setreadprivacyData1", 1);
|
|
$("#showthjto3").addClass("uhide");
|
|
}
|
|
function hideshowthjto(type) {
|
|
$("#showthjto" + type).addClass("uhide");
|
|
if (type == 3) {
|
|
setlocalStorage("setreadprivacyData1", 0);
|
|
}
|
|
}
|
|
function onqk(type) {
|
|
clearlocalStorage("LoginUserData");
|
|
$("#showthjto_body").html("");
|
|
hideshowthjto(type);
|
|
}
|
|
function showmm() {
|
|
var src = $("#showmm").attr("src");
|
|
if (src == "../image/showmm0.png") {
|
|
$("#showmm").attr("src", "../image/showmm.png");
|
|
$("#txtpsd").attr("type", "password");
|
|
} else {
|
|
$("#showmm").attr("src", "../image/showmm0.png");
|
|
var val = $("#txtpsd").val();
|
|
$("#txtpsd").attr("type", "text");
|
|
$("#txtpsd").val(val);
|
|
}
|
|
}
|
|
function onitem(uid) {
|
|
var username = $("#item_box_" + uid + " p").html();
|
|
var psd = $("#item_box_" + uid).attr("psd");
|
|
var t = $("#ttype").val();
|
|
if (t == 0) {
|
|
$("#txtusername").val(username);
|
|
if (psd != "") {
|
|
$("#txtpsd").val(new Base64().decode(psd));
|
|
}
|
|
} else {
|
|
$("#userphone").val(username);
|
|
}
|
|
$(".account .current.on").removeClass('on');
|
|
$("#item_box_" + uid + " .current").addClass('on');
|
|
hideshowthjto(0);
|
|
}
|
|
function checkMobilePhone(str) {
|
|
if (str.match(/^(?:11\d|12\d|13\d|14\d|15\d|16\d|17\d|18\d|19\d)-?\d{5}(\d{3}|\*{3})$/) == null) {
|
|
b = false;
|
|
}
|
|
else {
|
|
return true;
|
|
}
|
|
}
|
|
function getcode() {
|
|
var phone = fTrim($("#userphone").val());
|
|
if (phone != "") {
|
|
$("#getcode").val("发送中...");
|
|
var t = 0;
|
|
if (!checkMobilePhone(phone)) {
|
|
t = 1;
|
|
}
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: "/apiajax.ashx?action=sendphonecode0&ifweb=1&phone=" + phone + "&t=" + t,
|
|
dataType: "json",
|
|
error: function (xhr, type) {
|
|
tishi3("读取数据错误");
|
|
},
|
|
success: function (data) {
|
|
if (data) {
|
|
|
|
if (data.status == 1) {
|
|
yzid = data.yzid;
|
|
time($api.dom("#getcode"));
|
|
} else {
|
|
tishi3(data.msg);
|
|
$("#getcode").val("获取验证码");
|
|
}
|
|
} else {
|
|
tishi3("网络异常,请稍后重试");
|
|
|
|
}
|
|
}
|
|
});
|
|
} else {
|
|
tishi3("账号不能为空");
|
|
}
|
|
}
|
|
var wait = 120;
|
|
function time(o) {
|
|
if (wait == 0) {
|
|
$(o).removeAttr("disabled");
|
|
//o.className = 'btn-cl bc-l1 code';
|
|
$(o).val("获取验证码");
|
|
wait = 120;
|
|
} else {
|
|
$(o).attr("disabled", true);
|
|
//o.className = 'btn-cl code gary';
|
|
|
|
$(o).val("重新发送(" + wait + ")");
|
|
wait--;
|
|
setTimeout(function() {
|
|
time(o)
|
|
}, 1000)
|
|
}
|
|
|
|
}
|
|
|
|
function login() {
|
|
if (ifapp == 1 && ifvideo==0) {
|
|
var ifb = true;
|
|
var ifb0 = true;
|
|
try {
|
|
var permission = 'storage';
|
|
var resultList = api.hasPermission({
|
|
list: [permission]
|
|
});
|
|
var granted = resultList[0].granted;
|
|
if (!granted) {
|
|
ifb = false;
|
|
layer.confirm('应用需要您的授权才能访问存储,是否要授权?', {
|
|
btn: ['是', '否'] //按钮
|
|
}, function () {
|
|
api.requestPermission({
|
|
list: [permission],
|
|
}, function (res) {
|
|
if (res.list[0].granted) {
|
|
// 已授权,可以继续下一步操作
|
|
tishi3('已授权');
|
|
var username = fTrim($("#txtusername").val());
|
|
var pwd = fTrim($("#txtpwd").val());
|
|
if (username == "") {
|
|
tishi4('请输入您的用户账号', '#txtusername')
|
|
return false;
|
|
}
|
|
|
|
if (pwd == "") {
|
|
tishi4('请输入您的密码', '#txtpwd')
|
|
return false;
|
|
}
|
|
denglu_go();
|
|
ifb0 = false;
|
|
} else {
|
|
ifb = false;
|
|
}
|
|
});
|
|
}, function () {
|
|
ifb = false;
|
|
});
|
|
} else {
|
|
denglu_go();
|
|
}
|
|
} catch (err) {
|
|
denglu_go();
|
|
}
|
|
} else {
|
|
denglu_go();
|
|
}
|
|
}
|
|
function denglu_go() {
|
|
var t = $("#ttype").val();
|
|
|
|
var username = "";
|
|
var psd = "";
|
|
if (t == 0) {
|
|
username = fTrim($("#txtusername").val());
|
|
psd = fTrim($("#txtpsd").val());
|
|
} else {
|
|
username = fTrim($("#userphone").val());
|
|
psd = fTrim($("#usercode").val());
|
|
}
|
|
|
|
var b = true;
|
|
if (b) {
|
|
if (username == "") {
|
|
tishi3("手机号码不能为空!");
|
|
b = false;
|
|
if (t == 0) {
|
|
$("#txtusername").focus();
|
|
} else {
|
|
$("#userphone").focus();
|
|
}
|
|
}
|
|
}
|
|
if (b) {
|
|
if (psd == "") {
|
|
tishi3("密码不能为空!");
|
|
b = false;
|
|
if (t == 0) {
|
|
$("#txtpsd").focus();
|
|
} else {
|
|
$("#usercode").focus();
|
|
}
|
|
}
|
|
}
|
|
if (b) {
|
|
if (!$("#IFYYD").prop("checked")) {
|
|
b = false;
|
|
tishi3("请点击同意用户协议和隐私政策!");
|
|
}
|
|
}
|
|
if (b) {
|
|
|
|
$("#login").html("登录中,请稍候...");
|
|
var version = "", plat = "";
|
|
if (ifapp == 1) {
|
|
try {
|
|
|
|
version = api.appVersion;
|
|
var systemType = api.systemType;
|
|
if (systemType == "ios") {
|
|
plat = "0";
|
|
}
|
|
else if (systemType == "android") {
|
|
plat = "1";
|
|
if (version == "0.0.6") {
|
|
setlocalStorage("ifvideo", 1);
|
|
}
|
|
}
|
|
|
|
} catch (e) {
|
|
alert(e);
|
|
}
|
|
}
|
|
try {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "/apiajax.ashx?ifweb=1",
|
|
data: { "action": "login", "username": encodeURI(username), "password": encodeURI(psd), "ttype": t, version: version, plat: plat, ifvideo: ifvideo },
|
|
//data: "&action=login&username=" + username + "&password=" + psd + "&ttype=" + t,
|
|
dataType: "json",
|
|
error: function (xhr) {
|
|
tishi3("发生错误:" + JSON.stringify(xhr));
|
|
},
|
|
success: function (data) {
|
|
if (data) {
|
|
|
|
if (data.status == 0) {
|
|
|
|
$("#login").html("登录");
|
|
if (data.msg == "有新的版本,您必须更新才能登录") {
|
|
var _index = layer.confirm('有新的版本,您必须更新才能登录', {
|
|
btn: ['去更新', '不更新,谢谢!'] //按钮
|
|
}, function () {
|
|
api.download({
|
|
url: encodeURI(updateurl + data.UpdateBL),
|
|
savePath: "fs://app/" + data.UpdateBL,
|
|
encode: false,
|
|
report: true,
|
|
cache: false,
|
|
allowResume: true
|
|
}, function (ret, err) {
|
|
|
|
if (ret.state == 0) {
|
|
api.showProgress({
|
|
title: '正在下载',
|
|
text: '已完成:' + ret.percent + '%',
|
|
modal: false
|
|
});
|
|
}
|
|
else if (ret.state == 1) {
|
|
api.hideProgress();
|
|
IFUpdating = 0;
|
|
|
|
api.installApp({
|
|
appUri: ret.savePath
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
alert(JSON.stringify(ret));
|
|
IFUpdating = 0;
|
|
}
|
|
});
|
|
}, function () {
|
|
});
|
|
} else {
|
|
if (t == 0) {
|
|
if (data.msg == "你的手机号未验证需要用手机验证码登录!") {
|
|
tishi3(data.msg);
|
|
$("#userphone").val(username);
|
|
onnav(1);
|
|
} else {
|
|
tishi3(data.msg);
|
|
}
|
|
} else {
|
|
tishi3(data.msg);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (isjz == 1) {
|
|
var logpsd = "";
|
|
if (t == 0) {
|
|
logpsd = new Base64().encode(psd);
|
|
}
|
|
var LoginDatas = "";
|
|
var LoginUserData = getlocalStorage("LoginUserData");
|
|
if (LoginUserData != null) {
|
|
LoginDatas = LoginUserData;
|
|
}
|
|
if (LoginDatas != "") {
|
|
var ifadd = true;
|
|
var aLoginDatas = LoginDatas.split(",");
|
|
for (var i = 0; i < aLoginDatas.length; i++) {
|
|
if (aLoginDatas[i] != "") {
|
|
var UserData = aLoginDatas[i].split("|");
|
|
if (UserData[0] == username) {
|
|
ifadd = false;
|
|
}
|
|
}
|
|
}
|
|
if (ifadd) {
|
|
LoginDatas += ("," + username + "|" + logpsd);
|
|
}
|
|
} else {
|
|
LoginDatas = (username + "|" + logpsd);
|
|
}
|
|
setlocalStorage("LoginUserData", LoginDatas);
|
|
}
|
|
$("#login").html(data.msg);
|
|
setlocalStorage("userinfo", JSON.stringify(data.userInfo));
|
|
setlocalStorage("userId", data.userId);
|
|
setlocalStorage("LoginId", data.LoginId);
|
|
|
|
setlocalStorage("myrefresh", 1);
|
|
if (version != "") {
|
|
setlocalStorage("ifapp", 1);
|
|
$api.setStorage("userId", data.userId);
|
|
$api.setStorage("LoginId", data.LoginId);
|
|
$api.setStorage("Paypush", data.userInfo.Paypush);
|
|
} else {
|
|
setlocalStorage("ifapp", 0);
|
|
}
|
|
var closeInterval = setInterval(function () {
|
|
clearInterval(closeInterval);
|
|
onlink("/mobile/");
|
|
|
|
}, 500);
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
//tishi3("网络错误");
|
|
}
|
|
}
|
|
});
|
|
} catch (err) {
|
|
tishi3(err);
|
|
}
|
|
}
|
|
}
|
|
function showkhxy(id) {
|
|
$("#notice_title").html("");
|
|
$("#notice_body").html("");
|
|
$("#notice-detial").css("display", "flex");
|
|
$(".ajaxLoader").removeClass("uhide");
|
|
$.ajax({
|
|
type: 'GET',
|
|
url: "/apiajax.ashx",
|
|
data: "&action=getsysmsgdetail&ifweb=1&id=" + id,
|
|
dataType: "JSON",
|
|
error: function (xhr, type) {
|
|
etishi3((etype == 0 ? "发生错误:" : "An error occurred:") + JSON.stringify(xhr));
|
|
},
|
|
success: function (data) {
|
|
|
|
|
|
if (data) {
|
|
if (data.status == 1) {
|
|
|
|
$("#notice_title").html(data.title);
|
|
$("#notice_body").html(data.content);
|
|
$(".ajaxLoader").addClass("uhide");
|
|
} else {
|
|
|
|
etishi3(data.msg);
|
|
$(".ajaxLoader").addClass("uhide");
|
|
if (data.msg == (etype == 0 ? "您未登录!" : "You are not logged in!")) {
|
|
//$api.rmStorage("userId");
|
|
//$api.rmStorage("LoginId");
|
|
}
|
|
}
|
|
} else {
|
|
etishi3(etype == 0 ? "网络错误!" : "Network error!");
|
|
$(".ajaxLoader").addClass("uhide");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
|
|
|
|
</html>
|