session()->put('sadsads',['sadsa'=>'sasada']); // $request->session()->save(); // dd( session()->all()); //验证会员授权信息 $clientRoute = request()->route()->getName(); $is_wx=CommonServer::creatServer()->isWeixin(); if (!in_array($clientRoute, ['member.wx_info','notify.shop_order']) && $is_wx) { $login_info=session('login_info'); if(empty($login_info)){ $wx_info = WeixinServer::creatServer()->authorize(); if(!empty($wx_info)){ $login_info = MemberServer::creatServer()->setWxOpen($wx_info); if(empty($login_info)){ throw new WapException('登陆信息错误'); } session()->put('login_info',$login_info); session()->save(); }else{ throw new WapException('微信信息获取失败'); } } } return $next($request); } }