'piccode':piccode, 'sign_time':adminLogic }; ajax_post('/Around/getVerificationCode', param, function (json) { if(!json.state) { dlg_alert(json.info); }else { dlg_alert(json.info); setTime($('#get_duanxin')); } }); // ajax_post('https://m.member.iwanshang.cn/Mobile/Around/getVerificationCode', param, function (json) { // if(!json.state) // { // dlg_alert(json.info); // }else // { // dlg_alert(json.info); // setTime($('#get_duanxin')); // } // }); } } /** * 使用短信验证码登录 */ function onMobileLogin() { var tel = $("#phone1").val(); var yzm = $("#yzm").val(); if (tel == "") { dlg_alert('请输入手机号码'); } else if (yzm == "") { dlg_alert('请输入验证码'); } else { ajax_post('/Login/checkyzm', {mobile:tel, yzm:yzm, uro:'aHR0cHM6Ly93d3cuaXdhbnNoYW5nLmNuL25ld3MtMjAyNTAzNDg3NTIuaHRtbD92aXNpdElkPQ=='}, function(json) { if(json.state) { login_uccess(json.info); } else { dlg_alert(json.info); } }); } } /** * 使用密码进行登录 */ function onPasswordLogin() { var tel = $("#phone-or-email").val(); var pwd = $("#phone-or-email-pwd").val(); if(tel == "") { dlg_alert('请输入手机号码'); } else if(pwd == "") { dlg_alert('请输入登录密码'); } else { ajax_post('/Login/checkpassword', {mobile:tel, pwd:pwd, uro:'aHR0cHM6Ly93d3cuaXdhbnNoYW5nLmNuL25ld3MtMjAyNTAzNDg3NTIuaHRtbD92aXNpdElkPQ=='}, function(json) { if(json.state) { if(json.state==2){ var data=json.data; bindphone=data.phone; $("#telModal").find(".bindphone").text(data.hidephone); $("#telModal").modal({backdrop: 'static', keyboard: false,show:true}) }else { login_uccess(json.info); } } else { dlg_alert(json.info); } }); } } var qrcode=''; /** *生成APP扫码登录二维码 * **/ function loginQrcode(){ $.getJSON('/Login/setScanCode',{},function(json){ if(json.state){ qrcode=json.info; $("#scanqrcode").attr("src",json.image); //计时器每隔5秒查询一次支付状态,直到支付成功后跳转 interval = setInterval(QrcodeLogin , 3000); } }) } function QrcodeLogin() { $.post('/Login/isscanCodeLogin',{'sign':qrcode},function(json){ if(json.state) { clearInterval(interval); login_uccess(json.info); } }); } function ajax_post_async(url, data, callback){ var date1, date2, maxmsec = 1000; $.ajax({ type: 'POST', url: url, async:false, data: data, beforeSend:function () { date1 = new Date(); }, error: function (request) { date2 = new Date(); var mill = date2.getTime() - date1.getTime(); if(mill < maxmsec) { sleep(maxmsec - mill); } }, success: function (data) { date2 = new Date(); var mill = date2.getTime() - date1.getTime(); if(mill < maxmsec) { //最短提示效果 sleep(maxmsec - mill); } if (typeof callback === "function") { callback(data); } }, dataType: 'json'//规定预期的服务器响应的数据类型:json|html }); } //休眠 function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } //发送登录验证码 function sendCode() { ajax_post('/Around/getVerificationCodeByLogin', {phone:bindphone}, function (json) { if(!json.state) { dlg_alert(json.info); }else { dlg_alert(json.info); } }); } //登录验证 function ckLogin() { var code=$("#ckcode").val(); if(code==""){ dlg_alert('请输入验证码'); return false; } ajax_post('/Login/ckLoginCode', {mobile:bindphone, ckcode:code, uro:'aHR0cHM6Ly93d3cuaXdhbnNoYW5nLmNuL25ld3MtMjAyNTAzNDg3NTIuaHRtbD92aXNpdElkPQ=='}, function(json) { if(json.state) { login_uccess(json.info); } else { dlg_alert(json.info); } }); } /** * 登录成功之后的页面跳转 */ function login_uccess(info) { dlg_alert(info); document.location.href = 'https://www.iwanshang.cn/news-20250348752.html?visitId='; } function show_loading() { layer.load(1, { shade: [0.1,'#fff'] //0.1透明度的白色背景 }); } function close_loading() { layer.closeAll(); } function openUrl(){ window.open('https://www.iwanshang.cn/activity/vipday.html'); } $('.login-banners .login-menus').click(function (e) { e.stopPropagation() })