Authored by whb

在线登记

@@ -1095,269 +1095,281 @@ define('yohood', function(require, exports) { @@ -1095,269 +1095,281 @@ define('yohood', function(require, exports) {
1095 1095
1096 //媒体登记 1096 //媒体登记
1097 if ($('#media-form').length > 0) { 1097 if ($('#media-form').length > 0) {
1098 - var mediaForm = $('#media-form').validate({  
1099 - focusInvalid: false,  
1100 - rules: {  
1101 - name: {  
1102 - required: true  
1103 - },  
1104 - profession:{  
1105 - required:true  
1106 - },  
1107 - sex:{  
1108 - required:true  
1109 - },  
1110 - company:{  
1111 - required:true  
1112 - },  
1113 - introduction: {  
1114 - required: true,  
1115 - maxlength: 200  
1116 - },  
1117 - mobile: {  
1118 - required:true,  
1119 - isMobile:true  
1120 - },  
1121 - telphone:{  
1122 - required: true,  
1123 - isPhone:true  
1124 - },  
1125 - place: {  
1126 - required: true  
1127 - },  
1128 - city:{  
1129 - required: true  
1130 - },  
1131 - email:{  
1132 - required: true,  
1133 - email:true  
1134 - },  
1135 - code:{  
1136 - required:true,  
1137 - minlength:4,  
1138 - maxlength:4  
1139 - },  
1140 - website:{  
1141 - required:true,  
1142 - url:true  
1143 - },  
1144 - zipcode:{  
1145 - required:true  
1146 - }  
1147 - },  
1148 - messages: {  
1149 - name: {  
1150 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1151 - },  
1152 - profession:{  
1153 - required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1154 - },  
1155 - sex:{  
1156 - required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1157 - },  
1158 - company:{  
1159 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1160 - },  
1161 - introduction: {  
1162 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1163 - maxlength: '最多输入200个字符'  
1164 - },  
1165 - mobile: {  
1166 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1167 - isMobile: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid mobile': '手机号码不正确'  
1168 - },  
1169 - telphone:{  
1170 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1171 - isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系电话不正确'  
1172 - },  
1173 - place: {  
1174 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1175 - },  
1176 - city:{  
1177 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1178 - },  
1179 - email: {  
1180 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1181 - email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确'  
1182 - },  
1183 - code:{  
1184 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",  
1185 - minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",  
1186 - maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位" 1098 +
  1099 + $('.submit-w-btn').bind('click', function(){
  1100 +
  1101 + var mediaForm = $('#media-form').validate({
  1102 + focusInvalid: false,
  1103 + rules: {
  1104 + name: {
  1105 + required: true
  1106 + },
  1107 + profession:{
  1108 + required:true
  1109 + },
  1110 + sex:{
  1111 + required:true
  1112 + },
  1113 + company:{
  1114 + required:true
  1115 + },
  1116 + introduction: {
  1117 + required: true,
  1118 + maxlength: 200
  1119 + },
  1120 + mobile: {
  1121 + required:true,
  1122 + isMobile:true
  1123 + },
  1124 + telphone:{
  1125 + required: true,
  1126 + isPhone:true
  1127 + },
  1128 + place: {
  1129 + required: true
  1130 + },
  1131 + city:{
  1132 + required: true
  1133 + },
  1134 + email:{
  1135 + required: true,
  1136 + email:true
  1137 + },
  1138 + code:{
  1139 + required:true,
  1140 + minlength:4,
  1141 + maxlength:4
  1142 + },
  1143 + website:{
  1144 + required:true,
  1145 + url:true
  1146 + },
  1147 + zipcode:{
  1148 + required:true
  1149 + }
1187 }, 1150 },
1188 - website:{  
1189 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1190 - url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接" 1151 + messages: {
  1152 + name: {
  1153 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1154 + },
  1155 + profession:{
  1156 + required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1157 + },
  1158 + sex:{
  1159 + required:$(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1160 + },
  1161 + company:{
  1162 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1163 + },
  1164 + introduction: {
  1165 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1166 + maxlength: '最多输入200个字符'
  1167 + },
  1168 + mobile: {
  1169 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1170 + isMobile: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid mobile': '手机号码不正确'
  1171 + },
  1172 + telphone:{
  1173 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1174 + isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系电话不正确'
  1175 + },
  1176 + place: {
  1177 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1178 + },
  1179 + city:{
  1180 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1181 + },
  1182 + email: {
  1183 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1184 + email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确'
  1185 + },
  1186 + code:{
  1187 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
  1188 + minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
  1189 + maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
  1190 + },
  1191 + website:{
  1192 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1193 + url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
  1194 + },
  1195 + zipcode:{
  1196 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1197 + }
1191 }, 1198 },
1192 - zipcode:{  
1193 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1194 - }  
1195 - },  
1196 - submitHandler: function(form){  
1197 -  
1198 - getFormData(function (data) {  
1199 - $.ajax({  
1200 - type: 'post',  
1201 - dataType: 'json',  
1202 - url: '/onlinereg/setseller',  
1203 - data: {  
1204 - name: data.name,  
1205 - profession:data.profession,  
1206 - sex:data.sex,  
1207 - company: data.company,  
1208 - introduction:data.introduction,  
1209 - city:data.city,  
1210 - contact: data.contact,  
1211 - telphone: data.telphone,  
1212 - mobile:data.mobile,  
1213 - email: data.email,  
1214 - relation: data.relation,  
1215 - place: data.place,  
1216 - is_3c: data.is_3c,  
1217 - website: data.website,  
1218 - files: data.files,  
1219 - code: data.code,  
1220 - zipcode:data.zipcode,  
1221 - type: data.type  
1222 - },  
1223 - success: function (d) {  
1224 - if (d.code === 200) {  
1225 - $('.dialog-w').fadeIn();  
1226 -  
1227 - setTimeout(function () {  
1228 - $('.dialog-w').fadeOut();  
1229 - window.location.reload();  
1230 - }, 2000);  
1231 - }  
1232 - else {  
1233 - alert("失败");  
1234 - }  
1235 - } 1199 + submitHandler: function(form){
  1200 +
  1201 + getFormData(function (data) {
  1202 + $.ajax({
  1203 + type: 'post',
  1204 + dataType: 'json',
  1205 + url: '/onlinereg/setseller',
  1206 + data: {
  1207 + name: data.name,
  1208 + profession:data.profession,
  1209 + sex:data.sex,
  1210 + company: data.company,
  1211 + introduction:data.introduction,
  1212 + city:data.city,
  1213 + contact: data.contact,
  1214 + telphone: data.telphone,
  1215 + mobile:data.mobile,
  1216 + email: data.email,
  1217 + relation: data.relation,
  1218 + place: data.place,
  1219 + is_3c: data.is_3c,
  1220 + website: data.website,
  1221 + files: data.files,
  1222 + code: data.code,
  1223 + zipcode:data.zipcode,
  1224 + type: data.type
  1225 + },
  1226 + success: function (d) {
  1227 + if (d.code === 200) {
  1228 + $('.dialog-w').fadeIn();
  1229 +
  1230 + setTimeout(function () {
  1231 + $('.dialog-w').fadeOut();
  1232 + window.location.reload();
  1233 + }, 2000);
  1234 + }
  1235 + else {
  1236 + alert("失败");
  1237 + }
  1238 + }
  1239 + });
  1240 +
1236 }); 1241 });
1237 -  
1238 - });  
1239 1242
1240 - return false;  
1241 - }  
1242 - }); 1243 + return false;
  1244 + }
  1245 + });
  1246 + }
  1247 +
1243 } 1248 }
1244 1249
1245 -  
1246 //赞助商 1250 //赞助商
1247 if ($('#sponsor-form').length > 0) { 1251 if ($('#sponsor-form').length > 0) {
1248 - var sponsorForm = $('#sponsor-form').validate({  
1249 - focusInvalid: false,  
1250 - rules: {  
1251 - name: {  
1252 - required: true  
1253 - },  
1254 - is_enter_yohobuy:{  
1255 - required: true  
1256 - },  
1257 - product_type: {  
1258 - required: true  
1259 - },  
1260 - telphone: {  
1261 - required: true,  
1262 - isPhone:true  
1263 - },  
1264 - email:{  
1265 - email:true  
1266 - },  
1267 - code:{  
1268 - required:true,  
1269 - minlength:4,  
1270 - maxlength:4  
1271 - },  
1272 - website:{  
1273 - url:true  
1274 - }  
1275 - },  
1276 - messages: {  
1277 - name: {  
1278 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1279 - },  
1280 - is_enter_yohobuy:{  
1281 - required: '必选'  
1282 - },  
1283 - product_type: {  
1284 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'  
1285 - },  
1286 - telphone: {  
1287 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',  
1288 - isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系号码不正确' 1252 +
  1253 + $('.submit-w-btn').bind('click', function()
  1254 + {
  1255 + var sponsorForm = $('#sponsor-form').validate({
  1256 + focusInvalid: false,
  1257 + rules: {
  1258 + name: {
  1259 + required: true
  1260 + },
  1261 + is_enter_yohobuy:{
  1262 + required: true
  1263 + },
  1264 + product_type: {
  1265 + required: true
  1266 + },
  1267 + telphone: {
  1268 + required: true,
  1269 + isPhone:true
  1270 + },
  1271 + email:{
  1272 + email:true
  1273 + },
  1274 + code:{
  1275 + required:true,
  1276 + minlength:4,
  1277 + maxlength:4
  1278 + },
  1279 + website:{
  1280 + url:true
  1281 + }
1289 }, 1282 },
1290 - email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确',  
1291 - code:{  
1292 - required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",  
1293 - minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",  
1294 - maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位" 1283 + messages: {
  1284 + name: {
  1285 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1286 + },
  1287 + is_enter_yohobuy:{
  1288 + required: '必选'
  1289 + },
  1290 + product_type: {
  1291 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填'
  1292 + },
  1293 + telphone: {
  1294 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'This is a required field': '必填',
  1295 + isPhone: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid telphone': '联系号码不正确'
  1296 + },
  1297 + email: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid email address': '邮箱格式不正确',
  1298 + code:{
  1299 + required: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter enter a verification code' : "必须输入验证码",
  1300 + minlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位",
  1301 + maxlength: $(".submit-w-btn").attr('lang') == 'en' ? 'Verification code length 4' : "验证码长度4位"
  1302 + },
  1303 + website:{
  1304 + url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"
  1305 + }
1295 }, 1306 },
1296 - website:{  
1297 - url: $(".submit-w-btn").attr('lang') == 'en' ? 'Please enter a valid link':"必须是有效链接"  
1298 - }  
1299 - },  
1300 - submitHandler: function(form){  
1301 -  
1302 - getFormData(function (data) {  
1303 - $.ajax({  
1304 - type: 'post',  
1305 - dataType: 'json',  
1306 - url: '/onlinereg/setseller',  
1307 - data: {  
1308 - name: data.name,  
1309 - is_enter_yohobuy:data.is_enter_yohobuy,  
1310 - product_type:data.product_type,  
1311 - company: data.company,  
1312 - country:data.country,  
1313 - contact: data.contact,  
1314 - telphone: data.telphone,  
1315 - email: data.email,  
1316 - place: data.place,  
1317 - website: data.website,  
1318 - files: data.files,  
1319 - code: data.code,  
1320 - type: data.type  
1321 - },  
1322 - success: function (d) {  
1323 - if (d.code === 200) {  
1324 - $('.dialog-w').fadeIn();  
1325 -  
1326 - setTimeout(function () {  
1327 - $('.dialog-w').fadeOut();  
1328 - window.location.reload();  
1329 - }, 2000);  
1330 - }  
1331 - else {  
1332 - alert("失败");  
1333 - }  
1334 - } 1307 + submitHandler: function(form){
  1308 +
  1309 + getFormData(function (data) {
  1310 + $.ajax({
  1311 + type: 'post',
  1312 + dataType: 'json',
  1313 + url: '/onlinereg/setseller',
  1314 + data: {
  1315 + name: data.name,
  1316 + is_enter_yohobuy:data.is_enter_yohobuy,
  1317 + product_type:data.product_type,
  1318 + company: data.company,
  1319 + country:data.country,
  1320 + contact: data.contact,
  1321 + telphone: data.telphone,
  1322 + email: data.email,
  1323 + place: data.place,
  1324 + website: data.website,
  1325 + files: data.files,
  1326 + code: data.code,
  1327 + type: data.type
  1328 + },
  1329 + success: function (d) {
  1330 + if (d.code === 200) {
  1331 + $('.dialog-w').fadeIn();
  1332 +
  1333 + setTimeout(function () {
  1334 + $('.dialog-w').fadeOut();
  1335 + window.location.reload();
  1336 + }, 2000);
  1337 + }
  1338 + else {
  1339 + alert("失败");
  1340 + }
  1341 + }
  1342 + });
  1343 +
1335 }); 1344 });
1336 -  
1337 - });  
1338 1345
1339 - return false;  
1340 - }  
1341 - }); 1346 + return false;
  1347 + }
  1348 + });
  1349 +
  1350 +
  1351 + }
  1352 +
1342 } 1353 }
1343 1354
1344 $('#sponsor-form').find('input').keyup(function () { 1355 $('#sponsor-form').find('input').keyup(function () {
1345 1356
1346 - console.log(sponsorForm.form()); 1357 +// console.log(sponsorForm.form());
1347 1358
1348 - if(sponsorForm.form()) { 1359 +// if(sponsorForm.form()) {
1349 1360
1350 vCode(function (data) { 1361 vCode(function (data) {
1351 if (data.code == 200) { 1362 if (data.code == 200) {
1352 $('.submit-w-btn').removeAttr('disabled').removeClass('dis'); 1363 $('.submit-w-btn').removeAttr('disabled').removeClass('dis');
1353 } 1364 }
1354 }); 1365 });
1355 - } 1366 +
  1367 +// }
1356 }); 1368 });
1357 1369
1358 $('#media-form').find('input').keyup(function () { 1370 $('#media-form').find('input').keyup(function () {
1359 1371
1360 - if(mediaForm.form()) { 1372 +//if(mediaForm.form()) {
1361 1373
1362 vCode(function (data) { 1374 vCode(function (data) {
1363 if (data.code == 200) { 1375 if (data.code == 200) {
@@ -1365,20 +1377,19 @@ define('yohood', function(require, exports) { @@ -1365,20 +1377,19 @@ define('yohood', function(require, exports) {
1365 } 1377 }
1366 }); 1378 });
1367 1379
1368 - } 1380 +// }
1369 }); 1381 });
1370 1382
1371 $('#exhibitor-form').find('input').keyup(function () { 1383 $('#exhibitor-form').find('input').keyup(function () {
1372 1384
1373 - if(true){//exhibitorForm.form()) {  
1374 - 1385 +// if(true){//exhibitorForm.form()) {
1375 vCode(function (data) { 1386 vCode(function (data) {
1376 if (data.code == 200) { 1387 if (data.code == 200) {
1377 $('.submit-w-btn').removeAttr('disabled').removeClass('dis'); 1388 $('.submit-w-btn').removeAttr('disabled').removeClass('dis');
1378 } 1389 }
1379 }); 1390 });
1380 1391
1381 - } 1392 +// }
1382 }); 1393 });
1383 } 1394 }
1384 1395