Authored by 陈轩

im fix

... ... @@ -16,7 +16,7 @@ const chatQa = require(`${cRoot}/chatQa`); // 问题搜索列表页
// middlware
const authGuard = require('../../doraemon/middleware/auth');
const disableBFCache = require('../../doraemon/middleware/disable-bfcache');
const disableBFCache = require('../../doraemon/middleware/disable-BFCache');
// Your controller here
router.get('/im', disableBFCache, chat.appAdapter, authGuard, chat.page);
... ...
... ... @@ -20,12 +20,10 @@ module.exports = () => {
}
// app 特殊读法
if (!req.user.uid && req.yoho.isApp) {
let userAgent = _.get(req.headers, 'user-agent', '');
let userAgent = _.get(req.headers, 'user-agent', '');
if (userAgent.indexOf('YohoBuy') >= 0) {
req.user.uid = req.cookies._YOHOUID || 0;
}
if (!req.user.uid && userAgent.indexOf('YohoBuy') >= 0) {
req.user.uid = req.cookies._YOHOUID || 0;
}
next();
... ...