Authored by zhangxiaoru

me

/**
* [个人中心]收货地址
/**
* @author: jiangmin
* @date: 2016/07/05
*/
... ... @@ -24,8 +23,8 @@ const index = (req, res, next) => {
let uid = req.user.uid;
Promise.all([addressModel.getAddressDataAsync(uid, 20), mcHandler.getMeThumb()]).then(result => {
let resultData = result[0].data ? result[0].data : result[0];
let length = resultData.length ? (resultData.length > 7 ? 7 : resultData.length) : 0;
let resultData = result[0].data ? result[0].data : [];
let length = resultData.length > 7 ? 7 : resultData.length;
let reg = /(\d{3})\d{4}(\d{4})/;
let thumb = result[1];
... ... @@ -49,7 +48,7 @@ const index = (req, res, next) => {
data: resultData
}
});
});
}).catch(next);
};
const getAddressList = (req, res, next) => {
... ...
... ... @@ -81,7 +81,7 @@ const index = (req, res, next) => {
total: result[0].list.total ? result[0].list.total : 0
}
});
});
}).catch(next);
};
... ...
... ... @@ -53,7 +53,7 @@ const refund = (req, res, next) => {
Promise.all([returns.getRefundGoodsData(code, uid), mcHandler.getMeThumb()]).then(result => {
let refundGoods = result[0];
let thumb = result[1];
res.display('index', {
page: 'refund',
content: Object.assign({
... ... @@ -100,7 +100,7 @@ const refundDetail = (req, res, next) => {
}
Promise.all([returns.getRefundDetailData(applyId, uid), mcHandler.getMeThumb()]).then(result => {
let refundDetail = result[0];
let refundDetailData = result[0];
let thumb = result[1];
res.display('index', {
... ... @@ -109,7 +109,7 @@ const refundDetail = (req, res, next) => {
nav: mcHandler.getMeCrumb('我的退/换货'),
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: thumb
}, refundDetail)
}, refundDetailData)
});
}).catch(next);
};
... ... @@ -122,7 +122,7 @@ const exchange = (req, res, next) => {
const uid = req.user.uid;
Promise.all([returns.getChangeGoodsList(code, uid), mcHandler.getMeThumb()]).then(result => {
let exchange = result[0];
let exchangeData = result[0];
let thumb = result[1];
res.display('index', {
... ... @@ -132,7 +132,7 @@ const exchange = (req, res, next) => {
nav: mcHandler.getMeCrumb('我的退/换货'),
navigation: mcHandler.getSideMenu('我的退/换货'),
banner: thumb
}, exchange)
}, exchangeData)
});
}).catch(next);
};
... ...
... ... @@ -105,7 +105,7 @@ const index = (req, res, next) => {
x.isSelected = 'selected';
}
});
}
}
res.display('index', {
module: 'me',
... ... @@ -120,7 +120,7 @@ const index = (req, res, next) => {
userInfo: result[0]
}
});
});
}).catch(next);
};
/**
... ...
... ... @@ -17,8 +17,6 @@ var validate = require('./order/validation');
var imgBoxTpl = require('../../tpl/me/thumbnail.hbs');
var changeTypeTpl = require('../../tpl/me/change-type.hbs');
lazyLoad($('.banner-img'));
var validateMap = {
user: {
sl: '#user',
... ... @@ -45,6 +43,8 @@ var validateMap = {
}
};
lazyLoad($('.banner-img'));
// 添加.check方法
require('../plugins/check');
... ...
... ... @@ -25,13 +25,13 @@ require('yoho-jquery-dotdotdot');
require('../common/header'); // header
require('../common/return-top'); // return-top
lazyload($('.banner-img'));
// dot
$('.goods-item .title').dotdotdot({
wrap: 'letter'
});
lazyLoad($('img.banner-img'));
function cancelRefundApply() {
$.ajax({
type: 'POST',
... ...
... ... @@ -26,7 +26,7 @@ var imgBoxTpl = require('../../tpl/me/thumbnail.hbs');
var checked;
lazyLoad($('.banner-img'));
lazyload($('.banner-img'));
$('.blk-footer .return-top').remove(); // 移除通用的返回顶部组件
... ...