更新登录以及去除jquery3.6.4
This commit is contained in:
@@ -47,11 +47,11 @@
|
||||
src="res/index/images/loginBg.jpg"
|
||||
style="width: auto; height: 335px; width: 355px; position: absolute; flex-shrink: 0; margin: 0px; border-radius: 10px; box-shadow: 0px 20px 20px #1b1b2a">
|
||||
</div>
|
||||
<div style="width: 100px; height: 100px; position: absolute; border-radius:10px;top:0px ;right: -6px;background-image:url(/res/images/sanjiao.png);background-size:cover">
|
||||
<div id="pointd" style="font-size:26px; color:#FFF;text-align:center;position:relative;width:50px;left:45px;top:15px;cursor:pointer;">FA</div>
|
||||
<div style="width: 100px; height: 100px; position: absolute; border-radius: 10px; top: 0px; right: -6px; background-image: url(/res/images/sanjiao.png); background-size: cover">
|
||||
<div id="pointd" style="font-size: 26px; color: #FFF; text-align: center; position: relative; width: 50px; left: 45px; top: 15px; cursor: pointer;">FA</div>
|
||||
</div>
|
||||
<div id="loginpwd" class="bi-vertical-layout"
|
||||
style="overflow: hidden auto; display:none;left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
|
||||
style="overflow: hidden auto; display: none; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
|
||||
|
||||
<div class="bi-vertical-layout" style="overflow: hidden auto; position: relative; margin-top: 50px; border-color: #fff">
|
||||
<div class="dec-login-item bi-vertical-layout"
|
||||
@@ -153,7 +153,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bi-horizon-auto-layout" style="position: relative;">
|
||||
<div class="bi-horizon-auto-layout" onclick="login()" style="position: relative;">
|
||||
<div
|
||||
class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
|
||||
style="width: 190px; height: 40px; line-height: 38px; min-width: 80px; position: relative; margin: 0px auto; box-shadow: 0px 10px 20px #2d2353">
|
||||
@@ -168,8 +168,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="fasklogin" class="bi-vertical-layout"
|
||||
style="overflow: hidden auto; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
|
||||
<div style="height:150px;"></div>
|
||||
style="overflow: hidden auto; left: 40px; right: 40px; top: 0px; bottom: 0px; position: absolute;">
|
||||
<div style="height: 150px;"></div>
|
||||
<div class="bi-horizon-auto-layout" style="position: relative;">
|
||||
<div
|
||||
class="bi-single bi-basic-button cursor-pointer bi-button login-button button-common bi-label bi-flex-center-adapt-layout"
|
||||
@@ -188,7 +188,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="Scripts/jquery-3.6.4.min.js"></script>
|
||||
<script src="Scripts/jquery-3.7.1.min.js"></script>
|
||||
<script src="Scripts/md5.js"></script>
|
||||
<script src="Scripts/ajax.js"></script>
|
||||
<script type="text/javascript">
|
||||
var $activeWrap = document.getElementById('activewrap')
|
||||
var $active = document.getElementById('active')
|
||||
@@ -203,18 +205,44 @@
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var user = getCookie("u") || "";
|
||||
var pwd = getCookie("p") || "";
|
||||
$("#user").val(user)
|
||||
$("#pwd").val(pwd)
|
||||
})
|
||||
$("#login").click(function () {
|
||||
login()
|
||||
})
|
||||
var user = localStorage.getItem("u")
|
||||
var pwd = localStorage.getItem("p")
|
||||
document.getElementById("user").value = user;
|
||||
document.getElementById("pwd").value = pwd;
|
||||
|
||||
|
||||
function login() {
|
||||
var user = document.getElementById("user").value;
|
||||
var pwd = document.getElementById("pwd").value;
|
||||
if (user == '' && pwd == '') {
|
||||
alert("请输入账号和密码");
|
||||
return;
|
||||
}
|
||||
Ajax().post({
|
||||
url: 'loginApi.aspx',
|
||||
data: {
|
||||
"action": "login", "account": user, "pwd": pwd
|
||||
},
|
||||
success: function (data) {
|
||||
if (data == '' || data == undefined) {
|
||||
alert("账号密码不正确!");
|
||||
} else {
|
||||
var $activeWrap = document.getElementById('activewrap')
|
||||
if ($activeWrap.className.indexOf('active') !== -1) {
|
||||
localStorage.setItem("u", user);
|
||||
localStorage.setItem('p', pwd)
|
||||
} else {
|
||||
localStorage.setItem("u", '');
|
||||
localStorage.setItem("p", '');
|
||||
}
|
||||
top.window.location.href = data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#pointd").click(function () {
|
||||
if ($("#loginpwd").css("display")=="none") {
|
||||
$("#fasklogin").css("display","none");
|
||||
if ($("#loginpwd").css("display") == "none") {
|
||||
$("#fasklogin").css("display", "none");
|
||||
$("#loginpwd").css("display", "block");
|
||||
$("#pointd").text("FA");
|
||||
} else {
|
||||
@@ -235,47 +263,34 @@
|
||||
location.href = ssourl;
|
||||
})
|
||||
function login() {
|
||||
var user = $("#user").val()
|
||||
var pwd = $("#pwd").val()
|
||||
$.ajax({
|
||||
url: "Login.aspx/LoginPost",
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({
|
||||
user: user,
|
||||
pwd: pwd
|
||||
}),
|
||||
var user = document.getElementById("user").value;
|
||||
var pwd = document.getElementById("pwd").value;
|
||||
if (user == '' && pwd == '') {
|
||||
alert("请输入账号和密码");
|
||||
return;
|
||||
}
|
||||
|
||||
Ajax().post({
|
||||
url: 'loginApi.aspx',
|
||||
data: {
|
||||
"action": "login", "account": user, "pwd": pwd
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.d == '' || data.d == undefined) {
|
||||
if (data == '' || data == undefined) {
|
||||
alert("账号密码不正确!");
|
||||
} else {
|
||||
var $activeWrap = document.getElementById('activewrap')
|
||||
if ($activeWrap.className.indexOf('active') !== -1) {
|
||||
setCookie("u", user);
|
||||
setCookie("p", pwd);
|
||||
localStorage.setItem("u", user);
|
||||
localStorage.setItem('p', pwd)
|
||||
} else {
|
||||
setCookie("u", '');
|
||||
setCookie("p", '');
|
||||
localStorage.setItem("u", '');
|
||||
localStorage.setItem("p", '');
|
||||
}
|
||||
top.window.location.href = data.d;
|
||||
top.window.location.href = data;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function setCookie(name, value) {
|
||||
var Days = 365;
|
||||
var exp = new Date();
|
||||
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
|
||||
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
|
||||
}
|
||||
function getCookie(name) {
|
||||
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||||
if (arr = document.cookie.match(reg))
|
||||
return unescape(arr[2]);
|
||||
else
|
||||
return null;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user