var menu = function (obj) {
var nid = parseInt(util.queryString('nid')); if (isNaN(nid)) { nid = 0; }
if (nid > 0) {
var navi = obj.find('li[data-nid=' + nid + ']'); var tid = parseInt(util.queryString('typeid')); if (isNaN(tid)) { tid = parseInt(util.queryString('tid')); }
var li = obj.children('.xg_menuUl').children('li[data-tid=' + tid + ']'); if (li.length > 0) { li.addClass(li.attr('class').split(' ')[0] + '-select'); } else if (navi.length > 0) { navi.addClass(navi.attr('class').split(' ')[0] + '-select'); if (tid > 0) { var li = navi.find('li[data-tid=' + tid + ']'); if (li.length > 0) { li.addClass(li.attr('class').split(' ')[0] + '-select'); li.parentsUntil('.xg_menu', 'li').each(function () { $(this).addClass($(this).attr('class').split(' ')[0] + '-select'); actived = true; return false; }); } } }
} else {
var url = util.createUrl(); if (url.replace(document.location.host, '').indexOf('.') == -1 || url.indexOf('index.html') > 0) {
var home = obj.find('li[home=1]'); if (home.length > 0)
home.addClass(home.attr('class').split(' ')[0] + '-select');
}
}
var showType = obj.data('mobileshoweffect'); obj.find('.xg_menuMobile .xg_memu_btn').on('click', function () {
if (showType == 0 || showType == 2) { $(this).next().css({ 'left': '0px' }); } else if (showType == 1 || showType == 3) { $(this).next().css({ 'top': '0px' }); }
setTimeout(function () { obj.find('img').lazyload(); }, 300);
}); obj.find('.xg_menuShade').on('click', function () {
var css = {}; if (showType == 0) { css = { 'left': '-100%' }; } else if (showType == 1) { css = { 'top': '-100%' }; } else if (showType == 2) { css = { 'left': '100%' }; } else if (showType == 3) { css = { 'top': '100%' }; }
$(this).parent().css(css);
}); obj.children('.xg_menuMobile').find('.xg_menuTitle1,.xg_menuTitle2,.xg_menuTitle3,.xg_menuTitle4').on('click', function (e) {
var ul = $(this).next(); if (ul.length == 0) { return true; }
ul.slideToggle(); return true;
}); var design = util.inDesign(); if (design) {
if (obj.find('.xg_menutop').children().length == 0) { obj.find('.xg_menutop').html('
可拖动行到此
'); }
if (obj.find('.xg_menubottom').children().length == 0) { obj.find('.xg_menubottom').html('可拖动行到此
'); }
}
if (obj.data('droptype') == '1' && page.currentDevice() == 1) {
var ul = obj.children('.xg_menuUl'); var needEffect = obj.data('effect'); if (!needEffect) { needEffect = 0; }
var menulis = ul.children('li'); var droplist = obj.children('.xg_dropdownlist'); if (design) {
var html = ''; if (droplist.length == 0) { html = ''; }
obj.children('.xg_menuUl').children('li').each(function () {
var id = $(this).data('nid'); var type = 'n'; if (!id) { id = $(this).data('tid'); type = 't'; }
if ($(this).attr('home') || droplist.children('div[data-rid=' + id + ']').length > 0) { return; }
html += '
当前下拉菜单中无内容,访客访问将不显示当前下拉菜单
';
}); if (droplist.length == 0) { html += '
'; obj.append(html); droplist = obj.children('.xg_dropdownlist'); } else { droplist.append(html); }
menulis.on('click', function () {
var _this = $(this); setTimeout(function () {
if (!selector._element.innerSelect) { return; }
var id = _this.data('nid'); if (!id) { id = _this.data('tid'); }
if (!id) { return; }
var mWidth = $(this).parents('.container').width(); droplist.css({ 'width': document.documentElement.clientWidth + 'px', 'height': '0px', 'min-width': mWidth + 'px', 'position': 'absolute', 'top': ul.height() + 'px' }); if (droplist.offset().left != 0) { var mLeft = parseInt(droplist.css('margin-left')); isNaN(mLeft) && (mLeft = 0); var left = mLeft - droplist.offset().left; droplist.css({ 'margin-left': left + 'px' }); }
var list = droplist.children('[data-rid=' + id + ']'); if (list.length == 0) { return; }
if (list.css('display') == 'block') { list.hide(); } else { list.show().siblings().hide(); }
}, 150);
});
} else if (droplist.length > 0) {
menulis.hover(function () {
clearTimeout($(this).data('menuHide')); var id = $(this).data('nid'); if (!id) { id = $(this).data('tid'); }
if (!id) { return; }
var mWidth = $(this).parents('.container').width(); droplist.css({ 'width': document.documentElement.clientWidth + 'px', 'height': '0px', 'min-width': mWidth + 'px', 'position': 'absolute', 'top': ul.height() + 'px' }); if (droplist.offset().left != 0) { var mLeft = parseInt(droplist.css('margin-left')); isNaN(mLeft) && (mLeft = 0); var left = mLeft - droplist.offset().left; droplist.css({ 'margin-left': left + 'px' }); }
var list = droplist.children('[data-rid=' + id + ']'); if (list.length == 0) { return; }
list.siblings().hide(); if (needEffect == 0) { list.show(); } else { list.stop().slideDown('fast'); }
}, function () {
var _this = $(this); var id = _this.data('nid'); if (!id) { id = _this.data('tid'); }
if (!id) { return; }
var list = droplist.children('[data-rid=' + id + ']'); if (list.length == 0) { return; }
clearTimeout(_this.data('menuHide')); _this.data('menuHide', setTimeout(function () { if (needEffect == 0) { list.hide(); } else { list.stop().slideUp('fast'); } }, 120));
}); droplist.children('div').hover(function () {
var id = $(this).data('rid'); menulis.each(function () {
var _that = $(this); var mid = _that.data('nid'); if (!mid) { mid = _that.data('tid'); }
if (mid == id || mid == id) { clearTimeout(_that.data('menuHide')); }
});
}, function () { if (needEffect == 0) { $(this).hide(); } else { $(this).stop().slideUp('fast'); } });
}
}
}
var tab = {
init: function (tabid) {
var obj = $('#' + tabid); var evt = obj.data('switch'); if (!evt) { util.log('事件不存在'); return; }
var datalist = obj.parents('.xg_list:first'); if (datalist.length > 0) {
var className = ''; var parent = obj; while (!parent.is(datalist) && !className) {
var strs = parent.attr('class').split(' '); for (var i = 0; i < strs.length; i++) { if (strs[i] && /^p[\d]+/.test(strs[i])) { className = strs[i]; break; } }
parent = parent.parent();
}
var tabs = null; if (className) { tabs = datalist.find('.' + className); } else { tabs = datalist.find('.xg_tab'); }
tabs.children('.xg_tab_l_t').find('ul li').on(evt, tab.show);
} else { obj.children('.xg_tab_l_t').find('ul li').on(evt, tab.show); }
}, show: function () {
var _this = $(this); var index = _this.data('index'); var content = _this.parent().parent().parent().find('.xg_tab_tt').eq(parseInt(index)); content.addClass('xg_tab_tt-select').siblings().removeClass('xg_tab_tt-select'); var checkarr = $(this).attr('class').split(/[ ,]/); var pmcid = 'xg_tab_tl'; for (j = 0; j < checkarr.length; j++) {
var currcheck = checkarr[j].replace('.', ''); if (/p\d+(m|c|\-m|\-c)\S/.test(currcheck)) {
if (/-select$/.test(currcheck))
continue; pmcid = currcheck
}
}; _this.addClass(pmcid + '-select'); $.each(_this.siblings(), function () { var arrCls = this.className.split(/[ ,]/); for (c = 0; c < arrCls.length; c++) { if (/-select$/.test(arrCls[c])) { $(this).removeClass(arrCls[c]); } } }); content.find('.xg_video').each(function () { myplayer.tabChange($(this).attr('id')); }); if (typeof page.registeTabReload != 'undefined') { for (var i = 0; i < page.registeTabReload.length; i++) { page.registeTabReload[i](content, index); } }
}, changeitem: function (currSelect) {
if (currSelect.length > 0) {
var csslist = currSelect.attr('class').split(/[ ,]/); var currids = 'xg_tab_tl-select'; for (h = 0; h < csslist.length; h++) {
if (/p\d+(m|c|\-m|\-c)\S/.test(csslist[h])) {
if (/-select$/.test(csslist[h]))
continue; currids = csslist[h]; currSelect.removeClass('xg_tab_tl-select').addClass(currids + '-select')
}
}
}
}
};
var imgCode = {
init: function (img) { var op = imgCode.getOpitons(img); imgCode.refresh(op); img.on('click', imgCode.click); }, getOpitons: function (img) {
if (!img) {
if (typeof console != 'undefined')
console.log('checkCode初始化失败'); return {};
}
var options = {}; var data = img.data('type'); options.type = data; options.key = img.data('key'); data = img.data('width'); data && (options.width = data); data = img.data('height'); data && (options.height = data); data = img.data('textcolor'); data && (options.textColor = data); data = img.data('backcolor'); data && (options.backColor = data); data = img.data('textsize'); data && (options.textSize = data); options.charSet = 0; options.version = 1; options.img = img; return options;
}, refresh: function (op) { var img = op.img; op.img = null; util.ajaxMethod('Common', 'GetCheckCode', op, function (data) { if (data && data.result == 1) { img.attr('src', data.msg + '&t=' + Math.random()); } else if (typeof console != 'undefined') { console.log('获取验证码失败'); } }); }, click: function () { var op = imgCode.getOpitons($(this)); imgCode.refresh(op); }
}
$(function () { menu($('#if1798075ff88e13e9583b7')) });
$(function () { menu($('#if1798012ca002ce1b70bc5')) });
; (function (root) {
root.find(".xg_list>div>.data_col ").each(function () {
var _this = $(this).children();
_this.next().hide();
_this.find(".xg_img ").eq(1).hide();
_this.find(".xg_img ").eq(0).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:even").show();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:odd").hide();
_this.next().show();
$(this).hide();
$(this).parent().next().children().show();
})
_this.find(".xg_img ").eq(1).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
_this.next().hide();
$(this).hide();
$(this).parent().prev().children().show();
})
})
root.find(".xg_list .data_col ").eq(0).children().next().show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(1).show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(0).hide();
})($('#rf1798_07a0989e53e314c61'));
; (function (root) {
root.find(".xg_list>div>.data_col ").each(function () {
var _this = $(this).children();
_this.next().hide();
_this.find(".xg_img ").eq(1).hide();
_this.find(".xg_img ").eq(0).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:even").show();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:odd").hide();
_this.next().show();
$(this).hide();
$(this).parent().next().children().show();
})
_this.find(".xg_img ").eq(1).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
_this.next().hide();
$(this).hide();
$(this).parent().prev().children().show();
})
})
root.find(".xg_list .data_col ").eq(0).children().next().show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(1).show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(0).hide();
})($('#rf1798_05b40b94fa31adfdf'));
$(function () { tab.init('if17980dab4c268ab55b800'); var getcount = 10; var getindex = setInterval(function () { var tabselectdefault = $('#if17980dab4c268ab55b800 .xg_tab_tl-select'); if (getcount-- <= 0 || $(tabselectdefault).length <= 0) { clearInterval(getindex); return; } tab.changeitem(tabselectdefault) }, 300) });
; (function (root) {
root.find(".xg_list>div>.data_col ").each(function () {
var _this = $(this).children();
_this.next().hide();
_this.find(".xg_img ").eq(1).hide();
_this.find(".xg_img ").eq(0).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:even").show();
root.find(".xg_list>div>.data_col>.row:even").find(".xg_img:odd").hide();
_this.next().show();
$(this).hide();
$(this).parent().next().children().show();
})
_this.find(".xg_img ").eq(1).click(function () {
root.find(".xg_list>div>.data_col>.row:odd").hide();
_this.next().hide();
$(this).hide();
$(this).parent().prev().children().show();
})
})
root.find(".xg_list .data_col ").eq(0).children().next().show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(1).show();
root.find(".xg_list .data_col ").eq(0).children().find(".xg_img ").eq(0).hide();
})($('#rf1798_0e6f33b8f2da29422'));
$(function () { menu($('#if179800a4267fa4b795f79')) });
var configf1798_0ec9e453da0a9959b = { "logintext": "登录", "registertext": "申请试用", "companyname": "深圳创牛科技有限公司 欢迎您!", "companyurl": "index.html", "welcome": "您好,", "userurl": "member.aspx", "exittext": "退出登录" };
(function (root, config) {
function main() {
var userurl = config.userurl;
var welcome = config.welcome;
var exittext = config.exittext;
root.find(".company a").text(config.companyname).attr("href", config.companyurl);
root.find("#loginedName").attr("href", userurl);
root.find(".f409_img a").attr('userurl', userurl);
if (page.currentDevice() == 1) {
root.find(".f409_img a").attr("href", userurl);
} else {
root.find(".f409_img a").removeAttr("href");
}
root.find("#loginout").text(config.exittext).click(function () {
if (util.inDesign()) return;
var params = {};
var group = "User";
var cmd = "Logout";
util.ajaxMethod(group, cmd, params, function (data) {
if (data == "ok") {
util.openUrl("login.html", "_self");
return;
}
if (util.isNullOrEmpty(data)) { return 0; }
if (data.result != 1) {
jAlert(data.msg, '');
} else {
}
return data.result;
});
});
root.find(".onlogin1").text(config.welcome);
root.find(".rllogin a").text(config.logintext).click(function () {
if (!util.inDesign()) {
util.openUrl("login.html", "_self");
}
});
root.find(".rlreg a").text(config.registertext).click(function () {
if (!util.inDesign()) {
util.openUrl("reg.html", "_self");
}
});
root.find(".f409_img").click(function () {
if (page.currentDevice() == 2) {
root.find(".phone_box").slideToggle();
}
})
root.find("#loginedName").click(function () {
if (page.currentDevice() != 1) {
util.openUrl("member.aspx", "_self");
return false;
}
else {
return true;
}
});
}
page.load(main);
})($('#cf1798-0ec9e453da0a9959b'), configf1798_0ec9e453da0a9959b);; (function (root) {/*LayoutRow*/
$(function () {
$("#xg_header").css({ "position": "fixed", "top": 0, 'left': 0, 'z-index': '9999', 'width': '100%' });
});
/*LayoutRow*/
})($('#rf1798_0a904198c4952bbc9'));
var pattern_i844e338c47f39307 = [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /^.{0,30}$/m, "msg": "允许输入字符数范围是:1到30位" }, { "reg": /(^1\d{10}$)|(^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$)/, "msg": "输入的手机或邮箱格式不对" }]; $(function () { var panel = $('#i1952782592efdb2e'); var img = panel.find('img'); imgCode.init(img); panel.find('.xg_check_tip').on('click', function () { img.click(); }); });
var pattern_i6bbdfc81d16fca4a = [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /\S{6,18}$/, "msg": "长度为6到18个字符" }];
var pattern_ibc71d6d0336450cc = [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /^.{0,30}$/m, "msg": "允许输入字符数范围是:0到30位" }, { "reg": /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, "msg": "输入的邮箱地址格式不正确" }];; (function (root) {
var userRegist = {
init: function () { var btn = root.data('btn'); root.find('#' + btn).on('click', userRegist.commit); }, commit: function () {
var btn = $(this); if (btn.data('commiting') == 1) { return; }
btn.data('commiting', 1); var content = []; var items = root.find('div[form-field],.xg_area'); var error = false; var quantity = 1; items.each(function () {
if (error) { return; }
var _this = $(this); var item = userRegist.getValue(_this); if (_this.hasClass('xg_area')) {
var nid = parseInt(_this.data('nid')); var pid = parseInt(_this.data('pid')); var cid = parseInt(_this.data('cid')); var aid = parseInt(_this.data('aid')); if (nid > 0)
content.push({ 'label': '', 'field': 'CountryId', 'value': nid + '' }); if (pid > 0)
content.push({ 'label': '', 'field': 'ProvinceId', 'value': pid + '' }); if (cid > 0)
content.push({ 'label': '', 'field': 'CityId', 'value': cid + '' }); if (aid > 0)
content.push({ 'label': '', 'field': 'AreaId', 'value': aid + '' }); return;
}
if (!userRegist.verify(_this, item)) { error = true; return; }
if (util.isNullOrEmpty(item.value)) { return; }
content.push(item);
}); if (error) { btn.data('commiting', 0); return; }
var params = { 'content': encodeURIComponent(JSON.stringify(content)) }; var code = root.find('input[data-validate=img]'); if (code.length > 0) { params.CheckCode = code.val(); }
var pwd = root.find('input[type=password]'); if (pwd.length > 0) { params.Password = pwd.val(); } else { params.Password = ''; }
params.PageId = '1845'; params.ClientId = '1845i82dd10191d3faf9d'; params.ver = 132416974645742515; code = root.find('div[form-field=Mobile] input').eq(0); if (code.length > 0) { params.Mobile = code.val(); }
if (typeof myUserRegist != 'undefined') { myUserRegist(params, root, btn); } else {
util.ajaxMethod('UserForm', 'CreateNew', params, function (data) {
btn.data('commiting', 0); if (util.isNullOrEmpty(data)) { return; }
if (data.result != 1) { jAlert(data.msg, '错误'); return; }
var myDo = function () { if (!data.msg.url) { document.location.reload(); } else { var tagvalue = parseInt(data.msg.url); if (tagvalue == 0) { document.location.href = 'index.html'; } else if (tagvalue == -1) { window.history.back(); location.reload(); } else { if (data.msg.url.indexOf('member.aspx') >= 0 && page.currentDevice() == 1) { document.location.href = 'member_user.aspx'; } else { document.location.href = data.msg.url; } } } }
myDo();
});
}
}, verify: function (el, val) {
util.isNullOrEmpty(val) && (val = ''); var col = el.attr('form-field'); var tip = el.find('span.xg_fierror'); var canempty = true; validate[col].forEach(function (item) {
if (item.reg.toString() == '/\\S{1,}/')
canempty = false;
}); var error = false; validate[col].forEach(function (item) { if ((!(canempty && !util.isNullOrEmpty(val.value || '')) && !error && !item.reg.test(val.value || '')) || (!util.isNullOrEmpty(val.value || '') && !item.reg.test(val.value || ''))) { error = true; tip.text(item.msg).show(); return false; } else if (!error) { tip.text('').hide(); } }); if (error) { $('html,body').scrollTop(el.offset().top); } else { }
return !error;
}, getValue: function (el) {
var inputs = el.find('input'); var textArea = el.find('textarea'); var selects = el.find('select'); var val = '', col = el.attr('form-field'); if (inputs.length > 0) {
var hid = el.find('input[type=hidden]'); if (hid.length > 0) { type = 'hidden'; } else { type = inputs.eq(0).attr('type'); }
if (type == 'hidden') { val = hid.val(); } else if (type == 'radio') { inputs.each(function () { if ($(this).is(':checked')) { val = $(this).val(); } }); } else if (type == 'checkbox') { inputs.each(function () { if ($(this).is(':checked')) { val += $(this).val() + ','; } }); if (val.length > 0) { val = val.replace(/,$/g, ''); } } else { val = inputs.eq(0).val(); }
} else if (textArea.length > 0) { val = textArea.val(); } else if (el.data('tag') == 'AreaSelect') { val = $(el).data('name'); } else if (selects.length > 0) { val = selects.find(':selected').val(); } else { typeof console != 'undefined' && console.log('未能设别的内容'); }
if (util.isNullOrEmpty(val)) { return {}; }
var labeltext = ''; var labeldata = el.find('label[data-label=name],span[data-label=name]'); if ($(labeldata).length > 0)
labeltext = $(labeldata[0]).text(); return { 'label': labeltext, 'field': col, 'value': val };
}
}; var validate = { "RealityName": [], "MultiImages": [], "Telephone": [], "Mobile": [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /^.{0,30}$/m, "msg": "允许输入字符数范围是:1到30位" }, { "reg": /(^1\d{10}$)|(^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$)/, "msg": "输入的手机或邮箱格式不对" }], "F1789": [], "Password": [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /\S{6,18}$/, "msg": "长度为6到18个字符" }], "Address": [], "Email": [{ "reg": /\S{1,}/, "msg": "不允许为空" }, { "reg": /^.{0,30}$/m, "msg": "允许输入字符数范围是:0到30位" }, { "reg": /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, "msg": "输入的邮箱地址格式不正确" }], "Name": [], "DateTime": [], "Integral": [], "Sex": [], "BirthDay": [], "IDCardNumber": [], "PostCode": [], "QQ": [], "MSN": [], "Trade": [], "Area.Name": [], "Province.Name": [], "City.Name": [], "Stature": [], "Weight": [], "SelfIntroduction": [], "LastLoginTime": [], "LastLoginIp": [], "LoginCount": [], "Balance": [], "FreezeMoney": [], "Profession": [], "Education": [], "Income": [], "Interest": [], "VerifyStatus": [], "TypeId": [], "UserGroup.Name": [], "ShoppingSumMoney": [], "CompanyName": [], "CommentStar": [] }
page.load(userRegist.init);
})($('#i82dd10191d3faf9d'));
$('.xg_check_tip').click(function() {
var phone = $('#phone').val().trim();
var verify = $('#input-verify-code').val().trim();
var random = $('#random').val();
var token = $('#token').val();
if (phone == '') {
alert('电话号码不能为空');
return;
}
$.ajax({
url: "message_service.html",
type: 'post',
dataType: 'json',
data: {
phone: phone,
verify: verify,
random: random,
token: token,
},
success: function (res) {
if (res == 1) {
alert('短信发送成功,请注意查看');
CountDownTime();
$('.xg_check_tip').addClass('disabled');
$('.xg_check_tip').attr('disabled',true);
} else if (res == 2) {
alert('您今天已经达到发送短信次数,请明天再试');
} else if (res == 3) {
alert('您的号码已经申请过,无需再重复申请');
} else if (res == 4) {
alert('验证码不正确,请重试...');
} else if (res == 5) {
alert('验证码过期,请点击验证码刷新后再填写');
} else if (res == 6) {
alert('异常提交,请刷新页面后重试...');
} else {
alert('短信发送失败,请稍后重试');
}
}
})
})
function apply() {
var phone = $('#phone').val();
var business = $('#business option:selected').text();
var code = $('#code').val();
var email = $('#email').val();
var name = $('#name').val();
var company = $('#company').val();
var content = $('#content').val();
if (phone == '') {
alert('电话号码不能为空');
return;
} else if (business == '请选择您的业务') {
alert('请选择业务');
return;
} else if (code == '') {
alert('验证码不能为空');
return;
} else if (name == '') {
alert('姓名不能为空');
return;
} else if (content == '') {
alert('请填写业务描述');
return;
}
$.ajax({
url: "reg.html",
type: 'post',
dataType: 'json',
data: {
phone: phone,
business: business,
code: code,
email: email,
name: name,
company: company,
content: content
},
success: function (res) {
if (res == 1) {
alert('恭喜您已获得免费体验资格!稍后商务联系您!');
window.location.href = 'index.html';
}
else if (res == 2) {
alert('验证码不正确,请重试...');
window.location.reload();
}
else if (res == 3) {
alert('您已经获得过体验资格了,无需再申请了');
window.location.href = 'index.html';
} else if (res == 4) {
alert('手机号不正确,请重新输入');
}
else if (res == 5) {
alert('邮箱地址不正确,请输入正确的邮箱地址');
}
else {
alert('您目前无法申请试用,请联系我们的工作人员');
window.location.href = 'index.html';
}
}
})
}
var countdown = 60; // 倒计时初始数字
var timor = null; // 计时器初始值
//倒计时
function CountDownTime() {
var pane = $('.xg_check_tip');
if (countdown == 0) {
countdown = 60;
pane.val('获取验证码').removeClass('disabled');
$('.xg_check_tip').removeAttr('disabled',true);
clearTimeout(timor)
} else {
if (countdown < 10) {
pane.val("0" + countdown + 's');
} else {
pane.val(countdown + 's');
}
countdown--;
timor = setTimeout(function () {
CountDownTime()
}, 1000)
}
}