Authored by 张孝茹

https

... ... @@ -8,8 +8,9 @@ exports.familyIndex = (req, res, next) => {
let contentCodeOne = '486e6adc7c83001b2e9e83996438fab8';
let contentCodeTwo = 'eebbcc60607ac443922d8fabe44eb222';
let isMarsApp = req.yoho.isMarsApp;
let protocol = req.protocol;
req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp).then(result => {
req.ctx(family).familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol).then(result => {
res.render('family/index', {
page: 'family',
title: 'YOHO!Family',
... ...
... ... @@ -433,7 +433,7 @@ class familyModel extends global.yoho.BaseModel {
/**
* family主页
*/
familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp) {
familyIndex(uid, contentCodeOne, contentCodeTwo, isMarsApp, protocol) {
return Promise.all([
this._userData(uid),
this._getCode(uid),
... ... @@ -477,9 +477,9 @@ class familyModel extends global.yoho.BaseModel {
}
if (isMarsApp) {
familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}';
familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:mars={"action":"go.h5","params":{"url":"${protocol}://m.yohobuy.com/home/family/userInfo"}}`;
} else {
familyIndexData.userInfoLink = 'http://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"http://m.yohobuy.com/home/family/userInfo"}}';
familyIndexData.userInfoLink = `${protocol}://m.yohobuy.com/home/family/userInfo?openby:yohobuy={"action":"go.h5","params":{"url":"protocol}://m.yohobuy.com/home/family/userInfo"}}`;
}
return familyIndexData;
... ...