Authored by 郭成尧

old-code-del

@@ -217,82 +217,6 @@ const shopFav = (req, res) => { @@ -217,82 +217,6 @@ const shopFav = (req, res) => {
217 }; 217 };
218 218
219 /** 219 /**
220 - * 旧版品类落地页  
221 - * TODO 已重构为 listNew 待删除  
222 - */  
223 -const category = (req, res, next) => {  
224 - if (req.query) {  
225 - _.forEach(req.query, (perParam, index) => {  
226 - req.query[index] = stringProcess.paramsFilter(perParam);  
227 - });  
228 - }  
229 -  
230 - let params = Object.assign({}, req.query);  
231 - let seoTitle;  
232 -  
233 - if (req.query.title || req.query.sort_name) {  
234 - seoTitle = stringProcess.decodeURIComponent(req.query.title || req.query.sort_name);  
235 - }  
236 -  
237 - /* 勿修改,唤起 APP 使用 */  
238 - let appParams = Object.assign({}, req.query, {  
239 - title: req.query.title || req.query.sort_name || '',  
240 - productPool: req.query.filter_poolId,  
241 - actiontype: req.query.actiontype || '1'  
242 - });  
243 -  
244 - delete appParams.filter_poolId;  
245 -  
246 - let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.list","params":' +  
247 - JSON.stringify(appParams) +  
248 - '}';  
249 -  
250 - let uid = req.user.uid || 0;  
251 -  
252 - // 获取第一页数据做服务端渲染  
253 - let initialData = _.assign({  
254 - gender: params.gender,  
255 - sort: parseInt(params.sort, 10) || '',  
256 - type: 'default',  
257 - order: '0',  
258 - page: 1,  
259 - limit: 24,  
260 - isApp: params.app_version  
261 - }, params);  
262 -  
263 - if (uid) {  
264 - initialData.uid = uid;  
265 - }  
266 -  
267 - req.ctx(searchModel).getSearchData(initialData).then((firstPageGoods) => {  
268 - res.render('search/goods-list', Object.assign({  
269 - _noLazy: true, // 首屏不使用lazyload  
270 - module: 'product',  
271 - page: 'search-list',  
272 -  
273 - // canonical: {  
274 - // currentHref: 'https://www.yohobuy.com/list?' // TODO  
275 - // },  
276 - pageHeader: headerModel.setNav({  
277 - navTitle: seoTitle || '商品列表'  
278 - }),  
279 - goodList: params,  
280 - firstPageGoods: firstPageGoods || [],  
281 - suggestion: firstPageGoods.suggestion || [],  
282 - showDownloadApp: true,  
283 - pageFooter: true,  
284 - category: true,  
285 - localCss: true,  
286 - appPath: appPath,  
287 - introText: req.query.intro_text  
288 - }, searchProcess.getListSeoData({  
289 - gender: req.query.gender,  
290 - sort_name: seoTitle  
291 - })));  
292 - }).catch(next);  
293 -};  
294 -  
295 -/**  
296 * 品类落地页 SEO 友好的新路由 220 * 品类落地页 SEO 友好的新路由
297 */ 221 */
298 const listNew = (req, res, next) => { 222 const listNew = (req, res, next) => {
@@ -670,7 +594,6 @@ const getBrandCouponsList = (req, res, next) => { @@ -670,7 +594,6 @@ const getBrandCouponsList = (req, res, next) => {
670 }; 594 };
671 595
672 module.exports = { 596 module.exports = {
673 - category,  
674 brand, 597 brand,
675 favoriteBrand, 598 favoriteBrand,
676 shopIntro, 599 shopIntro,