|
@@ -30,10 +30,16 @@ class CheckWx
|
|
|
$employee = $employee->toArray();
|
|
|
if (empty($employee['mobile'])) return response()->json(['code'=> 202,'msg'=>'用户手机信息不存在!','data'=>null]);
|
|
|
|
|
|
- $employee_id = $employee['employee_id'];
|
|
|
- if(isset($data['checkWx'])){
|
|
|
- if(empty($employee_id)) return response()->json(['code'=> 202,'msg'=>'用户未绑定账号!','data'=>null]);
|
|
|
+ //当前请求接口
|
|
|
+ $uri = $request->path();
|
|
|
+ //不需要校验是否绑定账号的接口
|
|
|
+ $url = config('nocheck');
|
|
|
|
|
|
+ if(in_array($uri,$url)){
|
|
|
+ $request->userData = new Employee();
|
|
|
+ }else{
|
|
|
+ $employee_id = $employee['employee_id'];
|
|
|
+ if(empty($employee_id)) return response()->json(['code'=> 202,'msg'=>'用户未绑定账号!','data'=>null]);
|
|
|
//校验用户
|
|
|
$service = new WxEmployeeService();
|
|
|
$checkResult = $service->checkWxUser($employee_id);
|
|
@@ -61,8 +67,6 @@ class CheckWx
|
|
|
$data['is_check_stock'] = true;
|
|
|
|
|
|
$request->userData = $data;
|
|
|
- }else{
|
|
|
- $request->userData = new Employee();
|
|
|
}
|
|
|
|
|
|
return $next($request);
|