Commit 930cfe62 authored by Mac's avatar Mac

同业的登录修改和备用页面的提交

parent 014210a9
......@@ -145,7 +145,15 @@
font-size: 2rem;
margin-top: 1rem;
}
.login_code{
width: 14rem;
height: 4rem;
font-size: 2rem;
border: 0;
outline: 0;
text-align: left;
margin-left: 2rem;
}
.login_page .login_Zh {
font-size: 2rem;
margin: 0.5rem 0 0 0.8rem;
......@@ -214,7 +222,7 @@
margin-top: 1rem;
}
.login_yzm {
.login_yzm,.login_yzm2 {
font-size: 2rem;
color: #EE4454;
display: inline-block;
......@@ -292,9 +300,10 @@
</div>
<div class='form_item2'>
<div class='form_item_inBox'>
<img class='form_item_ico' src='https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/ico_lock2.png' />
<span class="login_Zh">密码</span>
<input class='form_item_input' id="passWord" type="password" placeholder="请输入密码"></input>
<img class='form_item_ico' src='https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/activity/ico_yzm.png' style="margin-top:1rem;" />
<span class="login_Zh">验证码</span>
<input type="number" class="login_code" placeholder="请输入验证码">
<span class="login_yzm2" onclick="getCode_login()">发送验证码</span>
</div>
</div>
</div>
......@@ -446,18 +455,19 @@
//点击登录
function user_login() {
let UserAccount = $("#UserAccount").val();
let passWord = $("#passWord").val();
let login_code = $(".login_code").val();
if (UserAccount == '') {
layer.msg('请输入账号');
return;
}
if (passWord == '') {
layer.msg('请输入码');
if (login_code == '') {
layer.msg('请输入验证码');
return;
}
let msg = {
account: UserAccount,
password: passWord
sendcode: login_code,
platform:1
};
Login(msg)
}
......@@ -467,7 +477,7 @@
type: "POST",
url: `${getApiUrl().urlPost}`,
contentType: "application/json",
data: getAjaxData('b2b_post_Login', msg),
data: getAjaxData('b2b_post_Login_V2', msg),
async: false,
success: function(res) {
if (res.resultCode === 1) {
......@@ -495,7 +505,7 @@
// window.location.href = `./Rushbuy.html?redemptionPrice=${price}&couponId=${couponId}&platform=${platform}&noClick=${'1'}&r=efr12123`;
}
}
//window.location.href='http://127.0.0.1:5500/html/GT_activities.html';
} else {
layer.msg(res.message);
......@@ -555,6 +565,58 @@
}
});
}
}
//验证码登录
function getCode_login() {
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
//电话
let phone = $('#UserAccount').val();
if (!phoneReg.test(phone)) {
layer.msg("请输入有效的手机号码!");
return false;
}
const TIME_COUNT = 60;
let isSend = false;
$('.login_yzm2').html = '';
if (!this.timer2) {
this.count2 = TIME_COUNT;
$('.login_yzm2').html(TIME_COUNT);
isSend = true;
this.timer2 = setInterval(() => {
if (this.count2 > 0 && this.count2 <= TIME_COUNT) {
this.count2--;
$('.login_yzm2').html(count2 + 's重新发送');
isSend = false;
} else {
clearInterval(this.timer2);
$('.login_yzm2').html('发送验证码');
this.timer2 = null;
}
}, 1000);
}
let msg = {
account:phone
};
if (isSend) {
$.ajax({
type: "POST",
url: `${getApiUrl().urlPost}`,
contentType: "application/json",
data: getAjaxData('b2b_post_SendCodeByCustomerInfo', msg),
async: false,
success: function(res) {
if (res.resultCode === 1) {
layer.msg(res.message);
}else {
layer.msg(res.message);
}
},
error: function(res) {
layer.msg(res.message);
}
});
}
}
//点击激活
function Activation() {
......@@ -599,6 +661,7 @@
}
});
}
</script>
</html>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment