Browse Source

会员升级

Kirin 4 months ago
parent
commit
f284b3b477
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/http/middleware/api/AuthTokenMiddleware.php

+ 4 - 4
app/http/middleware/api/AuthTokenMiddleware.php

@@ -49,12 +49,12 @@ class AuthTokenMiddleware implements MiddlewareInterface
                 return $authInfo['tokenData'];
             });
         }
-		$request->macro('isLogin', function () use (&$authInfo) {
+        $request->isLogin =  function () use (&$authInfo) {
             return !is_null($authInfo);
-        });
-		$request->macro('uid', function () use (&$authInfo) {
+        };
+        $request->uid =  function () use (&$authInfo) {
             return is_null($authInfo) ? 0 : (int)$authInfo['user']->uid;
-        });
+        };
 
         return $next($request);
     }