Merge branch 'feature/shareBuy' into 'release/5.7'
protocol See merge request !584
Showing
2 changed files
with
7 additions
and
6 deletions
@@ -7,11 +7,12 @@ const shareBuyModel = require('../models/share-buy'), | @@ -7,11 +7,12 @@ const shareBuyModel = require('../models/share-buy'), | ||
7 | exports.index = (req, res, next) => { | 7 | exports.index = (req, res, next) => { |
8 | let activityId = req.query.act_id || 2023, | 8 | let activityId = req.query.act_id || 2023, |
9 | isApp = req.yoho.isApp, | 9 | isApp = req.yoho.isApp, |
10 | - uid = req.user.uid; | 10 | + uid = req.user.uid, |
11 | + protocol = req.protocol ? req.protocol + ':' : ''; | ||
11 | 12 | ||
12 | co(function* () { | 13 | co(function* () { |
13 | let isStudent = yield req.ctx(shareBuyModel).checkStudent(uid); | 14 | let isStudent = yield req.ctx(shareBuyModel).checkStudent(uid); |
14 | - let indexData = yield req.ctx(shareBuyModel).shareIndex(activityId, isApp, uid, isStudent); | 15 | + let indexData = yield req.ctx(shareBuyModel).shareIndex(activityId, isApp, uid, isStudent, protocol); |
15 | 16 | ||
16 | res.render('share-buy/share-buy', { | 17 | res.render('share-buy/share-buy', { |
17 | pageHeader: headerModel.setNav({ | 18 | pageHeader: headerModel.setNav({ |
@@ -11,7 +11,7 @@ module.exports = class extends global.yoho.BaseModel { | @@ -11,7 +11,7 @@ module.exports = class extends global.yoho.BaseModel { | ||
11 | /** | 11 | /** |
12 | * 首页数据 | 12 | * 首页数据 |
13 | */ | 13 | */ |
14 | - shareIndex(activityId, isApp, uid, isStudent) { | 14 | + shareIndex(activityId, isApp, uid, isStudent, protocol) { |
15 | 15 | ||
16 | return api.all([this._CouponInfo(activityId, uid, isStudent), this._redeatList(), | 16 | return api.all([this._CouponInfo(activityId, uid, isStudent), this._redeatList(), |
17 | this._banner()]).then(result => { | 17 | this._banner()]).then(result => { |
@@ -44,9 +44,9 @@ module.exports = class extends global.yoho.BaseModel { | @@ -44,9 +44,9 @@ module.exports = class extends global.yoho.BaseModel { | ||
44 | }); | 44 | }); |
45 | 45 | ||
46 | if (isApp) { | 46 | if (isApp) { |
47 | - val.detailUrl = val.detailUrl + | ||
48 | - '&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"http:' + val.detailUrl + | ||
49 | - '","params":{"couponId":"' + val.couponId + '","couponCode":"' + | 47 | + val.detailUrl = protocol + val.detailUrl + |
48 | + '&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"' + protocol + | ||
49 | + val.detailUrl + '","params":{"couponId":"' + val.couponId + '","couponCode":"' + | ||
50 | val.couponCode + '"}}}'; | 50 | val.couponCode + '"}}}'; |
51 | } | 51 | } |
52 | 52 |
-
Please register or login to post a comment