...
|
...
|
@@ -4,15 +4,6 @@ const config = global.yoho.config; |
|
|
|
|
|
module.exports = () => {
|
|
|
return (req, res, next) => {
|
|
|
const uid = req.cookies._YOHOUID;
|
|
|
const token = req.cookies._YOHOTOKEN;
|
|
|
const key = `-_-!!!${uid}!!!-_-`;
|
|
|
|
|
|
if (md5(key) === token) {
|
|
|
req.user.uid = uid;
|
|
|
delete req.cookies._YOHOUID;
|
|
|
}
|
|
|
|
|
|
// app 内处理
|
|
|
if (req.yoho.isApp) {
|
|
|
if (req.cookies.app_uid &&
|
...
|
...
|
|