...
|
...
|
@@ -807,28 +807,55 @@ define('yohood', function(require, exports) { |
|
|
|
|
|
function getFormData (callback) {
|
|
|
|
|
|
var $formBox = $('#exhibitor-form'),
|
|
|
name = $formBox.find('input[name="name"]').val(),
|
|
|
var $formBox;
|
|
|
if($('#exhibitor-form').length> 0)
|
|
|
{
|
|
|
$formBox = $('#exhibitor-form');
|
|
|
}
|
|
|
else if($('#media-form').length> 0)
|
|
|
{
|
|
|
$formBox = $('#media-form');
|
|
|
}
|
|
|
else if($('#sponsor-form').length> 0)
|
|
|
{
|
|
|
$formBox = $('#sponsor-form');
|
|
|
}
|
|
|
var name = $formBox.find('input[name="name"]').val(),
|
|
|
is_enter_yohobuy = $formBox.find('input[name="is_enter_yohobuy"]:checked').val(),
|
|
|
brand_reg_type = $formBox.find('input[name="brand_reg_type"]:checked').val(),
|
|
|
profession = $formBox.find('input[name="profession"]').val(),
|
|
|
product_type = $formBox.find('input[name="product_type"]').val(),
|
|
|
company = $formBox.find('input[name="company"]').val(),
|
|
|
country = $formBox.find('input[name="country"]').val(),
|
|
|
sex = $formBox.find('input[name="sex"]').val(),
|
|
|
city = $formBox.find('input[name="city"]').val(),
|
|
|
mobile = $formBox.find('input[name="mobile"]').val(),
|
|
|
contact = $formBox.find('input[name="contact"]').val(),
|
|
|
introduction = $formBox.find('input[name="introduction"]').val(),
|
|
|
telphone = $formBox.find('input[name="telphone"]').val(),
|
|
|
email = $formBox.find('input[name="email"]').val(),
|
|
|
relation = $formBox.find('input[name="relation"]:checked').val(),
|
|
|
place = $formBox.find('input[name="place"]').val(),
|
|
|
is_3c = $formBox.find('input[name="is_3c"]:checked').val(),
|
|
|
website = $formBox.find('input[name="website"]').val(),
|
|
|
zipcode = $formBox.find('input[name="zipcode"]').val(),
|
|
|
files = $formBox.find('input[name="files"]').val(),
|
|
|
code = $formBox.find('input[name="code"]').val(),
|
|
|
|
|
|
type = $formBox.find('input[name="type"]').val();
|
|
|
|
|
|
var resData = {
|
|
|
name: name,
|
|
|
is_enter_yohobuy: is_enter_yohobuy,
|
|
|
brand_reg_type: brand_reg_type,
|
|
|
company: company,
|
|
|
profession:profession,
|
|
|
company:company,
|
|
|
country:country,
|
|
|
sex:sex,
|
|
|
city:city,
|
|
|
mobile:mobile,
|
|
|
contact: contact,
|
|
|
introduction:introduction,
|
|
|
telphone: telphone,
|
|
|
email: email,
|
|
|
relation: relation,
|
...
|
...
|
@@ -836,12 +863,31 @@ define('yohood', function(require, exports) { |
|
|
is_3c: is_3c,
|
|
|
website: website,
|
|
|
files: files,
|
|
|
zipcode:zipcode,
|
|
|
code: code,
|
|
|
type: type
|
|
|
}
|
|
|
callback(resData);
|
|
|
}
|
|
|
|
|
|
function valiateCode(form)
|
|
|
{
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/validatecode',
|
|
|
data: {
|
|
|
code: $('.pic-code').val()
|
|
|
},
|
|
|
success: function (d) {
|
|
|
|
|
|
if (d.code === 200) {
|
|
|
//form.submit();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 表单验证
|
|
|
if ($('#exhibitor-form').length > 0) {
|
|
|
$('#exhibitor-form').validate({
|
...
|
...
|
@@ -896,20 +942,100 @@ define('yohood', function(require, exports) { |
|
|
}
|
|
|
},
|
|
|
submitHandler: function(form){
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/validatecode',
|
|
|
data: {
|
|
|
code: $('.pic-code').val()
|
|
|
},
|
|
|
success: function (d) {
|
|
|
|
|
|
if (d.code === 200) {
|
|
|
//form.submit();
|
|
|
valiateCode(form);
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
dataType: 'json',
|
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
profession:data.profession,
|
|
|
company: data.company,
|
|
|
contact: data.contact,
|
|
|
telphone: data.telphone,
|
|
|
email: data.email,
|
|
|
relation: data.relation,
|
|
|
place: data.place,
|
|
|
is_3c: data.is_3c,
|
|
|
website: data.website,
|
|
|
files: data.files,
|
|
|
code: data.code,
|
|
|
type: data.type
|
|
|
},
|
|
|
success: function (d) {
|
|
|
if (d.code === 200) {
|
|
|
$('.dialog-w').fadeIn();
|
|
|
window.location.reload();
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//媒体登记
|
|
|
if ($('#media-form').length > 0)
|
|
|
{
|
|
|
$('#media-form').validate({
|
|
|
focusInvalid: false,
|
|
|
onkeyup: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
introduction: {
|
|
|
required: true
|
|
|
},
|
|
|
mobile: {
|
|
|
required: true
|
|
|
},
|
|
|
place: {
|
|
|
required: true
|
|
|
},
|
|
|
email:{
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
url:true
|
|
|
}
|
|
|
},
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
introduction: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
mobile: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
place: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
email:'邮箱格式不正确',
|
|
|
code:{
|
|
|
required:"必须输入验证码",
|
|
|
minlength:"验证码长度4位",
|
|
|
maxlength:"验证码长度4位"
|
|
|
},
|
|
|
website:{
|
|
|
url:"必须是有效链接"
|
|
|
}
|
|
|
},
|
|
|
submitHandler: function(form){
|
|
|
valiateCode(form);
|
|
|
|
|
|
getFormData(function (data) {
|
|
|
$.ajax({
|
...
|
...
|
@@ -918,11 +1044,14 @@ define('yohood', function(require, exports) { |
|
|
url: '/onlinereg/setseller',
|
|
|
data: {
|
|
|
name: data.name,
|
|
|
is_enter_yohobuy: data.is_enter_yohobuy,
|
|
|
brand_reg_type: data.brand_reg_type,
|
|
|
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,
|
...
|
...
|
@@ -930,6 +1059,95 @@ define('yohood', function(require, exports) { |
|
|
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();
|
|
|
window.location.reload();
|
|
|
}
|
|
|
else {
|
|
|
alert("失败");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//赞助商
|
|
|
if ($('#sponsor-form').length > 0)
|
|
|
{
|
|
|
$('#sponsor-form').validate({
|
|
|
focusInvalid: false,
|
|
|
onkeyup: false,
|
|
|
rules: {
|
|
|
name: {
|
|
|
required: true
|
|
|
},
|
|
|
product_type: {
|
|
|
required: true
|
|
|
},
|
|
|
telphone: {
|
|
|
required: true
|
|
|
},
|
|
|
email:{
|
|
|
email:true
|
|
|
},
|
|
|
code:{
|
|
|
required:true,
|
|
|
minlength:4,
|
|
|
maxlength:4
|
|
|
},
|
|
|
website:{
|
|
|
url:true
|
|
|
}
|
|
|
},
|
|
|
messages: {
|
|
|
name: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
product_type: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
telphone: {
|
|
|
required: '必填'
|
|
|
},
|
|
|
email:'邮箱格式不正确',
|
|
|
code:{
|
|
|
required:"必须输入验证码",
|
|
|
minlength:"验证码长度4位",
|
|
|
maxlength:"验证码长度4位"
|
|
|
},
|
|
|
website:{
|
|
|
url:"必须是有效链接"
|
|
|
}
|
|
|
},
|
|
|
submitHandler: function(form){
|
|
|
valiateCode(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) {
|
...
|
...
|
@@ -947,5 +1165,10 @@ define('yohood', function(require, exports) { |
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|