/*public*/
if($("form").attr("navigateid")=="1,index.html"){
}
else if($("form").attr("navigateid")=="14"){
$("#complex_navli34").addClass("complex_nav_cur");
}
else{
$("#complex_navli"+$("form").attr("navigateid")+"").addClass("complex_nav_cur");
}/*public*/
/*ea_h*/
/*xn_c_reg1_wrap*/
$(function() {
try {
if ($("#EIMS_C_40073_Panel").length > 0) {
EIMS_C_40073.Init();
}
} catch (err) {}
});
var EIMS_C_40073 = {
Config: {
DisabledSeconds: 30,
ProvinceArray: [], //省
CityArray: [], //市
AreaArray: [], //区
UploadType: 1 //1图像上传,2认证照上传
},
Init: function() {
$('.xn_c_reg1_close').on('click', function() {
$('.xn_c_reg1_wrap').hide();
});
$(".EIMS_C_40073_tologin").on("click", function() {
$("#islogin").val(true);
$(".xn_c_reg1_wrap").hide();
$(".xn_c_login_1_wrap").show();
})
$('#EIMS_C_40073_ChangeCode').on('click', function() {
$('#EIMS_C_40073_CheckCode').click();
});
$('#EIMS_C_40073_Panel').find('input[type=text],input[type=password]').on('blur', function() {
EIMS_C_40073.CheckInput($(this));
});
$('#EIMS_C_40073_Panel').find('input[type=text],input[type=password]').on('focus', function() {
$(this).siblings('.EIMS_C_40073_Msg').text('');
});
$('#EIMS_C_40073_Panel').find('select').on('change', function() {
EIMS_C_40073.CheckInput($(this));
});
//注册
$('#EIMS_C_40073_Register').on('click', function() {
// if ($('#EIMS_C_40073_ChkTerm').length) {
// if (!$('#EIMS_C_40073_ChkTerm').is(':checked')) {
// $('#EIMS_C_40073_TermMsg').text('您必须同意服务条款才能进行注册');
// return false;
// }
// }
var isTrue = true;
// $('#EIMS_C_40073_Panel').find('input[type=text],input[type=password]').each(function () {
// isTrue = EIMS_C_40073.CheckInput($(this));
// if (!isTrue) { return false }
// });
console.log(isTrue)
if (isTrue)
var EIMS_C_40073_RealityName = $("#EIMS_C_40073_RealityName").val();
var EIMS_C_40073_Mobile = $("#EIMS_C_40073_Mobile").val();
var EIMS_C_Tradevale = $("#EIMS_C_Tradevale").val();
var EIMS_C_40073_PostCode = $("#EIMS_C_40073_PostCode").val();
var EIMS_C_40073_Email = $("#EIMS_C_40073_Email").val();
var inputCode = $("#EIMS_C_40073_IsEmailValided").val();
console.log("##" + EIMS_C_40073_RealityName);
console.log(EIMS_C_40073_Mobile);
console.log(EIMS_C_Tradevale);
console.log(EIMS_C_40073_PostCode);
console.log(EIMS_C_40073_Email);
console.log(inputCode);
params = {
fun: 3,
istel:1,
number: "287773",
EIMS_C_40073_RealityName: EIMS_C_40073_RealityName,
EIMS_C_40073_Mobile: EIMS_C_40073_Mobile,
EIMS_C_Tradevale: EIMS_C_Tradevale,
EIMS_C_40073_PostCode: EIMS_C_40073_PostCode,
EIMS_C_40073_Email: EIMS_C_40073_Email,
inputCode: inputCode,
};
AjaxMethod("Extention", "Run", params, function(data) {
console.log(data.msg)
if (data.result == 1) {
alert("注册成功!即刻免费下载资料!")
function toreload() {
window.location.reload();
}
setTimeout(toreload, 1000);
}
});
});
//手机号码注册
if ($('#EIMS_C_40073_GetMobileCode').length) {
//发送手机验证码
$('#EIMS_C_40073_GetMobileCode').on('click', function() {
$('#EIMS_C_40073_CodeView').show();
$('#EIMS_C_40073_WinCheckCode').click();
});
//关闭验证码窗口
$('#EIMS_C_40073_CodeViewClose,#EIMS_C_40073_Cancel').on('click', function() {
$('#EIMS_C_40073_CodeView').hide();
$("#EIMS_C_40073_PwinMsg").text('');
});
//确定输入验证码
$('#EIMS_C_40073_Confirm').on('click', function() {
EIMS_C_40073.SendMobileCode(); //发送手机短信验证码
});
//更换手机注册验证码
$('#EIMS_C_40073_WinChangeCode').on('click', function() {
$('#EIMS_C_40073_WinCheckCode').click();
});
}
//省市区地址
if ($('#EIMS_C_40073_Area').length) {
var updateAdress = function() {
$('#EIMS_C_40073_Province').val($('#EIMS_C_40073_ProvinceId').val());
$('#EIMS_C_40073_City').val($('#EIMS_C_40073_CityId').val());
$('#EIMS_C_40073_Areas').val($('#EIMS_C_40073_AreaId').val());
}
$.ajaxSetup({
cache: true,
async: false
});
$.getScript("/Js/ChinaArea.js").done(function() {
EIMS_C_40073.DeliveryCPCABind(); //获取省市区信息
//绑定省信息
EIMS_C_40073.GetProvince($("#EIMS_C_40073_ProvinceId"), $("#EIMS_C_40073_CityId"), $(
"#EIMS_C_40073_AreaId"));
updateAdress();
}).fail(function() {});
//绑定省市切换事件
$("#EIMS_C_40073_ProvinceId").change(function() {
EIMS_C_40073.GetCity($(this).val(), $("#EIMS_C_40073_CityId"), $(
"#EIMS_C_40073_AreaId"));
updateAdress();
});
$("#EIMS_C_40073_CityId").change(function() {
EIMS_C_40073.GetArea($(this).val(), $("#EIMS_C_40073_AreaId"));
updateAdress();
});
$("#EIMS_C_40073_AreaId").change(function() {
updateAdress();
});
}
//出生日期
if ($('#EIMS_C_40073_BirthdayDate').length) {
EIMS_C_40073.BindBirthdayDate();
$('#EIMS_C_40073_BirthDay').val($('#EIMS_C_40073_Year').val() + "-" + $('#EIMS_C_40073_Month')
.val() + "-" + $('#EIMS_C_40073_Day').val());
$('#EIMS_C_40073_Year,#EIMS_C_40073_Month,#EIMS_C_40073_Day').on('change', function() {
if ($(this).attr('id') != "EIMS_C_40073_Day") {
EIMS_C_40073.ResetMontDay();
}
$('#EIMS_C_40073_BirthDay').val($('#EIMS_C_40073_Year').val() + "-" + $(
'#EIMS_C_40073_Month').val() + "-" + $('#EIMS_C_40073_Day').val());
});
}
//性别
if ($('#EIMS_C_40073_SexBoy').length) {
$('#EIMS_C_40073_SexBoy,#EIMS_C_40073_SexGirl').on('change', function() {
$('#EIMS_C_40073_Sex').val($('#EIMS_C_40073_SexBoy').is(":checked") ? "男" : "女");
});
}
//是否已婚
if ($('#EIMS_C_40073_IsMarry').length) {
$('#EIMS_C_40073_IsMarry,#EIMS_C_40073_NoMarry').on('change', function() {
$('#EIMS_C_40073_Marry').val($('#EIMS_C_40073_IsMarry').is(":checked") ? "true" :
"false");
});
}
//头像上传、
if ($('#EIMS_C_40073_Image').length) {
//上传头像
$("#EIMS_C_40073_Photo").change(EIMS_C_40073.UploadPhotoFile) //自动触发文件上传
$('#EIMS_C_40073_Image').on('click', function() {
EIMS_C_40073.Config.UploadType = 1;
$("#EIMS_C_40073_Photo").click(); //触发文件选择框的点击事件
});
}
//认证照上传
if ($('#EIMS_C_40073_Certification').length) {
//认证照上传
$("#EIMS_C_40073_Picture").change(EIMS_C_40073.UploadPhotoFile) //自动触发文件上传
$('#EIMS_C_40073_Certification').on('click', function() {
EIMS_C_40073.Config.UploadType = 2;
$("#EIMS_C_40073_Picture").click(); //触发文件选择框的点击事件
});
}
//注册协议
if ($('#EIMS_C_40073_ChkTerm').length) {
//注册协议
$('#EIMS_C_40073_RegTerm').on('click', function() {
$('#EIMS_C_40073_TremView').show();
});
//关闭注册协议窗口
$('#EIMS_C_40073_TremClose,#EIMS_C_40073_TremAgree').on('click', function() {
$('#EIMS_C_40073_TremView').hide();
});
}
},
//上传用户图像
UploadPhotoFile: function() {
var fName = $(this).val();
if (fName == "") {
return false;
}
var fType = fName.substring(fName.lastIndexOf(".")).toLocaleLowerCase();
var name = fName.substring(fName.lastIndexOf("\\") + 1).toLocaleLowerCase();
var errMsg = "";
$('#EIMS_C_40073_PhotoMsg').text("");
$('#EIMS_C_40073_PictureMsg').text("");
if (!/.(gif|jpg|jpeg|png)$/.test(fType)) {
errMsg = "图片类型必须是gif,jpeg,jpg或png中的一种";
} else {
if ($(this)[0].files != null) {
// 判断文件大小
if ($(this)[0].files[0].size > 1024 * 1024 * 2)
errMsg = "请上传大小小于1M的图片";
}
}
if (errMsg != "") {
$(this).val("");
//alert(errMsg);
EIMS_C_40073.Config.UploadType == 1 ?
$('#EIMS_C_40073_PhotoMsg').text(errMsg) :
$('#EIMS_C_40073_PictureMsg').text(errMsg);
return false;
}
EIMS_C_40073.Config.UploadType == 1 ?
$('#EIMS_C_40073_PhotoName').text(name) :
$('#EIMS_C_40073_PictureName').text(name);
},
//检测输入
CheckInput: function(obj) {
var mark = obj.attr('data-mark'),
val = obj.val(),
msg = obj.siblings('.EIMS_C_40073_Msg');
msg.text('');
switch (mark) {
case "RealityName": //姓名
if (IsNullOrEmpty(val)) {
msg.text('请输入姓名');
return false;
}
break;
case "Name": //用户名
if (IsNullOrEmpty(val)) {
msg.text('请输入用户名');
return false;
}
//var regularMobile = /^(?:13\d|14\d|15\d|17\d|18\d|19\d)\d{5}(\d{3}|\*{3})$/, //11位数字
var regularMobile = /^\d{11}$/, //11位数字
regularEmail =
/^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;
if (!regularMobile.test(val) && !regularEmail.test(val)) {
msg.text("请输入正确的手机号码或邮箱地址1");
return false;
}
if (EIMS_C_40073.IsExitMobile(val, msg) || EIMS_C_40073.IsExitEmail(val, msg)) {
return false;
}
break;
case "Mobile": //手机号码
if (IsNullOrEmpty(val)) {
msg.text('请输入手机号码');
return false;
}
//var regularMobile = /^(?:13\d|14\d|15\d|17\d|18\d|19\d)\d{5}(\d{3}|\*{3})$/; //11位数字
var regularMobile = /^\d{11}$/; //11位数字
if (!regularMobile.test(val)) {
msg.text("手机号码格式不正确,请重新输入");
return false;
}
if (EIMS_C_40073.IsExitMobile(val, msg)) {
return false;
}
break;
case "MobileCode": //手机验证码
if (IsNullOrEmpty(val)) {
msg.text('请输入手机验证码');
return false;
}
break;
case "Email": //邮箱
if (IsNullOrEmpty(val)) {
//msg.text('请输入邮箱地址');
//return false;
}else{
var regularEmail =
/^[\w\u4e00-\u9fa5]+([-+.\u4e00-\u9fa5]\w+)*@[\w\u4e00-\u9fa5]+([-.\u4e00-\u9fa5]\w+)*\.\w+([-.]\w+)*$/;
if (!regularEmail.test(val)) {
msg.text("邮箱格式不正确,请重新输入");
return false;
}
if (EIMS_C_40073.IsExitEmail(val, msg)) {
return false;
}
}
break;
case "EmailCode": //邮箱验证码
if (IsNullOrEmpty(val)) {
msg.text('请输入手机验证码');
return false;
}
break;
case "Trade": //所属行业
if (IsNullOrEmpty(val)) {
msg.text('请选择所属行业');
return false;
} else {
console.log(val)
}
break;
/*case "CompanyName": //所属行业
if (IsNullOrEmpty(val)) {
msg.text('请输入公司名称');
return false;
}
break;*/
case "Password": //密码
if (IsNullOrEmpty(val)) {
msg.text("请输入密码");
return false;
}
if (val.length > 20 || val.length < 6) {
msg.text("密码由6-20个字符组成");
return false;
}
if (val.split(" ").length > 1) {
msg.text("密码不能包含特殊字符");
return false;
}
if (/[\u4E00-\u9FA5]/i.test(val)) {
msg.text('密码不能包含中文字符');
return false;
}
break;
case "PasswordTwo": //确认密码
if (val != $('#EIMS_C_40073_Password').val()) {
msg.text('两次密码输入不一致');
return false;
}
break;
case "IDCardNumber": //身份证号
if (!IsNullOrEmpty(val)) {
var checkIDCard15 = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/;
var checkIDCard18 =
/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/;
if (!checkIDCard15.test(val) && !checkIDCard18.test(val)) {
msg.text('身份证格式不正确');
return false;
}
}
break;
case "PostCode": //所属行业
// if (!IsNullOrEmpty(val)) {
// if (val.length > 6 || !/^[0-9]*$/.test(val)) {
// msg.text("邮编格式不正确");
// return false;
// }
// }
/*if (IsNullOrEmpty(val)) {
msg.text('请选输入公司名称');
return false;
}
break;*/
case "QQ": //QQ号码
// if (!IsNullOrEmpty(val) && !/^[0-9]*$/.test(val)) {
//msg.text("QQ号码格式不正确");
// return false;
// }//
break;
case "Stature": //身高
if (!IsNullOrEmpty(val) && !/^-?\d+\.?\d{0,2}$/.test(val)) {
msg.text("请输入正确的身高");
return false;
}
break;
case "Weight": //体重
if (!IsNullOrEmpty(val) && !/^-?\d+\.?\d{0,2}$/.test(val)) {
msg.text("请输入正确的体重");
return false;
}
break;
case "Income": //收入
if (!IsNullOrEmpty(val) && !/^-?\d+\.?\d{0,2}$/.test(val)) {
msg.text("请输入正确的收入");
return false;
}
break;
case "CheckCodeInput": //验证码
if (IsNullOrEmpty(val)) {
msg.text("请输入验证码");
return false;
}
break;
}
return true;
},
//发送手机短信验证码
SendMobileCode: function() {
var mobile = $("#EIMS_C_40073_Mobile"),
phoneNum = mobile.val(), //手机号码
btnGetCode = $('#EIMS_C_40073_GetMobileCode'),
msg = btnGetCode.siblings('.EIMS_C_40073_Msg'),
codeMsg = $("#EIMS_C_40073_PwinMsg"),
validCode = $("#EIMS_C_40073_TxtCheckCode").val(); //图形验证码
//if (!/^(?:13\d|14\d|15\d|17\d|18\d|19\d)\d{5}(\d{3}|\*{3})$/.test(phoneNum)) {
if (!/^\d{11}$/.test(phoneNum)) {
codeMsg.text("手机号码格式不正确");
return false;
}
if (EIMS_C_40073.IsExitMobile(phoneNum, codeMsg)) {
return false;
}
codeMsg.text("");
if (IsNullOrEmpty(validCode)) {
codeMsg.text("请输入图片验证码");
return false;
}
codeMsg.text("");
var keyCode = $('#EIMS_C_40073_WinCheckCode').attr('data-key');
//调用Ajax,发送验证码
AjaxMethod("User", "CheckCode", {
mobile: phoneNum,
type: 4,
inputCode: validCode,
code: keyCode
}, function(data) {
if (data.result <= 0) {
codeMsg.text(data.msg);
return false;
}
$('#EIMS_C_40073_CodeView').hide();
var n = EIMS_C_40073.Config.DisabledSeconds;
btnGetCode.attr({
"disabled": "disabled"
}).addClass('active').val(" " + n + " 秒 ");
//倒计时
var time = setInterval(function() {
n--;
btnGetCode.val(" " + n + " 秒 ");
if (n < 0) {
clearInterval(time);
btnGetCode.removeAttr("disabled").removeClass('active').val("获取短信验证码");
msg.text("");
}
}, 1000);
});
},
//验证手机号是否存在
IsExitMobile: function(mobile, msg) {
var isSuccess = false;
AjaxMethod("User", "CheckMobile", {
"mobile": mobile
}, function(data) {
if (IsNullOrEmpty(data)) {
isSuccess = true;
return;
}
if (data.result < 0) {
msg.text("手机号码已存在,请重新输入");
isSuccess = true;
return;
}
isSuccess = false;
}, null, false);
return isSuccess;
},
//验证邮箱是否存在
IsExitEmail: function(email, msg) {
var isSuccess = false;
AjaxMethod("User", "CheckMail", {
"email": email
}, function(data) {
if (IsNullOrEmpty(data)) {
isSuccess = true;
return;
}
if (data.result < 0) {
msg.text("邮箱账号已存在,请重新输入");
isSuccess = true;
return;
}
isSuccess = false;
}, null, false);
return isSuccess;
},
//保存省、市、区信息
DeliveryCPCABind: function() {
//省市区暂时只考虑国内
if (IsNullOrEmpty(nations)) {
return;
}
var pros = nations[0].provinces; //获取国内省市区信息
$(pros).each(function(i, p) { //省
var pArray = [p.pId, p.pn, p.p_en]; //省信息
EIMS_C_40073.Config.ProvinceArray[EIMS_C_40073.Config.ProvinceArray.length] = pArray;
$(p.cities).each(function(j, c) { //市
var cArray = [p.pId, c.cId, c.cn, c.c_en]; //市信息
EIMS_C_40073.Config.CityArray[EIMS_C_40073.Config.CityArray.length] = cArray;
$(c.areas).each(function(k, a) { //省
var aArray = [p.pId, c.cId, a.aId, a.an, a.a_en];
EIMS_C_40073.Config.AreaArray[EIMS_C_40073.Config.AreaArray
.length] = aArray;
});
});
});
},
//省数据
GetProvince: function(proObj, cityObj, areaObj) {
proObj.find("option").remove();
var pros = EIMS_C_40073.Config.ProvinceArray;
for (var i = 0; i < pros.length; i++) {
proObj.append("");
}
EIMS_C_40073.GetCity(proObj.val(), cityObj, areaObj);
},
//市数据
GetCity: function(provinceID, cityObj, areaObj) {
cityObj.find("option").remove();
var citys = EIMS_C_40073.Config.CityArray;
for (var i = 0; i < citys.length; i++) {
if (citys[i][0] == provinceID) {
cityObj.append("");
}
}
EIMS_C_40073.GetArea(cityObj.val(), areaObj);
},
//区数据
GetArea: function(cityID, areaObj) {
areaObj.find("option").remove();
var areas = EIMS_C_40073.Config.AreaArray;
for (var i = 0; i < areas.length; i++) {
if (areas[i][1] == cityID) {
areaObj.append("");
}
}
},
//获取市数据
GetCity: function(provinceID, cityObj, areaObj) {
cityObj.find("option").remove();
var citys = EIMS_C_40073.Config.CityArray;
for (var i = 0; i < citys.length; i++) {
if (citys[i][0] == provinceID) {
cityObj.append("");
}
}
EIMS_C_40073.GetArea(cityObj.val(), areaObj);
},
//获取区数据
GetArea: function(cityID, areaObj) {
areaObj.find("option").remove();
var areas = EIMS_C_40073.Config.AreaArray;
for (var i = 0; i < areas.length; i++) {
if (areas[i][1] == cityID) {
areaObj.append("");
}
}
},
//绑定出生日期
BindBirthdayDate: function() {
var year = $('#EIMS_C_40073_Year'),
month = $('#EIMS_C_40073_Month'),
day = $('#EIMS_C_40073_Day');
if (year.length) {
var date = new Date(),
nowYear = date.getFullYear();
year.html('');
for (var y = 1; y <= 100; y++) {
year.append(' ');
}
}
if (month.length) {
month.html('');
for (var m = 1; m <= 12; m++) {
month.append(' ');
}
}
if (day.length) {
day.html('');
for (var d = 1; d <= 31; d++) {
day.append(' ');
}
}
},
//重置日期天数
ResetMontDay: function() {
var yearEl = $('#EIMS_C_40073_Year'),
monthEl = $('#EIMS_C_40073_Month'),
dayEl = $('#EIMS_C_40073_Day'),
year = yearEl.val(),
month = monthEl.val(),
firstdate = year + '-' + month + '-01',
day = new Date(year, month, 0),
lastDay = day.getDate(); //获取当月最后一天
dayEl.html("");
for (var i = 1; i <= lastDay; i++) {
dayEl.append(' ');
}
}
}
/*end_xn_c_reg1_wrap*/
/*xn_c_login_1_wrap*/
/*2014-12-25*/
$(function() {
try {
if ($("#EIMS_C_40003_1_Panel").length > 0) {
EIMS_C_40003_1.Init();
}
} catch (err) {}
});
var EIMS_C_40003_1 = {
Config: {
ToRegisterUrl: "reg.aspx", //注册页面
ToFindPwd: "getpass.aspx" //手机找回密码 这个目标地址可自定义
},
Init: function() {
$(".xn_c_login1_close").on("click", function() {
$(".xn_c_login_1_wrap").hide();
});
$(".xn_c_login_toreg").on("click", function() {
$("#islogin").val(false);
$(".xn_c_login_1_wrap").hide();
$(".xn_c_reg1_wrap").show();
});
},
//去注册
ToRegister: function() {
$("#EIMS_C_40003_1_ToRegister a").attr("target", "_blank").attr("href", EIMS_C_40003_1.Config
.ToRegisterUrl);
},
//找回密码
ToFindPwd: function() {
$("#EIMS_C_40003_1_ToFindPwd a").attr("target", "_blank").attr("href", EIMS_C_40003_1.Config.ToFindPwd);
},
VerifyName: function() {
var isEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
var isMobile = /^1[3-8]{1}\d{9}$/;
var isNumber = /^\d{11}$/; //11位数
var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
//验证邮箱、手机用户名
if (IsNullOrEmpty($("#EIMS_C_40003_1_Name").val())) {
$("#EIMS_C_40003_1_NamePrompt").text("用户名不能为空!");
$(".xn_c_login_1_wrap").show();
return false;
} else if ($("#EIMS_C_40003_1_Name").val().length > 0 && $("#EIMS_C_40003_1_Name").val().length < 4) {
$("#EIMS_C_40003_1_NamePrompt").text("用户名不能少于4位!");
$(".xn_c_login_1_wrap").show();
return false;
} else {
$("#EIMS_C_40003_1_NamePrompt").text("");
}
if ($("#EIMS_C_40003_1_Name").val().indexOf("@") >= 0) {
if (!isEmail.test($("#EIMS_C_40003_1_Name").val())) {
$("#EIMS_C_40003_1_NamePrompt").text("邮箱格式不正确!");
$(".xn_c_login_1_wrap").show();
return false;
} else {
$("#EIMS_C_40003_1_NamePrompt").text("");
}
} else if (isNum.test($("#EIMS_C_40003_1_Name").val())) {
if (!isNumber.test($("#EIMS_C_40003_1_Name").val())) {
$("#EIMS_C_40003_1_NamePrompt").text("手机号码应为11位数字!");
$(".xn_c_login_1_wrap").show();
return false;
} else {
$("#EIMS_C_40003_1_NamePrompt").text("");
}
if (!isMobile.test($("#EIMS_C_40003_1_Name").val())) {
$("#EIMS_C_40003_1_NamePrompt").text("手机号码格式不正确!");
$(".xn_c_login_1_wrap").show();
return false;
} else {
$("#EIMS_C_40003_1_NamePrompt").text("");
}
}
},
VerifyPwd: function() {
//验证登录密码
if ($("#EIMS_C_40003_1_Password").val().length > 0) {
if ($("#EIMS_C_40003_1_Password").val().length < 6) {
$("#EIMS_C_40003_1_PwdPrompt").text("密码不能小于6位!");
return false;
} else {
$("#EIMS_C_40003_1_PwdPrompt").text("");
}
} else {
$("#EIMS_C_40003_1_PwdPrompt").text("密码不能为空!");
}
},
VerifyCode: function() {
if ($("#EIMS_C_40003_1_InCode").length > 0 && $("#EIMS_C_40003_1_InCode").val().length < 1) {
$("#EIMS_C_40003_1_CheckCodePrompt").text("验证码不能为空!");
return false;
} else {
$("#EIMS_C_40003_1_CheckCodePrompt").text("");
}
},
VerifyEmail: function() {
var email = $("#EIMS_C_40003_1_Email").val();
if (!email) {
alert("手机不能为空!")
}
},
LoginCheck: function() {
if (!EIMS_C_40003_1.VerifyName) {
return false;
}
if (!EIMS_C_40003_1.VerifyPwd) {
return false;
}
if (!EIMS_C_40003_1.VerifyCode) {
return false;
}
return true;
}
}
/*end_xn_c_login_1_wrap*/
/*xn_h_12_wrap*/
/*----2015-06-18改 给会员名加链接---*/
$ && $(function() {
try {
if ($("#xn_h_12_wrap").length > 0) {
EIMS_C_40000.Init();
$("#EIMS_C_40000_loginedName").wrap("");
};
} catch (err) {}
});
var EIMS_C_40000 = {
Config: {
group: 0,
},
Init: function() {
$("#EIMS_C_40000_loginout").click(EIMS_C_40000.loginout);
$(".xn_h_12_rllogin").click(function() {
$(".xn_c_login_1_wrap").show();
});
var wwidth = $(window).width();
if (wwidth < 768) {
$(".login_box").appendTo("#ea_n");
} else {
$(".login_box").prependTo(".t_t_w");
}
AjaxMethod("User", "IsLogin", null, function(data) {
if (IsNullOrEmpty(data)) {
return;
}
// if (data.result != 1) {
// if($(".EIMS_C_40003_1_Error").text().length != 0 && $(".EIMS_C_40003_1_Error").text()!=null){
// $(".xn_c_login_1_wrap").addClass('open');
// }
// if (IsNullOrEmpty(data.msg.name)) {
// $("#EIMS_C_40000_normallName").remove();
// $("#EIMS_C_40000_normallName1").remove();
// } else {
// $("#EIMS_C_40000_normallName").html(data.msg.name);
// }
// $("#EIMS_C_40000_Logined").remove();
// $("#EIMS_C_40000_Normall").show();
// return;
// }
if (data.result == 1) {
console.log("###返回1")
EIMS_C_40000.Config.group = data.msg.gid;
EIMS_C_40000.loadpage();
} else {
if ($(".EIMS_C_40003_1_Error").text().length != 0 && $(".EIMS_C_40003_1_Error")
.text() != null) {
$(".xn_c_login_1_wrap").addClass('open');
}
if (IsNullOrEmpty(data.msg.name)) {
$("#EIMS_C_40000_normallName").remove();
$("#EIMS_C_40000_normallName1").remove();
} else {
$("#EIMS_C_40000_normallName").html(data.msg.name);
}
$("#EIMS_C_40000_Logined").remove();
$("#EIMS_C_40000_Normall").show();
console.log("###返回其他")
EIMS_C_40000.Config.group = 0;
EIMS_C_40000.loadpage();
return;
}
$("#EIMS_C_40000_loginedName").html(data.msg.name);
$("#EIMS_C_40000_Normall").remove();
$("#EIMS_C_40000_Logined").show();
});
},
loginout: function() {
AjaxMethod("User", "Logout", null, function(data) {
if (data == "ok") {
document.location.reload();
}
});
},
loadpage: function() {
//处理样式
$(".tomember").each(function() {
var groupid = EIMS_C_40000.Config.group;
var istomember = $(this).val();
if (istomember) {
istomember = $(this).val().split(',');
} else {
istomember[0] = "null";
}
var x = $.inArray(groupid.toString(), istomember);
if (x > 0 || istomember[0] == undefined) {
$(this).parent().find(".ndown_lb_ts").hide();
} else {
$(this).parent().find(".ndown_lb_ts").show();
}
})
var filehref = [];
$(".ndown_lb_xq").each(function(index) {
var x = $(this).find("a").attr("href");
// console.log(x)
var filetypeimg = x.split("/");
filetypeimg = filetypeimg[filetypeimg.length - 1].split('.')[1];
//console.log(filetypeimg)
var rar = ["rar", "RAR"];
var zip = ["zip", "ZIP"];
var doc = ["doc", "docx", "DOC", "DOCX"];
var xls = ["xls", "xlsx", "XLS", "XLSX"];
var pdf = ["pdf", "PDF"];
if (rar.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_rar.png";
} else if (zip.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_zip.png";
} else if (doc.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_docx.png";
} else if (xls.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_xlsx.png";
} else if (pdf.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_pdf.png";
} else {
filetypeimg = x;
}
$(this).parent().find(".ndown_lb_fileimg img").attr("src", filetypeimg);
filehref.push(x);
var isshow = $(this).parent().find(".ndown_lb_ts").css("display");
if (isshow != "none") {
$(this).find("a").attr("href", "");
}
$(this).find("a").attr("data-index", index);
})
// $(".ndown_lb_xq").each(function(index){
// var url= $(this).find("a").attr("href");
// console.log(url)
// $(this).click(function(){
// if(!url){
// $(".xn_c_login_1_wrap").show();
// }})})
$(".ndown_lb_xq").each(function(index) {
var url = $(this).find("a").attr("href");
// console.log(url)
$(this).click(function() {
var filename = $(this).parent().find(".ndown_lb_title a").attr("title");
var fileId = $(this).parent().find(".ndown_lb_xq").attr("data-fileid");
var fileimg = $(this).parent().find(".ndown_lb_xq").attr("data-fileimg");
var fileinfo = $(this).parent().find(".ndown_lb_xq").attr("data-fileinfo");
var filesize = $(this).parent().find(".ndown_lb_xq").attr("data-filesize");
var filetypeid = $(this).parent().find(".ndown_lb_xq").attr("data-typeid");
// alert("点击了+"+fileId)
if (!url) {
$(".xn_c_login_1_wrap").show();
return false;
}
var filetypeimg = url.split(".")[1];
// console.log(filetypeimg)
var rar = ["rar", "RAR"];
var zip = ["zip", "ZIP"];
var doc = ["doc", "docx", "DOC", "DOCX"];
var xls = ["xls", "xlsx", "XLS", "XLSX"];
var pdf = ["pdf", "PDF"];
if (rar.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_rar.png";
} else if (zip.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_zip.png";
} else if (doc.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_docx.png";
} else if (xls.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_xlsx.png";
} else if (pdf.indexOf(filetypeimg) >= 0) {
filetypeimg = "/Images/filetype/filetype_pdf.png";
} else {
filetypeimg = fileimg;
}
// alert("执行方法记录:"+fileId);
params = {
fun: 1,
number: "287773",
filename: filename,
fileId: fileId,
fileurl: url,
fileinfo: encodeURIComponent(fileinfo),
fileimg: fileimg,
filesize: filesize,
todowntype: filetypeid,
filetypeimg: filetypeimg,
};
console.log(params.fileId);
AjaxMethod("Extention", "Run", params, function(data) {
console.log(data)
console.log(data.result)
console.log(data.msg)
});
})
})
}
}
/*end_xn_h_12_wrap*/
//获取邮箱验证码注册
$("#EIMS_C_40073_GetEmailCode").click(function() {
var islogin = $("#islogin").val();
console.log(islogin)
//注册
var params = {
istel:1,
mobile: $("#EIMS_C_40073_Mobile").val(),
type: 9,
};
AjaxMethod("User", "SendMobileCode", params, function(data) {
console.log(data)
if (data.result == 1) {
var countdown = 60;
function setTime(obj) {
if (countdown == 0) {
obj.prop('disabled', false);
obj.val("点击获取验证码");
countdown = 60; //60秒过后button上的文字初始化,计时器初始化;
return;
} else {
obj.prop('disabled', true);
obj.val("(" + countdown + "s)后重新发送");
countdown--;
}
setTimeout(function() {
setTime(obj)
}, 1000) //每1000毫秒执行一次
}
setTime($("#EIMS_C_40073_GetEmailCode"));
} else {
$("#EIMS_C_40073_EmailCodeMsg").text("该手机已注册,请直接登录或更改手机号码")
$("#EIMS_C_40073_EmailCodeMsg").css("margin-left", "5px")
}
});
})
//获取邮箱验证码登录
$("#EIMS_C_40003_1_GetEmailCode").click(function() {
var islogin = $("#islogin").val();
console.log(islogin)
//登录
var params = {
istel:1,
mobile: $("#EIMS_C_40003_1_Email").val(),
type: 8,
};
AjaxMethod("User", "SendMobileCode", params, function(data) {
console.log(data)
if (data.result == 1) {
var countdown = 60;
function setTime(obj) {
// console.log(countdown)
if (countdown == 0) {
obj.prop('disabled', false);
obj.val("点击获取验证码");
countdown = 60; //60秒过后button上的文字初始化,计时器初始化;
return;
} else {
obj.prop('disabled', true);
obj.val("(" + countdown + "s)后重新发送");
countdown--;
}
setTimeout(function() {
setTime(obj)
}, 1000) //每1000毫秒执行一次
}
setTime($("#EIMS_C_40003_1_GetEmailCode"));
} else {
alert("手机不存在!")
}
})
})
//点击登录
$("#EIMS_C_40003_1_Login").click(function() {
//alert("开始登录")
var params = {
Mobile: $("#EIMS_C_40003_1_Email").val(),
MobileCode: $("#EIMS_C_40003_1_IsEmailValided").val(),
};
AjaxMethod("User", "RegisterLogin", params, function(data) {
console.log(data)
if (data.result == 1) {
function toreload() {
window.location.reload();
}
setTimeout(toreload, 1000);
} else {
alert("登陆失败!")
// window.location.reload();
}
});
})
/*top*/
$(function() {
//导航
if ($(window).width() < 768) {
$(".t_ver").appendTo($(".xn_n_14_wrap_main_ter"));
$(".xn_n_14_wrap_main_w").children('ul').children('li').each(function() {
if ($(this).children('ul').length > 0) {
//$(this).children('a').removeAttr("href");
$(this).append("");
} else {}
})
$(".xn_h_2_Search_HVbox2").appendTo($(".xn_n_14_wrap_main_la"));
$(".xn_n_14_nav").click(function() {
$(".xn_n_14_wrap").show();
})
$(".xn_n_14_nav_close").click(function() {
$(".xn_n_14_wrap").hide();
})
} else {
$(document).ready(function() {
var nId = -1,
curId = -1,
preNid = -1;
var href = window.location.href.split('?');
if (href.length > 1) {
var params = href[1].split('&');
for (var i = 0; i < params.length; i++) {
var p2 = params[i].split('=');
if (p2[0].toLocaleLowerCase() == "fid" && p2.length > 1) {
var idInfo = p2[1].split(':');
if (idInfo.length > 2) {
curId = parseInt(idInfo[1]);
if (idInfo[0].indexOf('t') > -1) {
nId = parseInt(idInfo[0].substring(1));
if (!isNaN(curId) && curId > -1) {
//类别列表标签id
$("#complexnav_typeLi_t100_" + curId).addClass('hove');
}
} else if (idInfo[0].indexOf('n') > -1) {
nId = parseInt(idInfo[1]);
preNid = parseInt(idInfo[2]);
}
if (!isNaN(nId) && nId > -1) {
//栏目列表id标签
$("#complex_navli" + nId).addClass('hove');
}
if (!isNaN(preNid) && preNid > -1 && nId != preNid) {
$("#complex_navli" + preNid).addClass('hove');
}
}
}
}
}
$("#complex_nav_ulid li").bind('mouseover', function() {
var i = $(this).attr('id').replace('complex_navli', '');
$("#complex_nav_ulid li").removeClass('mouseOverStyle');
$(this).addClass('mouseOverStyle');
if ($("#complexnav_subcon_" + i).css('display') == 'none') {
$(".complexnav_subcon").fadeOut(200);
$("#complexnav_subcon_" + i).slideDown(300);
}
})
$("#complex_nav").bind('mouseleave', function() {
$(".complexnav_subcon").css('display', 'none')
// $("#complex_nav_ulid li").removeClass('hove');
})
$(".complex_nav_wrap").hover(function() {}, function() {
$("#complex_nav_ulid li").removeClass('mouseOverStyle');
});
});
$(".solution_vmenu2").find("li").each(function() {
$(this).hover(function() {
var index = $(this).index();
$(".solution_vmenu").children('ul').children('li').eq(index).show().siblings()
.hide();
})
})
$(".pro_vmenu2").find("li").each(function() {
$(this).hover(function() {
var index = $(this).index();
$(".pro_vmenu").children('ul').children('li').eq(index).show().siblings()
.hide();
})
})
}
});
var JL4 = $("#complex_navli4").position().left;
var WD4 = $("#complex_navli4").width();
$("#complexnav_subcon_4").css({
"left": JL4 - (WD4 / 1.5)
});
var JL15 = $("#complex_navli15").position().left;
var WD15 = $("#complexnav_subcon_15").width();
$("#complexnav_subcon_15").css({
"left": JL15 - (WD15 / 4)
});
var JL1 = $("#complex_navli1").position().left;
var WD1 = $("#complexnav_subcon_1").width();
$("#complexnav_subcon_1").css({
"left": JL1 - (WD1 / 4)
});
var JL34 = $("#complex_navli34").position().left;
var WD34 = $("#complexnav_subcon_34").width();
$("#complexnav_subcon_34").css({
"left": JL34 - (WD34 / 4)
});
$(window).resize(function() {
var JL4 = $("#complex_navli4").position().left;
var WD4 = $("#complex_navli4").width();
$("#complexnav_subcon_4").css({
"left": JL4 - (WD4 / 1.5)
});
var JL15 = $("#complex_navli15").position().left;
var WD15 = $("#complexnav_subcon_15").width();
$("#complexnav_subcon_15").css({
"left": JL15 - (WD15 / 4)
});
var JL1 = $("#complex_navli1").position().left;
var WD1 = $("#complexnav_subcon_1").width();
$("#complexnav_subcon_1").css({
"left": JL1 - (WD1 / 4)
});
})
/*end_top*/
/*ea_h*/
/*ea_ba*/
/*ea_ba*/
/*ea_c*/
/*n_main*/
$(function(){
if($(window).width()>768){
$(".n_content_left").css('height','auto');
var bannerH = $("#ea_ba").height()+$(".n_content_left_cnt").height()
$(window).scroll(function(){
if ($(window).scrollTop()>bannerH){
$(".top").css("position","absolute");
$("#n_content_left_cnt").css({'position':'fixed','width':'100%','top':'0','left':'0','z-index':'999','background':'#fff'});
}else{
$(".top").css("position","fixed");
$("#n_content_left_cnt").css({'position':'relative','width':'100%','top':'0','left':'0','z-index':'2'});
}
});
}else{
$(".n_content_left").css('height','auto');
var bannerH = $("#ea_ba").height();
$(window).scroll(function(){
if ($(window).scrollTop()>bannerH){
$(".top").css("position","absolute");
$("#n_content_left_cnt").css({'position':'fixed','width':'100%','top':'0','left':'0','z-index':'999','background':'#fff'});
}else{
$(".top").css("position","fixed");
$("#n_content_left_cnt").css({'position':'relative','width':'100%','top':'0','left':'0','z-index':'2'});
}
});
}
});
/*xn_c_67_wrap*/
$(function(){
var wrap_len = $("#xn_c_67_wrap").length;
if(wrap_len>0){
var autoque = false; //是否自动滚动
var speed = 500; //滚动速度
var cli = $(".xn_c_67_inner li");
var cul = $(".xn_c_67_inner ul");
var cli_w = cli.outerWidth(true);
var count = cli.length;
var cur = 0; //当前屏
cul.css("width",count*cli_w);
var datetime;
//自动滚动属性
$('.xn_c_67_inner').hover(function(){
clearInterval(datetime);
},function(){
if(autoque){
datetime = setInterval(function(){
cul.find("li:first").stop().animate({"margin-left":-cli_w},speed,function(){
$(this).css("margin-left","0").appendTo(cul);
});
},3000);
}
}).trigger('mouseleave');
//左切换
$("#xn_c_67_prev").bind("click",function(){
cul.find("li:last").prependTo(cul);
cul.find("li:first").css("margin-left",-cli_w).stop().animate({"margin-left":"0"},speed);
});
//右切换
$("#xn_c_67_next").bind("click",function(){
cul.find("li:first").stop().animate({"margin-left":-cli_w},speed,function(){
$(this).css("margin-left","0").appendTo(cul);
});
});
}
});
/*xn_c_77_wrap*/
$(function(){
var wrap_len = $("#xn_c_77_wrap").length;
if(wrap_len>0){
var autoque = false; //是否自动滚动
var speed = 500; //滚动速度
var cli = $(".xn_c_77_inner li");
var cul = $(".xn_c_77_inner ul");
var cli_w = cli.outerWidth(true);
var count = cli.length;
var cur = 0; //当前屏
cul.css("width",count*cli_w);
var datetime;
//自动滚动属性
$('.xn_c_77_inner').hover(function(){
clearInterval(datetime);
},function(){
if(autoque){
datetime = setInterval(function(){
cul.find("li:first").stop().animate({"margin-left":-cli_w},speed,function(){
$(this).css("margin-left","0").appendTo(cul);
});
},3000);
}
}).trigger('mouseleave');
//左切换
$("#xn_c_77_prev").bind("click",function(){
cul.find("li:last").prependTo(cul);
cul.find("li:first").css("margin-left",-cli_w).stop().animate({"margin-left":"0"},speed);
});
//右切换
$("#xn_c_77_next").bind("click",function(){
cul.find("li:first").stop().animate({"margin-left":-cli_w},speed,function(){
$(this).css("margin-left","0").appendTo(cul);
});
});
}
});
$(function(){
$(".xn_c_case_24_xhbox").each(function(){
/* if ($(this).find(".xn_c_case_24_videow").height()>0) {*/
if ($(this).find("iframe").length>0) {
$(this).find('.xn_c_case_24_video').show();
var videosrc = $(this).find("iframe").attr("src");
var html = '';
html +=''
$(this).find(".xn_c_case_24_videow").html(html);
} else {
$(this).find('.xn_c_case_24_video').hide();
}
})
/*视频控件修改
$(".xn_c_case_24_xhbox").each(function(){
for(var i=0;i<$(".xn_c_case_24_videow iframe").length;i++){
var videosrc = $(".xn_c_case_24_videow iframe").eq(i).attr("src");
var html = '';
html +=''
$(".xn_c_case_24_videow").eq(i).html(html)
}
});
/*视频控件修改*/
$(".xn_c_case_24_xhbox").each(function(){
$(this).find(".xn_c_case_24_video").click(function(){
$(".top").css('z-index','10');
$(".n_video_m_tc").show();
$(this).parent().parent().addClass("active").siblings().removeClass("active");
$(this).parent().parent().parent().children().clone().appendTo($(".n_video_m_tc_cont"));
})
/*$(this).find(".nvideo_lb_xq").click(function(){
$(".top").css('z-index','10');
$(".n_video_m_tc").show();
$(this).parent().parent().addClass("active").siblings().removeClass("active");
$(this).parent().parent().parent().children().clone().appendTo($(".n_video_m_tc_cont"));
})*/
})
$(".n_video_m_tc_colse").click(function (){
$(".top").css('z-index','100');
$(this).siblings(".n_video_m_tc_cont").find("video").trigger('pause');
$(".n_video_m_tc").hide();
$(this).siblings().children().remove();
});
$(".n_video_m_tc_left").click(function(){
$(this).siblings(".n_video_m_tc_cont").find(".active").prev().addClass("active").siblings().removeClass("active");
$(this).siblings(".n_video_m_tc_cont").find("video").trigger('pause');
})
$(".n_video_m_tc_right").click(function(){
$(this).siblings(".n_video_m_tc_cont").find(".active").next().addClass("active").siblings().removeClass("active");
$(this).siblings(".n_video_m_tc_cont").find("video").trigger('pause');
})
});
$(function(){
if ($(window).width()<768) {
$(".n_content_left_cnt").children('ul').children('ul').children('li').each(function(){
var sum = 0;
var sum = sum+$(this).outerWidth(true);
$(".n_content_left_cnt").children("ul").width((sum*$(".n_content_left_cnt").children('ul').children('ul').children('li').length)+20);
})
}
})
/*end_n_main*/
/*ea_c*/
/*ea_b*/
/*foot*/
$(function(){
$(window).scroll(function(){
if ($(window).scrollTop()>200){
$(".foot_topblock").css("opacity","0.8");
}else{
$(".foot_topblock").css("opacity","0");
}
});
$(".foot_topblock").click(function(){
$("html,body").animate({"scrollTop":0});
});
if ($(window).width()<768) {
$(".foot_nav").children('ul').children('li').each(function(){
if ($(this).children('ul').length>0) {
//$(this).children('a').removeAttr("href");
$(this).append("");
} else {
}
$(this).children("em").click(function(){
$(this).toggleClass('active').parent().siblings().children('em').removeClass('active');
$(this).prev().toggleClass('active').parent().siblings().children('ul').removeClass('active');
})
})
}
})
/*end_foot*/
/*ea_b*/
/*ea_bg*/
/*ea_bg*/
/*ea_m*/
/*ea_m*/
/*ea_pi*/
/*ea_pi*/
/*ea_wj*/
/*ea_wj*/