...
|
...
|
@@ -1095,269 +1095,281 @@ define('yohood', function(require, exports) { |
|
|
|
|
|
//媒体登记
|
|
|
if ($('#media-form').length > 0) {
|
|
|
var mediaForm = $('#media-form').validate({
|
|
|
focusInvalid: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
profession:{
|
|
|
required:true
|
|
|
},
|
|
|
sex:{
|
|
|
required:true
|
|
|
},
|
|
|
company:{
|
|
|
required:true
|
|
|
},
|
|
|
introduction: {
|
|
|
required: true,
|
|
|
maxlength: 200
|
|
|
},
|
|
|
mobile: {
|
|
|
required:true,
|
|
|
isMobile:true
|
|
|
},
|
|
|
telphone:{
|
|
|
required: true,
|
|
|
isPhone:true
|
|
|
},
|
|
|
place: {
|
|
|
required: true
|
|
|
},
|
|
|
city:{
|
|
|
required: true
|
|
|
},
|
|
|
email:{
|
|
|
required: true,
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
required:true,
|
|
|
url:true
|
|
|
},
|
|
|
zipcode:{
|
|
|
required:true
|
|
|
}
|
|
|
},
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
profession:{
|
|
|
required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
sex:{
|
|
|
required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
company:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
introduction: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
maxlength: '最多输入200个字符'
|
|
|
},
|
|
|
mobile: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isMobile: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid mobile': '手机号码不正确'
|
|
|
},
|
|
|
telphone:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系电话不正确'
|
|
|
},
|
|
|
place: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
city:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
email: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确'
|
|
|
},
|
|
|
code:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
|
|
|
minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
|
|
|
maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
|
|
|
|
|
|
$('.submit-w-btn').bind('click', function(){
|
|
|
|
|
|
var mediaForm = $('#media-form').validate({
|
|
|
focusInvalid: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
profession:{
|
|
|
required:true
|
|
|
},
|
|
|
sex:{
|
|
|
required:true
|
|
|
},
|
|
|
company:{
|
|
|
required:true
|
|
|
},
|
|
|
introduction: {
|
|
|
required: true,
|
|
|
maxlength: 200
|
|
|
},
|
|
|
mobile: {
|
|
|
required:true,
|
|
|
isMobile:true
|
|
|
},
|
|
|
telphone:{
|
|
|
required: true,
|
|
|
isPhone:true
|
|
|
},
|
|
|
place: {
|
|
|
required: true
|
|
|
},
|
|
|
city:{
|
|
|
required: true
|
|
|
},
|
|
|
email:{
|
|
|
required: true,
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
required:true,
|
|
|
url:true
|
|
|
},
|
|
|
zipcode:{
|
|
|
required:true
|
|
|
}
|
|
|
},
|
|
|
website:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
profession:{
|
|
|
required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
sex:{
|
|
|
required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
company:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
introduction: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
maxlength: '最多输入200个字符'
|
|
|
},
|
|
|
mobile: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isMobile: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid mobile': '手机号码不正确'
|
|
|
},
|
|
|
telphone:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系电话不正确'
|
|
|
},
|
|
|
place: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
city:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
email: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确'
|
|
|
},
|
|
|
code:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
|
|
|
minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
|
|
|
maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
|
|
|
},
|
|
|
website:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
|
|
|
},
|
|
|
zipcode:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
}
|
|
|
},
|
|
|
zipcode:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
}
|
|
|
},
|
|
|
submitHandler: function(form){
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
profession:data.profession,
|
|
|
sex:data.sex,
|
|
|
company: data.company,
|
|
|
introduction:data.introduction,
|
|
|
city:data.city,
|
|
|
contact: data.contact,
|
|
|
telphone: data.telphone,
|
|
|
mobile:data.mobile,
|
|
|
email: data.email,
|
|
|
relation: data.relation,
|
|
|
place: data.place,
|
|
|
is_3c: data.is_3c,
|
|
|
website: data.website,
|
|
|
files: data.files,
|
|
|
code: data.code,
|
|
|
zipcode:data.zipcode,
|
|
|
type: data.type
|
|
|
},
|
|
|
success: function (d) {
|
|
|
if (d.code === 200) {
|
|
|
$('.dialog-w').fadeIn();
|
|
|
|
|
|
setTimeout(function () {
|
|
|
$('.dialog-w').fadeOut();
|
|
|
window.location.reload();
|
|
|
}, 2000);
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
submitHandler: function(form){
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
profession:data.profession,
|
|
|
sex:data.sex,
|
|
|
company: data.company,
|
|
|
introduction:data.introduction,
|
|
|
city:data.city,
|
|
|
contact: data.contact,
|
|
|
telphone: data.telphone,
|
|
|
mobile:data.mobile,
|
|
|
email: data.email,
|
|
|
relation: data.relation,
|
|
|
place: data.place,
|
|
|
is_3c: data.is_3c,
|
|
|
website: data.website,
|
|
|
files: data.files,
|
|
|
code: data.code,
|
|
|
zipcode:data.zipcode,
|
|
|
type: data.type
|
|
|
},
|
|
|
success: function (d) {
|
|
|
if (d.code === 200) {
|
|
|
$('.dialog-w').fadeIn();
|
|
|
|
|
|
setTimeout(function () {
|
|
|
$('.dialog-w').fadeOut();
|
|
|
window.location.reload();
|
|
|
}, 2000);
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
//赞助商
|
|
|
if ($('#sponsor-form').length > 0) {
|
|
|
var sponsorForm = $('#sponsor-form').validate({
|
|
|
focusInvalid: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
is_enter_yohobuy:{
|
|
|
required: true
|
|
|
},
|
|
|
product_type: {
|
|
|
required: true
|
|
|
},
|
|
|
telphone: {
|
|
|
required: true,
|
|
|
isPhone:true
|
|
|
},
|
|
|
email:{
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
url:true
|
|
|
}
|
|
|
},
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
is_enter_yohobuy:{
|
|
|
required: '必选'
|
|
|
},
|
|
|
product_type: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
telphone: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系号码不正确'
|
|
|
|
|
|
$('.submit-w-btn').bind('click', function()
|
|
|
{
|
|
|
var sponsorForm = $('#sponsor-form').validate({
|
|
|
focusInvalid: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
is_enter_yohobuy:{
|
|
|
required: true
|
|
|
},
|
|
|
product_type: {
|
|
|
required: true
|
|
|
},
|
|
|
telphone: {
|
|
|
required: true,
|
|
|
isPhone:true
|
|
|
},
|
|
|
email:{
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
url:true
|
|
|
}
|
|
|
},
|
|
|
email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确',
|
|
|
code:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
|
|
|
minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
|
|
|
maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
is_enter_yohobuy:{
|
|
|
required: '必选'
|
|
|
},
|
|
|
product_type: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
|
|
|
},
|
|
|
telphone: {
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
|
|
|
isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系号码不正确'
|
|
|
},
|
|
|
email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确',
|
|
|
code:{
|
|
|
required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
|
|
|
minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
|
|
|
maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
|
|
|
},
|
|
|
website:{
|
|
|
url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
|
|
|
}
|
|
|
},
|
|
|
website:{
|
|
|
url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
|
|
|
}
|
|
|
},
|
|
|
submitHandler: function(form){
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
is_enter_yohobuy:data.is_enter_yohobuy,
|
|
|
product_type:data.product_type,
|
|
|
company: data.company,
|
|
|
country:data.country,
|
|
|
contact: data.contact,
|
|
|
telphone: data.telphone,
|
|
|
email: data.email,
|
|
|
place: data.place,
|
|
|
website: data.website,
|
|
|
files: data.files,
|
|
|
code: data.code,
|
|
|
type: data.type
|
|
|
},
|
|
|
success: function (d) {
|
|
|
if (d.code === 200) {
|
|
|
$('.dialog-w').fadeIn();
|
|
|
|
|
|
setTimeout(function () {
|
|
|
$('.dialog-w').fadeOut();
|
|
|
window.location.reload();
|
|
|
}, 2000);
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
submitHandler: function(form){
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
is_enter_yohobuy:data.is_enter_yohobuy,
|
|
|
product_type:data.product_type,
|
|
|
company: data.company,
|
|
|
country:data.country,
|
|
|
contact: data.contact,
|
|
|
telphone: data.telphone,
|
|
|
email: data.email,
|
|
|
place: data.place,
|
|
|
website: data.website,
|
|
|
files: data.files,
|
|
|
code: data.code,
|
|
|
type: data.type
|
|
|
},
|
|
|
success: function (d) {
|
|
|
if (d.code === 200) {
|
|
|
$('.dialog-w').fadeIn();
|
|
|
|
|
|
setTimeout(function () {
|
|
|
$('.dialog-w').fadeOut();
|
|
|
window.location.reload();
|
|
|
}, 2000);
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
$('#sponsor-form').find('input').keyup(function () {
|
|
|
|
|
|
console.log(sponsorForm.form());
|
|
|
// console.log(sponsorForm.form());
|
|
|
|
|
|
if(sponsorForm.form()) {
|
|
|
// if(sponsorForm.form()) {
|
|
|
|
|
|
vCode(function (data) {
|
|
|
if (data.code == 200) {
|
|
|
$('.submit-w-btn').removeAttr('disabled').removeClass('dis');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// }
|
|
|
});
|
|
|
|
|
|
$('#media-form').find('input').keyup(function () {
|
|
|
|
|
|
if(mediaForm.form()) {
|
|
|
//if(mediaForm.form()) {
|
|
|
|
|
|
vCode(function (data) {
|
|
|
if (data.code == 200) {
|
...
|
...
|
@@ -1365,20 +1377,19 @@ define('yohood', function(require, exports) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
// }
|
|
|
});
|
|
|
|
|
|
$('#exhibitor-form').find('input').keyup(function () {
|
|
|
|
|
|
if(true){//exhibitorForm.form()) {
|
|
|
|
|
|
// if(true){//exhibitorForm.form()) {
|
|
|
vCode(function (data) {
|
|
|
if (data.code == 200) {
|
|
|
$('.submit-w-btn').removeAttr('disabled').removeClass('dis');
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
// }
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|