更新购物车

parent f49da4de
Showing with 2 additions and 2 deletions
......@@ -21,7 +21,7 @@ class CheckApiLogin
{
if (!\Auth::check() ) {
if (in_array($request->path(),$this->no_login_url)){ //一些接口可以登录或者不登录都可以通行
request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid")]);
request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid","")]);
return $next($request);
}else{
$response = [
......@@ -32,7 +32,7 @@ class CheckApiLogin
}
} else {
$request->user = \Auth::user();
$request->user->gid = "";
$request->user->gid = \Arr::get($_COOKIE,"sem_gid","");
return $next($request);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment