index.js
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* 个人中心二维码 controller
* @author: chengyao.guo<chengyao.guo@yoho.cn>
* @date: 2016/08/10
*/
'use strict';
const headerModel = require('../../../doraemon/models/header'); // 头部model
const indexModel = require('../models/index');
exports.index = (req, res, next) => {
let params = {
uid: req.user.uid || '6228593'
};
let headerData = headerModel.setNav({
navTitle: '个人中心'
});
indexModel.index(params).then(result => {
result.isLogin = true;
if (result) {
res.render('index', Object.assign(result, {
pageHeader: headerData,
pageFooter: true
}));
}
}).catch(next);
// res.render('index', {
// myIndexPage: 1,
// showDownloadApp: 1,
// navHome: 1,
// notice: [],
// pageFooter: 1,
// cartUrl: '//m.dev.yohobuy.com/cart/index/index',
// signinUrl: '//m.dev.yohobuy.com/signin.html?refer=%2F%2Fm.dev.yohobuy.com%2Fhome',
// isLogin: true,
// wait_pay_num: 99,
// wait_cargo_num: 99,
// send_cargo_num: 99,
// brand_favorite_total: 99,
// product_favorite_total: 99,
// inbox_total: 99,
// comment_total: 99,
// refund_exchange_num: 99,
// yoho_coin_num: 99,
// coupon_num: 99,
// product_browse: 99
// });
};