|
@@ -45,6 +45,7 @@ const list = (req, res, next) => { |
|
@@ -45,6 +45,7 @@ const list = (req, res, next) => { |
45
|
list: result[0].list,
|
45
|
list: result[0].list,
|
46
|
filter: result[0].filter,
|
46
|
filter: result[0].filter,
|
47
|
pageFooter: true,
|
47
|
pageFooter: true,
|
|
|
48
|
+ localCss: true
|
48
|
});
|
49
|
});
|
49
|
}).catch(next);
|
50
|
}).catch(next);
|
50
|
};
|
51
|
};
|
|
@@ -66,11 +67,31 @@ const search = (req, res, next) => { |
|
@@ -66,11 +67,31 @@ const search = (req, res, next) => { |
66
|
}).catch(next);
|
67
|
}).catch(next);
|
67
|
};
|
68
|
};
|
68
|
|
69
|
|
|
|
70
|
+const detail = (req, res, next) => {
|
|
|
71
|
+ let skn = req.params[0];
|
|
|
72
|
+ let params = {
|
|
|
73
|
+ product_skn: skn,
|
|
|
74
|
+ uid: req.user.uid || 0,
|
|
|
75
|
+ client_type: 'iphone' // todo
|
|
|
76
|
+ };
|
|
|
77
|
+
|
|
|
78
|
+ model.detail(params).then((result) => {
|
|
|
79
|
+ res.render('global/detail', {
|
|
|
80
|
+ module: 'product',
|
|
|
81
|
+ page: 'global-detail',
|
|
|
82
|
+ pageHeader: headerModel.setNav({
|
|
|
83
|
+ navTitle: '商品详情'
|
|
|
84
|
+ }),
|
|
|
85
|
+ result: result,
|
|
|
86
|
+ pageFooter: true,
|
|
|
87
|
+ localCss: true
|
|
|
88
|
+ });
|
|
|
89
|
+ }).catch(next);
|
|
|
90
|
+};
|
|
|
91
|
+
|
69
|
|
92
|
|
70
|
module.exports = {
|
93
|
module.exports = {
|
71
|
list,
|
94
|
list,
|
72
|
search,
|
95
|
search,
|
73
|
- detail: function() {
|
|
|
74
|
-
|
|
|
75
|
- },
|
96
|
+ detail
|
76
|
}; |
97
|
}; |