...
|
...
|
@@ -7,8 +7,8 @@ var cascadingAddress = require('../plugins/cascading-address'); |
|
|
var dialog = require('../plugins/dialog');
|
|
|
var _dialog = dialog.Dialog;
|
|
|
var _alert = dialog.Alert;
|
|
|
var modifyHead = require('./setting/modifyHead');
|
|
|
var tip;
|
|
|
var modifyHead = require('./setting/modifyHead');// flash操作
|
|
|
var tip;// 头像编辑弹框
|
|
|
|
|
|
var headHtml = modifyHead.swfobject('head', '600px', '400px', '../../img/me/head.swf?code=' + Math.random() +
|
|
|
'&upload_url=' + encodeURIComponent(location.protocol + '//' +
|
...
|
...
|
@@ -27,17 +27,21 @@ var Bll = { |
|
|
validate: function(info) {
|
|
|
var regBirth = new RegExp(/^[1-2][0-9][0-9][0-9]-[0-1]{0,1}[0-9]-[0-3]{0,1}[0-9]$/);
|
|
|
var regName = new RegExp(/^[\u4e00-\u9fa5_-a-zA-Z0-9]+$/);
|
|
|
var regRealName = new RegExp(/^[\u4e00-\u9fa5a-zA-Z]{2,12}$/);
|
|
|
var birthdayForm = $('#birthday');
|
|
|
var nickForm = $('#nick_name');
|
|
|
var realNameForm = $('#username');
|
|
|
var addressForm = $('.form-group-address');
|
|
|
var flag = true;
|
|
|
|
|
|
!regBirth.test(info.birthday) ? birthdayForm.next().show() : birthdayForm.next().hide();
|
|
|
!regName.test(info.nick_name) ? nickForm.next().show() : nickForm.next().hide();
|
|
|
!regRealName.test(info.username) ? realNameForm.next().show() : realNameForm.next().hide();
|
|
|
typeof (info.area_code) === 'undefined' ?
|
|
|
addressForm.css('margin-bottom', '20px').find('.error-tips').show() :
|
|
|
addressForm.css('margin-bottom', '70px').find('.error-tips').hide();
|
|
|
if (!regBirth.test(info.birthday) || !regName.test(info.nick_name) || typeof (info.area_code) === 'undefined') {
|
|
|
if (!regBirth.test(info.birthday) || !regName.test(info.nick_name) ||
|
|
|
!regRealName.test(info.username) || typeof (info.area_code) === 'undefined') {
|
|
|
flag = false;
|
|
|
}
|
|
|
return flag;
|
...
|
...
|
@@ -46,9 +50,12 @@ var Bll = { |
|
|
|
|
|
require('./me');
|
|
|
require('../plugins/check');
|
|
|
require('../me/setting/step1');
|
|
|
require('../me/setting/step2');
|
|
|
require('../me/setting/step3');
|
|
|
|
|
|
// 第一步:身份验证
|
|
|
require('../me/setting/validate');
|
|
|
|
|
|
// 第二步:操作
|
|
|
require('../me/setting/operate');
|
|
|
|
|
|
|
|
|
// 编辑头像移入移出切换效果
|
...
|
...
|
|