Showing
2 changed files
with
5 additions
and
4 deletions
@@ -8,8 +8,9 @@ exports.familyIndex = (req, res, next) => { | @@ -8,8 +8,9 @@ exports.familyIndex = (req, res, next) => { | ||
8 | let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8'; | 8 | let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8'; |
9 | let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222'; | 9 | let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222'; |
10 | let isMarsApp = req.yoho.isMarsApp; | 10 | let isMarsApp = req.yoho.isMarsApp; |
11 | + let protocol = req.protocol; | ||
11 | 12 | ||
12 | - req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp).then(result => { | 13 | + req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol).then(result => { |
13 | res.render('family/index', { | 14 | res.render('family/index', { |
14 | page: 'family', | 15 | page: 'family', |
15 | title: 'YOHO!Family', | 16 | title: 'YOHO!Family', |
@@ -433,7 +433,7 @@ class familyModel extends global.yoho.BaseModel { | @@ -433,7 +433,7 @@ class familyModel extends global.yoho.BaseModel { | ||
433 | /** | 433 | /** |
434 | * family主页 | 434 | * family主页 |
435 | */ | 435 | */ |
436 | - familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp) { | 436 | + familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol) { |
437 | return Promise.all([ | 437 | return Promise.all([ |
438 | this._userData(uid), | 438 | this._userData(uid), |
439 | this._getCode(uid), | 439 | this._getCode(uid), |
@@ -477,9 +477,9 @@ class familyModel extends global.yoho.BaseModel { | @@ -477,9 +477,9 @@ class familyModel extends global.yoho.BaseModel { | ||
477 | } | 477 | } |
478 | 478 | ||
479 | if (isMarsApp) { | 479 | if (isMarsApp) { |
480 | - familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; | 480 | + familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"${protocol}://m.yohobuy.com/home/family/userInfo"}}`; |
481 | } else { | 481 | } else { |
482 | - familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}'; | 482 | + familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"protocol}://m.yohobuy.com/home/family/userInfo"}}`; |
483 | } | 483 | } |
484 | 484 | ||
485 | return familyIndexData; | 485 | return familyIndexData; |
-
Please register or login to post a comment