You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
303 lines
13 KiB
303 lines
13 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="./css/login.css">
|
|
<title>注册</title>
|
|
</head>
|
|
<!-- 嵌入头部 -->
|
|
<script type="text/javascript" src="./js/jquery.js"></script>
|
|
<script>
|
|
// $(function(){
|
|
// $("#header").load("./header.html");
|
|
// });
|
|
// $(function(){
|
|
// $("#footer").load("./footer.html");
|
|
// });
|
|
</script>
|
|
<body>
|
|
<div class="login">
|
|
<!-- 头部占位 -->
|
|
<div id="header"></div>
|
|
|
|
<!-- 页面内容 -->
|
|
<div class="login--content-wrap" style="background-color: #fff; margin-top: 5%;">
|
|
|
|
<img src="images/login_content_left.jpg" style="margin-right: 20px; flex: 1; " />
|
|
|
|
<div style="display: flex;flex-direction: column; margin: 20px 10px;width: 100%; flex: 0.6;">
|
|
|
|
<div style="display: flex;flex-direction: row;align-items: center;">
|
|
|
|
<div style="width: 6px; height:40px;background-color: #238BF0;"></div>
|
|
<div style="color: #238BF0;font-size: 28px;margin-left: 15px;">账号登录</div>
|
|
</div>
|
|
|
|
<div class="popup-content__item" style="margin-top: 40px; margin-left: 20px;">
|
|
<input class="input" type="text" placeholder="手机号" id="loginPhone" />
|
|
</div>
|
|
<div class="popup-content__item" style="margin-left: 20px;">
|
|
<input class="input" type="password" placeholder="登录密码" id="loginPsw" />
|
|
</div>
|
|
<div class="popup-content__item popup-content__item3" style="margin-left: 20px;">
|
|
<input class="inputCode" type="text" placeholder="验证码" id="loginCode" />
|
|
<div class="codeImage" style="background-color: #238BF0;margin-left: 30px;"><img id="codeImg1"
|
|
onclick="changeCodeImg1()" class="img" style="height: 56px;"></div>
|
|
</div>
|
|
|
|
<div style="display: flex;flex-direction: column; align-items: center;justify-content: center;width: 100%;
|
|
margin-top: 20px;">
|
|
<div class="popup-content__btn" style="background-color: #238BF0; width: 32rem; "
|
|
onclick="login()">
|
|
登录
|
|
</div>
|
|
<div style="display: flex;flex-direction: row; justify-content: space-between; width: 30.8rem !important;
|
|
margin-top: 5px;">
|
|
<div style="color: #238BF0;text-decoration: underline; font-size: 18px;"
|
|
onclick="openPopup()">注册账号>>
|
|
</div>
|
|
<div style="color: #238BF0;font-size: 18px;" onclick="forgetPsw()">忘记密码?</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 注册弹窗 -->
|
|
<div id="mask" class="mask"></div>
|
|
<div id="popup" class="secure-popup" style="display:none;">
|
|
<div class="secure-popup__close" onclick="closePopup()">
|
|
<img src="./images/close.png">
|
|
</div>
|
|
<div class="popup-content">
|
|
<div class="popup-content__item">注册</div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="姓名"
|
|
id="registerName" />
|
|
</div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="电话"
|
|
id="registerPhone" /></div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="公司名称"
|
|
id="registerCompany" /></div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="密码"
|
|
id="registerPsw" />
|
|
</div>
|
|
<div class="popup-content__item popup-content__item2">
|
|
<input class="inputCode" type="text" placeholder="验证码" id="registerCode" />
|
|
<div class="codeImage"><img id="codeImg2" onclick="changeCodeImg2()" class="img"
|
|
style="height: 56px"></div>
|
|
</div>
|
|
<div class="popup-content__btn" onclick="submitName()">注册</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 注册弹窗
|
|
<div id="mask1" class="mask"></div>
|
|
<div id="popup1" class="secure-popup" style="display:none;">
|
|
<div class="secure-popup__close" onclick="closePopup1()">
|
|
<img src="./images/close.png">
|
|
</div>
|
|
<div class="popup-content">
|
|
<div class="popup-content__item"></div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="姓名"
|
|
id="registerName" />
|
|
</div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="电话"
|
|
id="registerPhone" /></div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="公司名称"
|
|
id="registerCompany" /></div>
|
|
<div class="popup-content__item"><input class="input" type="text" placeholder="密码"
|
|
id="registerPsw" />
|
|
</div>
|
|
<div class="popup-content__item popup-content__item2">
|
|
<input class="inputCode" type="text" placeholder="验证码" id="registerCode" />
|
|
<div class="codeImage"><img id="codeImg" onclick="changeCodeImg()" class="img"
|
|
style="height: 56px;background-color: #f0f;"></div>
|
|
</div>
|
|
<div class="popup-content__btn" onclick="submitName()">注册</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
|
|
<!-- 底部占位 -->
|
|
<div id="footer"></div>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
$('#codeImg1').attr('src', 'http://aos.yyundong.com/ycsafe/captcha/captchaImagetype=math×tamp=' + Date
|
|
.now());
|
|
</script>
|
|
<script>
|
|
function openPopup() {
|
|
document.getElementById("popup").style.display = "block";
|
|
document.getElementById("mask").style.display = "block";
|
|
$('#codeImg2').attr('src', 'http://aos.yyundong.com/ycsafe/captcha/captchaImagetype=math×tamp=' + Date
|
|
.now());
|
|
}
|
|
|
|
function closePopup() {
|
|
document.getElementById("popup").style.display = "none";
|
|
document.getElementById("mask").style.display = "none";
|
|
}
|
|
// 忘记密码
|
|
function forgetPsw() {
|
|
// document.getElementById("popup1").style.display = "block";
|
|
// document.getElementById("mask1").style.display = "block";
|
|
// $('#codeImg').attr('src', './loulan/captcha/captchaImage?type=math×tamp=' + Date.now());
|
|
|
|
alert('功能正在完善,请联系官方客服:123456789');
|
|
}
|
|
|
|
function closePopup1() {
|
|
document.getElementById("popup1").style.display = "none";
|
|
document.getElementById("mask1").style.display = "none";
|
|
}
|
|
|
|
// 登录
|
|
function login() {
|
|
let telephone = $('#loginPhone').val();
|
|
let password = $('#loginPsw').val();
|
|
let captcha = $('#registerCode').val();
|
|
|
|
$("#loginPhone").blur(function() {
|
|
if (!telephone) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#loginPsw").blur(function() {
|
|
if (!password) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#loginCode").blur(function() {
|
|
if (!captcha) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
|
|
if (!telephone) {
|
|
document.getElementById("loginPhone").classList.add("warning");
|
|
document.getElementById("loginPhone").setAttribute("placeholder", "请输入您的手机号");
|
|
}
|
|
if (!password) {
|
|
document.getElementById("loginPsw").classList.add("warning");
|
|
document.getElementById("loginPsw").setAttribute("placeholder", "请输入密码");
|
|
}
|
|
if (!captcha) {
|
|
document.getElementById("loginCode").classList.add("warning");
|
|
document.getElementById("loginCode").setAttribute("placeholder", "请输入验证码");
|
|
return;
|
|
}
|
|
|
|
$.post('/loulan/business/buy/9', {
|
|
'telephone': telephone,
|
|
'password': password,
|
|
'captcha': captcha
|
|
}, function(resp) {
|
|
|
|
if (!!resp && !!resp.result) {
|
|
alert('正在登录...');
|
|
|
|
console.log("登录>>>", resp.result);
|
|
|
|
// window.location.href = 'login.html';
|
|
} else {
|
|
alert(resp.message);
|
|
|
|
console.log("登录>>>", resp.message);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
// 注册函数
|
|
function submitName() {
|
|
let name = $('#registerName').val();
|
|
let telephone = $('#registerPhone').val();
|
|
let companyName = $('#registerCompany').val();
|
|
let password = $('#registerPsw').val();
|
|
let captcha = $('#registerCode').val();
|
|
|
|
$("#registerName").blur(function() {
|
|
if (!name) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#registerPhone").blur(function() {
|
|
if (!telephone) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#inputCompany").blur(function() {
|
|
if (!companyName) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#registerPsw").blur(function() {
|
|
if (!password) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
$("#registerCode").blur(function() {
|
|
if (!captcha) {
|
|
$(this).removeClass("warning");
|
|
}
|
|
});
|
|
|
|
if (!name) {
|
|
document.getElementById("registerName").classList.add("warning");
|
|
document.getElementById("registerName").setAttribute("placeholder", "请输入您的姓名");
|
|
}
|
|
if (!telephone) {
|
|
document.getElementById("registerPhone").classList.add("warning");
|
|
document.getElementById("registerPhone").setAttribute("placeholder", "请输入您的电话");
|
|
}
|
|
if (!companyName) {
|
|
document.getElementById("registerCompany").classList.add("warning");
|
|
document.getElementById("registerCompany").setAttribute("placeholder", "请输入公司名称");
|
|
}
|
|
if (!companyName) {
|
|
document.getElementById("registerPsw").classList.add("warning");
|
|
document.getElementById("registerPsw").setAttribute("placeholder", "请输入密码");
|
|
}
|
|
if (!captcha) {
|
|
document.getElementById("registerCode").classList.add("warning");
|
|
document.getElementById("registerCode").setAttribute("placeholder", "请输入验证码");
|
|
return;
|
|
}
|
|
|
|
$.post('/loulan/business/buy/9', {
|
|
'name': name,
|
|
'telephone': telephone,
|
|
'companyName': companyName,
|
|
'password': password,
|
|
'captcha': captcha
|
|
}, function(resp) {
|
|
|
|
if (!!resp && !!resp.result) {
|
|
alert('注册成功,正在登录...');
|
|
console.log("注册>>>", resp.result);
|
|
} else {
|
|
alert(resp.message);
|
|
}
|
|
});
|
|
}
|
|
|
|
function changeCodeImg1() {
|
|
console.log("changeCodeImg1", Date.now());
|
|
$('#codeImg1').attr('src', 'http://aos.yyundong.com/ycsafe/captcha/captchaImage?type=math×tamp=' + Date
|
|
.now());
|
|
}
|
|
|
|
function changeCodeImg2() {
|
|
|
|
$('#codeImg2').attr('src', 'http://aos.yyundong.com/ycsafe/captcha/captchaImage?type=math×tamp=' + Date
|
|
.now());
|
|
}
|
|
</script>
|
|
</html>
|