Authored by lijing

个人中心优化

... ... @@ -58,9 +58,9 @@ exports.myDetails = (req, res, next) => {
pageFooter: true
};
indexModel.myDetails({
let uid = req.user.uid;
}).then(result => {
indexModel.myDetails(uid).then(result => {
res.render('personal-details', Object.assign(responseData, result));
}).catch(next);
};
... ...
... ... @@ -98,12 +98,6 @@ const index = (params) => {
});
}
if (result[2] && result[2].data) {
Object.assign(finalResult, {
productFavoriteTotal: result[2].data.product_favorite_total
});
}
if (result[3] && result[3].data) {
Object.assign(finalResult, {
sendCargoNum: result[3].data.send_cargo_num,
... ... @@ -112,6 +106,7 @@ const index = (params) => {
yohoCoinNum: result[3].data.yoho_coin_num,
inboxTotal: result[3].data.inbox_total,
couponNum: result[3].data.coupon_num,
productFavoriteTotal: result[3].data.product_favorite_total,
brandFavoriteTotal: result[3].data.brand_favorite_total,
productBrowse: result[3].data.product_browse
});
... ... @@ -126,10 +121,10 @@ const index = (params) => {
* 个人基本资料
* @param params
*/
const myDetails = (params) => {
const myDetails = (uid) => {
return api.get('', {
method: 'app.passport.profile',
uid: params.uid
uid: uid
}, {code: 200}).then((result) => {
result = camelCase(result);
if (result.data) {
... ...
... ... @@ -56,7 +56,7 @@ router.get('/mycurrency', currencyController.myCurrency); // yoho币总数
router.get('/currencyDetail', currencyController.currencyDetail); // yoho币列表
router.post('/ajaxCurrencyDetail', currencyController.ajaxCurrencyDetail); // yoho币列表
router.get('/record', auth, homeController.record); // 浏览记录
router.get('/record', auth, homeController.record); // 浏览记录
router.get('/recordContent', homeController.recordContent); // 浏览记录
router.get('/delRecord', homeController.delRecord); // 删除浏览记录
... ...