/*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*/
if (document.documentElement.clientWidth < 768) {
if($(".swiper-slide").find("img.hidden-lg").height() != '0'){
$(".ban_video_box video").height($(".swiper-slide").find("img.hidden-lg").height());
}
else
$(".ban_video_box video").css("min-height", "400px");
/*$(".ban_video_box video").css("min-height", "400px");
var img = $(".swiper-slide").find("img.hidden-lg");
$(".ban_video_box video").height(img.height());
/*
img.on("load", function(){
$(".ban_video_box video").height(img.height());
});
if (img.height() > 0) {
$(".ban_video_box video").height(img.height());
}*/
}
/*banner*/
$(function() {
$(".banner_videow").click(function() {
$(".banner_video").show();
})
$(".banner_video_close").click(function() {
$(".banner_video").hide();
})
});
/*end_banner*/
/*ea_ba*/
/*ea_c*/
/*index_cnt*/
/*xn_c_index_176_wrap*/
$(function() {
$("#xn_c_index_275_tUl").children("li").first().addClass("active");
$("#xn_c_index_275_cUl").children("div").first().addClass("active");
$("#xn_c_index_275_tUl").children("li").each(function() {
$(this).click(function() {
$(this).addClass("active").siblings().removeClass("active");
var index = $(this).index();
$("#xn_c_index_275_cUl").children("div").eq(index).addClass("active").siblings()
.removeClass("active");
})
})
$("#xn_c_index_275_tUl2").children("li").first().addClass("active");
$("#xn_c_index_275_cUl").children("div").first().addClass("active");
$("#xn_c_index_275_tUl2").children("li").each(function() {
$(this).click(function() {
$(this).addClass("active").siblings().removeClass("active");
var index = $(this).index();
$("#xn_c_index_275_cUl").children("div").eq(index).addClass("active").siblings()
.removeClass("active");
})
})
});
$(function() {
if($(window).width()>768){
$(".xn_c_index_176_wbox_two").children("div").each(function() {
$(this).find(".xn_c_index_176_head_right_img").click(function() {
$(this).hide().parent().parent().parent().siblings().find(
".xn_c_index_176_head_right_img").show();
})
})
}else{
$(".xn_c_index_176_wbox_two").children("div").each(function(){
$(this).find("video").attr("preload","none").remove();
$("#ea_c video").remove();
$(".xn_c_index_275_wrap").remove();
})
}
})
$(function() {
$(".xn_c_index_275_items").each(function() {
$(this).find(".xn_c_index_275_cImg em").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');
})
});
/*xn_c_index_176_wrap*/
$(function() {
$(".xn_c_index_176_wbox_one").children("li").first().addClass("active");
$(".xn_c_index_176_wbox_one").children("li").each(function() {
$(this).hover(function() {
$(this).addClass("active").siblings().removeClass("active");
var index = $(this).index();
$(".xn_c_index_176_wbox_two").children("div").eq(index).show().siblings().hide();
//增加
$(".xn_c_index_176_wbox_two").children("div").eq(index).siblings().each(function() {
$(this).find(".xn_c_index_176_head_right_img").show();
})
})
})
});
$(function() {
$(".xn_c_index_277_tUl").children("li").first().addClass("xn_c_index_277_tCurr");
$("#xn_c_index_277_cUl").children("li").first().addClass("active");
$("#xn_c_index_277_cUl").children("li").first().children("div").addClass("active");
$(".xn_c_index_277_tUl").children("li").each(function() {
$(this).click(function() {
$(this).addClass("xn_c_index_277_tCurr").siblings().removeClass(
"xn_c_index_277_tCurr");
var index = $(this).index();
$("#xn_c_index_277_cUl").children("li").eq(index).addClass("active").siblings()
.removeClass("active");
$("#xn_c_index_277_cUl").children("li").eq(index).children("div").addClass("active")
.parent().siblings().children("div").removeClass("active");
})
})
});
/*xn_c_index_277_wrap*/
/*$(function(){
if($("#xn_c_index_277_wrap").length > 0){
var $tUl = $("#xn_c_index_277_tUl");
var $tLi = $tUl.children("li");
var $cUl = $("#xn_c_index_277_cUl");
var $cLi = $cUl.children("li");
var $cWrap = $("#xn_c_index_277_cWrap");
var $cMain = $(".xn_c_index_277_cMain");
var currClass = "xn_c_index_277_tCurr";
var $left = $("#xn_c_index_277_left");
var $right = $("#xn_c_index_277_right");
var $wrap = $("#xn_c_index_277_wrap");
var speed = 500;
var isAutoPlay = false;
var timeInterval = 3000;
$tLi.first().addClass(currClass);
$cLi.each(function(){
var _this = $(this);
_this.attr("index",_this.index());
});
$cLi.css("width",$cWrap.outerWidth(true));
$cUl.css("width",$cLi.outerWidth(true) * $cLi.length).css("position","relative");
var idx = 1;
var size = $cLi.size();
//点击类别切换:
$tLi.first().addClass(currClass);
$("#xn_c_index_277_cImg img").load(function(){
$cUl.css("height",$cLi.eq(0).outerHeight(true));
});
$tLi.click(function(){
var _this = $(this);
idx = _this.index()+1;
$cUl.stop().animate({"left":"-"+$cLi.outerWidth(true) * _this.index()},speed);
_this.addClass(currClass).siblings().removeClass(currClass);
});
$cMain.each(function(){
$(this).css("width",$(this).children("li").length * ($(this).children("li").outerWidth(true)+10));
});
//选项卡左右切换:
function nextDiv(){
if(idx < $cLi.length){
$cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*idx},speed);
$tLi.eq(idx).addClass(currClass).siblings().removeClass(currClass);
idx++;
}else{
$cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1) - 100 +"px"},speed/$cLi.length);
$cUl.animate({"left":"-"+$cLi.outerWidth(true)*($cLi.length-1)},speed/$cLi.length);
}
}
function prevDiv(){
if(idx > 1){
idx--;
$cUl.stop().animate({"left":"-"+$cLi.outerWidth(true)*(idx-1)});
$tLi.eq(idx-1).addClass(currClass).siblings().removeClass(currClass);
}else{
$cUl.stop().animate({"left":100+"px"},speed/$cLi.length);
$cUl.animate({"left":0},speed/$cLi.length);
}
}
//点击箭头左右切换:
$left.click(function(){
nextImg();
});
$right.click(function(){
prevImg();
});
function prevImg(){
var _index = $(".xn_c_index_277_tCurr").index();
var $items = $(".xn_c_index_277_cLi").eq(_index).children("ul");
var $items_child_width = $items.children("li").outerWidth(true);
$items.css("position","relative");
$items.css('left',-$items_child_width);
$items.prepend($items.children().last());
$items.stop().animate({"left":0},speed);
}
function nextImg(){
var _index = $(".xn_c_index_277_tCurr").index();
var $items = $(".xn_c_index_277_cLi").eq(_index).children("ul");
var $items_child_width = $items.children("li").outerWidth(true);
$items.css("position","relative");
$items.stop().animate({left:"-"+$items_child_width +"px"},speed,function(){
$items.append($items.children().first());
$items.css("left",0);
});
}
var autoPlay = null;
if(isAutoPlay == true){
autoPlay = setInterval(nextImg,timeInterval);
$wrap.hover(function(){
clearInterval(autoPlay);
},function(){
autoPlay = setInterval(nextImg,timeInterval);
});
}
}
});*/
/*xn_c_98_wrap*/
$(function() {
try {
if ($("#EIMS_C_40032_3_Main").length > 0) {
EIMS_C_40032_3.Init();
}
} catch (err) {}
});
//追加
$(function() {
$(".EIMS_C_40032_3_text input").focus(function() {
var _this = $(this).parent().siblings().find("label");
_this.hide();
});
$(".EIMS_C_40032_3_text input").blur(function() {
var _this_val = $(this).val();
if (_this_val == "") {
var _this = $(this).parent().siblings().find("label");
_this.show();
}
});
$(".EIMS_C_40032_3_date input").focus(function() {
var _this = $(this).siblings("label");
_this.hide();
});
$(".EIMS_C_40032_3_date input").blur(function() {
var _this_val = $(this).val();
if (_this_val == "") {
var _this = $(this).siblings("label");
_this.show();
}
});
$(".EIMS_C_40032_3_textarea textarea").focus(function() {
var _this = $(this).parent().siblings().find("label");
_this.hide();
});
$(".EIMS_C_40032_3_textarea textarea").blur(function() {
var _this_val = $(this).val();
if (_this_val == "") {
var _this = $(this).parent().siblings().find("label");
_this.show();
}
});
});
var EIMS_C_40032_3 = {
Config: {
IsRelateMember: false, //是否关联会员
RelateMemberField: "", //关联会员字段
IsSendMail: true, //是否发送邮箱
IsLoginRequired: false, //是否需要登录才能留言
TypeId: 4, //留言类别ID
SuccessUrl: "" //跳转页面
},
Init: function() {
$("#EIMS_C_40032_3_Submit").on("click", function() {
$(this).prop("disabled", true);
EIMS_C_40032_3.SubmitAdvisorys();
});
},
Verify: function() {
if ($("#EIMS_C_40032_3_AuthorName").val().length == 0) {
alert("姓名不能为空");
return false;
}
var isMobile = /^1[3-9]{1}\d{9}$/;
var isNumber = /^[0-9]*$/; //11位数
var isNum = /^[0-9]*[1-9][0-9]*$/; //自然数
var isLetter = /[^0-9.]/g;
var msgMobile = $("#EIMS_C_40032_3_Mobile"); //用户手机号
if (msgMobile.val() == "您的电话(必填)" || msgMobile.val() == "") {
alert("请输入联系人手机!");
return false;
}
if (isLetter.test(msgMobile.val())) {
alert("请输入正确的手机号码!");
return false;
}
if (isNum.test(msgMobile.val())) {
if (!isNumber.test(msgMobile.val())) {
alert("请输入正确的手机号码!");
return false;
}
// if (!isMobile.test(msgMobile.val())) {
// alert("手机号码格式不正确,请重新输入!");
// return false;
// }
}
/*if ($("#EIMS_C_40032_3_Email").val().length == 0) {
alert("请输入您的邮箱");
return false;
}
var cid = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
if (!cid.test($("#EIMS_C_40032_3_Email").val())) {
alert("邮箱格式不正确");
return false;
}*/
/*if ($(".xn_c_98_Marriage").val() == "购房国家" || $(".xn_c_98_Marriage").val() == "") {
alert("请选择国家");
return false;
}
if ($(".xn_c_98_Cenre").val() == "物业类型" || $(".xn_c_98_Cenre").val() == "") {
alert("请选择物业类型");
return false;
}
if ($(".xn_c_98_Budget").val() == "期望房价" || $(".xn_c_98_Budget").val() == "") {
alert("请选择期望房价");
return false;
}*/
return true;
},
SubmitAdvisorys: function() {
if (!EIMS_C_40032_3.Verify()) {
$("#EIMS_C_40032_3_Submit").prop("disabled", false);
return false;
}
var content = "";
$("#EIMS_C_40032_3_Main > div").each(function() {
var field = $(this).attr("data-field");
var label = $(this).find("label:first").text();
var value = "";
switch (this.className) {
case "EIMS_C_40032_3_text":
value = $(this).find("input").val();
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
case "EIMS_C_40032_3_radio":
value = $(this).find("input:checked").val();
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
case "EIMS_C_40032_3_checkbox":
$(this).find("input:checked").each(function() {
value += "," + $(this).val();
});
value = value.substr(1);
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
case "EIMS_C_40032_3_select":
value = $(this).find("select").val();
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
case "EIMS_C_40032_3_date":
value = $(this).find("input").val();
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
case "EIMS_C_40032_3_textarea":
value = $(this).find("textarea").val();
content += "<" + field + " label=\"" + label + "\">" + value + "" + field + ">";
break;
default:
break;
}
});
content += "";
var typeid = EIMS_C_40032_3.Config.TypeId;
if ($(".EIMS_C_40032_3_typeid").length > 0 && $("#EIMS_C_40032_3_Type").val() > 0) {
typeid = $(".EIMS_C_40032_3_typeid").val();
}
params = {
"Content": encodeURIComponent(content),
"NavigateId": EIMS_C_40032_3.Config.NavigateId,
"TypeId": typeid,
"IsRelateMember": EIMS_C_40032_3.Config.IsRelateMember,
"RelateMemberField": EIMS_C_40032_3.Config.RelateMemberField,
"IsSendMail": EIMS_C_40032_3.Config.IsSendMail,
"IsLoginRequired": EIMS_C_40032_3.Config.IsLoginRequired
};
AjaxMethod("Common", "SubmitAdvisorys", params, function(data) {
if (IsNullOrEmpty(data)) {
$("#EIMS_C_40032_3_Submit").prop("disabled", false);
return;
}
if (data.result != 1) {
$("#EIMS_C_40032_3_Submit").prop("disabled", false);
alert(data.msg);
return;
}
alert("感谢您对于44118太阳成城集团的关注,我们会尽快和您联系,请耐心等待,谢谢!");
window._agl && window._agl.push(['track', ['success', {t: 3}]]);
var url = EIMS_C_40032_3.Config.SuccessUrl;
setTimeout(function(){
if (IsNullOrEmpty(url)) {
document.location.reload();
} else {
document.location.href = MergeUrlParas(url, true, [], []);
}
},100);
});
} //提交留言end
}
/*xn_c_index_43_wrap*/
$(function() {
if ($(window).width() < 768) {
$(".xn_c_index_43_nrbox").children("div:gt(5)").hide();
$(".xn_c_index_43_prdmore2").click(function() {
$(this).hide();
$(".xn_c_index_43_nrbox").children("div").show();
})
}
})
/*end_index_cnt*/
$('video').bind('contextmenu', function() {
return false;
});
/*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*/