Authored by 邱骏

update

@@ -44,6 +44,8 @@ const index = async function(req, res, next) { @@ -44,6 +44,8 @@ const index = async function(req, res, next) {
44 }); 44 });
45 } 45 }
46 46
  47 +
  48 +
47 // 如果不在小程序或app中打开则返回 49 // 如果不在小程序或app中打开则返回
48 if (!isApp) { 50 if (!isApp) {
49 return renderErroPage({msg: WRONG_INVIROMENT}); 51 return renderErroPage({msg: WRONG_INVIROMENT});
@@ -56,14 +58,15 @@ const index = async function(req, res, next) { @@ -56,14 +58,15 @@ const index = async function(req, res, next) {
56 58
57 // 查看session中是否有登录信息 59 // 查看session中是否有登录信息
58 60
59 - if (!req.user.uid || !req.user.uid.toString() || !req.user.uid.session_key) { 61 +
  62 + if (!req.user.uid || !req.user.uid.toString() || !req.user.uid.sessionKey) {
60 return res.redirect(`//m.yohobuy.com/magazine/${e_id}.html`); 63 return res.redirect(`//m.yohobuy.com/magazine/${e_id}.html`);
61 } 64 }
62 65
63 // 通过接口获取到杂志对应的实际的url,并进行处理 66 // 通过接口获取到杂志对应的实际的url,并进行处理
64 let magazineInfo = await req.ctx(indexModel).getMagazineInfo(req.user.uid, e_id).catch(next); 67 let magazineInfo = await req.ctx(indexModel).getMagazineInfo(req.user.uid, e_id).catch(next);
65 68
66 - console.log(magazineInfo); 69 + // console.log(req.user, magazineInfo);
67 70
68 if (magazineInfo && magazineInfo.code === 200 && magazineInfo.data) { 71 if (magazineInfo && magazineInfo.code === 200 && magazineInfo.data) {
69 let code = magazineInfo.data.code; 72 let code = magazineInfo.data.code;