Showing
1 changed file
with
6 additions
and
4 deletions
@@ -2,9 +2,6 @@ | @@ -2,9 +2,6 @@ | ||
2 | const model = require('../models/feature'); | 2 | const model = require('../models/feature'); |
3 | 3 | ||
4 | exports.index = function(req, res, next) { | 4 | exports.index = function(req, res, next) { |
5 | - // 唤起 APP 的路径 | ||
6 | - res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.h5","params":{"param":{"share_id":"${req.query.share_id}"},"share":"/operations/api/v5/webshare/getShare","shareparam":{"share_id":"${req.query.share_id}"},"url":"https://activity.yoho.cn/feature/${req.params.code}.html"}}`; | ||
7 | - | ||
8 | model.index({ | 5 | model.index({ |
9 | code: req.params.code, | 6 | code: req.params.code, |
10 | type: req.query.type | 7 | type: req.query.type |
@@ -12,10 +9,15 @@ exports.index = function(req, res, next) { | @@ -12,10 +9,15 @@ exports.index = function(req, res, next) { | ||
12 | if (!result) { | 9 | if (!result) { |
13 | return next(); | 10 | return next(); |
14 | } | 11 | } |
12 | + let title = req.query.title || result.name || '专题活动'; | ||
13 | + | ||
14 | + // 唤起 APP 的路径 | ||
15 | + res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.h5","params":{"param":{"share_id":"${req.query.share_id}","title":"${title}"},"share":"/operations/api/v5/webshare/getShare","shareparam":{"share_id":"${req.query.share_id}"},"title":"${title}","url":"https://activity.yoho.cn/feature/${req.params.code}.html"}}`; | ||
16 | + | ||
15 | res.render('feature/index', { | 17 | res.render('feature/index', { |
16 | module: 'activity', | 18 | module: 'activity', |
17 | page: 'feature', | 19 | page: 'feature', |
18 | - title: result.name || 'Yoho!Buy有货', | 20 | + title: title, |
19 | content: result, | 21 | content: result, |
20 | activity_id: req.params.code, | 22 | activity_id: req.params.code, |
21 | isFeature: true, | 23 | isFeature: true, |
-
Please register or login to post a comment