...
|
...
|
@@ -6,6 +6,7 @@ |
|
|
|
|
|
'use strict';
|
|
|
|
|
|
const _ = require('lodash');
|
|
|
const headerModel = require('../../../doraemon/models/header'); // 头部model
|
|
|
const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
|
|
|
const indexModel = require('../models/brand');
|
...
|
...
|
@@ -27,17 +28,20 @@ exports.index = (req, res, next) => { |
|
|
// title: '品牌一览 | Yoho!Buy有货 | 潮流购物逛不停',
|
|
|
showFooterTab: footerModel.getUrlData('category')
|
|
|
};
|
|
|
let pathWithoutParams = _.trimEnd(_.first(_.split(req.path, '?')), '/');
|
|
|
let pathLast = _.last(_.split(pathWithoutParams, '/'));
|
|
|
let pathChannel = _.first(_.split(pathLast, '-'));
|
|
|
let channel;
|
|
|
|
|
|
// 唤起 APP 的路径
|
|
|
res.locals.appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.attention","params":{"actiontype":"1"}}';
|
|
|
|
|
|
if (!req.query.channel) {
|
|
|
if (!pathChannel) {
|
|
|
channel = '1';
|
|
|
} else if (!typeLib.channels[req.query.channel]) {
|
|
|
} else if (!typeLib.channels[pathChannel]) {
|
|
|
channel = req.query.channel;
|
|
|
} else {
|
|
|
channel = typeLib.channels[req.query.channel] + '';
|
|
|
channel = typeLib.channels[pathChannel] + '';
|
|
|
}
|
|
|
|
|
|
let param = {
|
...
|
...
|
|