Authored by 邱骏

update

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