|
@@ -54,16 +54,27 @@ $(function(){
|
|
|
if(Suser==''||Spass==''){
|
|
|
msg('请填写用户名/密码.');
|
|
|
return false;
|
|
|
- }else{
|
|
|
+ }else{
|
|
|
+ $('.loading').show();
|
|
|
+ let txt = "登录中,请稍后...",htmls=[],i=0,
|
|
|
+ txtArr = txt.split('');
|
|
|
+ txtArr.map(item=>{
|
|
|
+ htmls.push(`
|
|
|
+ <span>${item}</span>
|
|
|
+ `)
|
|
|
+ });
|
|
|
+ $('.loading div p').html(htmls);
|
|
|
$.ajax({
|
|
|
method: "POST",
|
|
|
dataType: "json",
|
|
|
url: globalConfig.context + "/signin",
|
|
|
data: {
|
|
|
"username": Suser,
|
|
|
- "password": Spass,
|
|
|
+ "password": Spass,
|
|
|
+ 'type':'0'
|
|
|
},
|
|
|
- success: function (rest) {
|
|
|
+ success: function (rest) {
|
|
|
+ $('.loading').hide();
|
|
|
if (rest.error && rest.error.length) {
|
|
|
msg(rest.error[0].message);
|
|
|
} else {
|
|
@@ -81,7 +92,7 @@ $(function(){
|
|
|
msg('登录成功,2秒后跳转个人中心');
|
|
|
setTimeout(()=>{
|
|
|
window.location.href = globalConfig.context + "/user/account/index.html";
|
|
|
- },2000)
|
|
|
+ },3000)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -119,6 +130,9 @@ $(function(){
|
|
|
//点击登录界面的忘记密码 ,将会弹出忘记密码界面
|
|
|
$('.login_check a').click(function(e){
|
|
|
e.preventDefault();
|
|
|
+ $('#forget_user').val('');
|
|
|
+ $('#forget_phone').val('');
|
|
|
+ $('#photo_n').val('');
|
|
|
$('.login').fadeOut(800);
|
|
|
$('#form_register').fadeOut(800);
|
|
|
$("#forget").fadeIn(800);
|
|
@@ -180,6 +194,8 @@ $(function(){
|
|
|
$('#form_register').fadeOut(800);
|
|
|
$("#new_password").fadeIn(800);
|
|
|
$(".password_top>h4").attr("val",rest.data);
|
|
|
+ $('#new_pass').val();
|
|
|
+ $('#new_pass_again').val();
|
|
|
}
|
|
|
}
|
|
|
})
|