Authored by 李奇

Revert "去除老的_YOHOUID、_YOHOTOKEN先关逻辑"

This reverts commit 5b299241.
@@ -4,6 +4,15 @@ const config = global.yoho.config; @@ -4,6 +4,15 @@ const config = global.yoho.config;
4 4
5 module.exports = () => { 5 module.exports = () => {
6 return (req, res, next) => { 6 return (req, res, next) => {
  7 + const uid = req.cookies._YOHOUID;
  8 + const token = req.cookies._YOHOTOKEN;
  9 + const key = `-_-!!!${uid}!!!-_-`;
  10 +
  11 + if (md5(key) === token) {
  12 + req.user.uid = uid;
  13 + delete req.cookies._YOHOUID;
  14 + }
  15 +
7 // app 内处理 16 // app 内处理
8 if (req.yoho.isApp) { 17 if (req.yoho.isApp) {
9 if (req.cookies.app_uid && 18 if (req.cookies.app_uid &&