Authored by ccbikai(👎🏻🍜)

Merge branch 'master' into release/5.6

... ... @@ -281,16 +281,17 @@ const local = {
const wechat = {
login: (req, res, next) => {
// 微信里边已经登录的时候,不再跳转登录
if (req.user.uid) {
let refer = req.query.refer || decodeURI(req.cookies.refer) || config.siteUrl;
// 与 5.6 的 session 有冲突
// if (req.user.uid) {
// let refer = req.query.refer || decodeURI(req.cookies.refer) || config.siteUrl;
if (/sign|login/.test(refer)) {
refer = `${config.siteUrl}/home`;
}
// if (/sign|login/.test(refer)) {
// refer = `${config.siteUrl}/home`;
// }
refer = utils.refererLimit(refer);
return res.redirect(refer);
}
// refer = utils.refererLimit(refer);
// return res.redirect(refer);
// }
// 设置为原链接标识originalUrl
req.session.originalUrl = 'true';
... ...