- 用手机激活
// 加载弹窗 js css 文件方法 function loadjscssfile(filename, filetype) { if (filetype == "js") { var fileref = document.createElement("script"); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", filename); } else if (filetype == "css") { var fileref = document.createElement("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", filename); } if (typeof fileref != "undefined") { document.getElementsByTagName("head")[0].appendChild(fileref); } } loadjscssfile( "//asserts.xcarimg.com/resource/common/login_layer/css/login.css?v=201812182150", "css" ); loadjscssfile( "//asserts.xcarimg.com/resource/common/login_layer/js/md5.js", "js" ); loadjscssfile( "//asserts.xcarimg.com/resource/common/login_layer/js/jquery.xdomainrequest.min.js", "js" ); // 设置cookie function set_cookie(name, value, secure) { var exp = new Date(); exp.setTime(exp.getTime() + 365 * 24 * 60 * 60 * 1000); document.cookie = name + "=" + value + ";expires=" + exp.toGMTString() + ";path=/;domain=xcar.com.cn"; } /* * 爱卡登录注册弹窗插件 */ (function ($) { $("#wBox_overlay_LoginBox").remove(); $("#wBox_logindiv").remove(); var AjaxUid = ""; $.fn.xLoginBox = function (options) { var $t = $(this); var defaults = { show: false, step: 1 }, _this = this; this.AZ = $.extend(defaults, options); //回调函数参数 if (_this.AZ.func == undefined) { _this.AZ.func = ""; } if (_this.AZ.args == undefined) { _this.AZ.args = ""; } if (_this.AZ.url == undefined) { _this.AZ.url = ""; } var mycallbackz = _this.AZ.func; var mycallbackargsz = _this.AZ.args; var mycallbackurlz = _this.AZ.url; ////执行回调函数 function callbackrun() { var func = mycallbackz; var args = mycallbackargsz; if (func != "") { //没有参数 if (args == "") { func(); } else { //有参数 //参数个数 count = args.length; //此处不能用循环,循环当中包含+符号的话,如果传object对象,会报错,object自动转化成string if (count == 1) { func(args[0]); } else if (count == 2) { func(args[0], args[1]); } else if (count == 3) { func(args[0], args[1], args[2]); } else if (count == 4) { func(args[0], args[1], args[2], args[3]); } else if (count == 5) { func(args[0], args[1], args[2], args[3], args[4]); } } } else { location.reload(); } return false; } var initWangYi,initWangYi2 is_send_msg = 0; //防止连续点击,发送短信 function login_box() { //AJAX执行检查用户是否登录,未登录并返回登录错误次数 $.ajax({ type: "POST", url: "https://reg.xcar.com.cn/ajax/checklogin.php?callback=?", dataType: "jsonp", success: function (res) { if (res.islogin == 1) { //已经登录,检查是否绑定了手机,step = 2 时,需要展示绑定手机弹层 if (_this.AZ.step == 2 && res.bandmo == 0) { //展示绑定手机弹层 //alert('绑定手机'); AjaxUid = res.binduid; show_band_mobile_div(res.binduid); return false; } else { callbackrun(); //执行回调函数 } } else { //未登录 $("#wBox_overlay_LoginBox").remove(); $("#wBox_logindiv").remove(); boxContent = '
'; //遮罩层 boxContent += '";
boxContent += ' ';
boxContent +=
''; //标题栏
boxContent += ' ";
boxContent += "'; //具体弹层内容
boxContent += ' "; //具体弹层内容结束
boxContent += '"; //其他登陆方式结束
boxContent += "
'; //登录方式开始
boxContent += ' "; //登录方式结束
boxContent += "'; //动态密码登录start
boxContent += ' "; //动态密码登录end
boxContent +=
' "; //用户名密码登录 end
boxContent +=
''; //登录方式切换
boxContent +=
''; //登录按钮
boxContent +=
'';
boxContent += "
| ";
boxContent += "