captcha.refresh();
}else{
if(result.status=='1'){
if($("#nologin_close").val()=='s'){
$('.userlogin').css({'display':'none'})
window.location.reload();
}else{
var jmpurl = result.info;
if(logintourl!=''){
jmpurl += "?jmpmenu="+logintourl;
}
window.location.href=jmpurl;
}
//window.location.href=result.data.info;
}else{
$("#bt-yzlogin").text("登陆");
$("#bt-yzlogin").css("background-color",'#f8b857');
$('#bt-yzlogin').attr("disabled",false);
toRestNc();
myalter(result.info);
if(result.info.indexOf('商家入口')>=0){
window.location.href="https://www.jkongjian.com/Login/login";
}
}
}
}
})
}
// 业务请求验证结果回调函数
function onBizResultCallback(bizResult) {
}
function myalter(atmsg){
//alert(atmsg);
$('.Ld-login-warn').addClass('show');
$('#lgerrinfo').html(atmsg);
//$('.zhanghao').css('margin-top',0);
}
function removealter(){
$('.Ld-login-warn').removeClass('show');
//$('.zhanghao').css('margin-top',20);
}
$("#mloginname,#mpswd,#lgvCode").focus(function(){
removealter();
});
$(function(){
$('#bt-yzlogin-rk').click(function(e){
$('.userlogin').css({'display':'block'})
//e.preventDefault()
})
$('body').on('click', '.blogin_login_title_item', function() {
if (event.stopPropagation) {
event.stopPropagation()
} else if (window.event) {
window.event.cancelBubble = true
}
$('.blogin_login_title_item').removeClass('activeitem')
$(this).addClass('activeitem')
$('.form_item').css({
'display': 'none'
})
var index = $(this).index()
$('.form_item').eq(index).css({
'display': 'block'
})
if (index == 0) {
$('.blogin_login_title_icon').css({
'left': '34px'
})
} else if (index == 1) {
$('.blogin_login_title_icon').css({
'left': '132px'
})
getwximg();
}
})
$('body').on('click', '.userlicon', function() {
$('.userlogin').css({'display':'none'});
/*检测是否已经登录过了*/
$.ajax({
type: "POST",
dataType: "json",
url: "/Login/checkIsHasLogin/",
data: "t="+new Date().getTime(),
success: function(result) {
if(result.status=='1'){
window.location.reload();
}
}
});
})
//底部注册弹框
$('#a-toreg').click(function(){
$('.userlogin').css({'display':'block'})
if (event.stopPropagation) {
event.stopPropagation()
} else if (window.event) {
window.event.cancelBubble = true
}
$('.blogin_login_title_item').removeClass('activeitem');
//$(this).addClass('activeitem')
$('.form_item').eq(0).css({
'display': 'none'
})
$('.form_item').eq(1).css({
'display': 'block'
})
$('.blogin_login_title_icon').css({
'left': '132px'
})
getwximg();
})
$('#yzl-text').click(function(){
if(yzlogin_type==1){
removealter();
$('#yzl-mm').addClass('hide');
$('#yzl-yzm').addClass('show');
$('#yzl-text').html('账号登录');
yzlogin_type=2;
captcha.refresh();
$("#Ld-login-ncid").css("display","block");
//$("#Ld-login-ncid").css("display","none");
return
}else{
removealter();
$('#yzl-mm').removeClass('hide');
$('#yzl-yzm').removeClass('show');
$('#yzl-text').html('验证码登录');
yzlogin_type=1;
$("#Ld-login-ncid").css("display","block");
return
}
})
$('#bt-vcode').click(function(){
if(!isTimeIng){
var mloginname = $.trim($("#mloginname").val());
if(mloginname == ''){
myalter('请输入手机号');
return false;
}else{
if(!isPageMobile(mloginname)){
myalter('手机号格式错误');
return false;
}
}
$.ajax({
type: "POST",
dataType: "json",
url: "/Login/checkYzmLoginForVipV2/",
data: "lgtype=yz&mobile="+mloginname+"&t="+new Date().getTime(),
success: function(result) {
if(result.status!='1'){
myalter(result.info);
return false;
}else{
isTimeIng = true;
countSecond();
}
}
});
}
})
$('#toLoginOut').click(function(){
$.ajax({
type: "POST",
dataType: "json",
url: "/Cp/Login/logout/",
data: "t="+new Date().getTime(),
success: function(result) {
if(result.status=='1'){
window.location.reload();
}
}
});
})
});
function toRestNc(){
captcha.refresh();
is_nc_right = false;
}
function isPageMobile(str){
var number_chars = "1234567890";
var i;
for (i=0;i0){
$('#bt-vcode').text("" + wait-- + " s");
setTimeout("countSecond()", 1000);
}else{
isTimeIng = false;
wait = MAX_S;
$('#bt-vcode').text("获取验证码");
toRestNc();
}
}
function getwximg(){
$.ajax({
async: true,
type: "post",
dataType: 'json',
url : "/Login/getWximg/",
data: {t: (new Date()).getTime()},
success: function (res) {
if (res.status == 1) {
$("#yzreg_qr").attr('src', res.url);
getwxstatus(user_time,res.qrcodeid);
}else{
alert('微信二维码加载错误!');
}
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert('微信二维码加载出错啦!');
}
});
}
//获取微信扫码状态
function getwxstatus(user_time,qrcode_id) {
$.ajax({
async: true,
type: "post",
dataType: 'json',
url: "/Login/getScanState/",
data: {codeid:qrcode_id },
success: function (data, textStatus) {
if (data.status ==2) {
$('.Ld-login-matext').html('扫码成功!');
var params="curruserid="+data.curruserid+"&unionid="+data.unionid;
window.location.href="https://www.jkongjian.com/Login/yzqrreg?"+params;
}
if (data.status == 0) {
user_time = user_time + 1;
if (user_time > 20) {
$('.Ld-login-last').addClass('show');
$('.Ld-login-matext').html('二维码已失效!请刷新重试!');
}else {
getwxstatus(user_time,qrcode_id);
}
}
},
error: function (data) {
}
});
}
function refcode(){
$('.Ld-login-last').removeClass('show');
getwximg();
$('.Ld-login-matext').html('扫码-关注公众号-注册');
}
- 删选条件:
-
清空已选
暂时没有上传案例哦~