Authored by 姜枫

handle merge

... ... @@ -158,7 +158,7 @@ const exchangeDeatail = (req, res) => {
* 换货申请提交
*/
const exchangeSubmit = (req, res, next) => {
const uid = req.user.uid || '8050882';
const uid = req.user.uid;
returns.submitChange(req.query, uid).then(result => {
res.json(result);
... ...
... ... @@ -75,7 +75,7 @@ const _getTitle = (type)=> {
* 个人设置页面加载
*/
const index = (req, res, next) => {
let uid = req.user.uid || '8041246';
let uid = req.user.uid;
settingModel.getUserInfo(uid).then(result=> {
result.info.gender ? result.genders[result.info.gender - 1].checked = true :
... ...
... ... @@ -20,7 +20,9 @@
</div>
<div class="common-column special-border operation">
{{#isY canCancel}}
<p class="subtext cancel-apply" data-type="{{method}}" data-apply-id="{{id}}">取消申请</p>
{{# ../this}}
<p class="subtext cancel-apply" data-type="{{type}}" data-apply-id="{{id}}">取消申请</p>
{{/ ../this}}
{{/isY}}
<a href="{{detailUrl}}">
<p class="subtext">查看详情</p>
... ...
... ... @@ -9,6 +9,7 @@
<label class="label-name">真实姓名:</label>
<input id="username" class="input" type="text" placeholder="请输入2-12个汉字或英文"
value="{{info.username}}" minlength="2" maxlength="12">
<span class="blue error-tips">{{> icon/error-round}}2-12个汉字或英文</span>
</div>
<div class="form-group">
<label class="label-name">昵称:</label>
... ...
<label class="round-color{{#if cur}} cur{{/if}}" title="{{title}}" style="background: {{rgb}}">
<label class="round-color{{#if cur}} cur{{/if}}" title="{{title}}">
<div class="icon-back" style="background: {{rgb}}"></div>
<span class="iconfont icon-cover">&#xe61b;</span>
<span class="iconfont icon-round">&#xe620;</span>
</label>
\ No newline at end of file
... ...
... ... @@ -17,11 +17,11 @@ var page = 1;
var Bll = {
// 获取路由中的请求参数
getQueryString: function() {
let queryArr = location.search.substr(1).split('&');
let query = {};
var queryArr = location.search.substr(1).split('&');
var query = {};
queryArr.forEach(function(pair) {
let arr = pair.split('=');
var arr = pair.split('=');
query[arr[0]] = arr[1];
});
... ... @@ -33,7 +33,7 @@ var Bll = {
delivering: 2
},
getDataList: function(type1, page1, beginTime1) {
let query = ['page=' + page1, 'queryType=' + type1, 'beginTime=' + beginTime1];
var query = ['page=' + page1, 'queryType=' + type1, 'beginTime=' + beginTime1];
location.search = query.join('&');
}
... ... @@ -44,7 +44,7 @@ require('./me');
// tab切换
$('.tabs li').on('click', function() {
let $this = $(this);
var $this = $(this);
type = Bll.typeMap[$this.data('type')];
page = 1;
... ... @@ -60,7 +60,7 @@ $('.tabs li').on('click', function() {
// 时间控件切换
$('#begin-time').on('change', function() {
let months = parseInt($(this).val(), 10);
var months = parseInt($(this).val(), 10);
type = Bll.getQueryString().queryType || 1;
page = 1;
... ...
... ... @@ -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');
// 编辑头像移入移出切换效果
... ...
... ... @@ -20,9 +20,7 @@ var disableSMSBtn = function() {
second -= 1;
if (second < 0) {
second = 60;
$sms.text('获取短信验证码');
$sms.removeClass('disable');
$sms.removeClass('progress');
$sms.removeClass('progress').removeClass('disable').text('获取短信验证码');
} else {
$sms.add('progress');
$sms.text(second + '秒后可重新操作');
... ...
... ... @@ -8,17 +8,23 @@
.iconfont {
font-size: 30px;
position: absolute;
top: 0;
left: 0;
}
.icon-back {
width: 90%;
height: 90%;
margin: 5%;
}
.icon-cover {
color: #fff;
color: #fefefe;
}
.icon-round {
color: #eee;
top: 0;
left: 0;
position: absolute;
}
&.cur .icon-round {
... ...