cqpCow 1 year ago
parent
commit
4a2f477e0c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/Service/Weixin/WxEmployeeService.php

+ 1 - 0
app/Service/Weixin/WxEmployeeService.php

@@ -11,6 +11,7 @@ use Illuminate\Support\Facades\Hash;
 class WxEmployeeService extends Service
 class WxEmployeeService extends Service
 {
 {
     public function setUser($data){
     public function setUser($data){
+        if(empty($data['openid'])) return [false, 'openId不能为空!'];
         $openid = $data['openid'];
         $openid = $data['openid'];
         $user = WxEmployeeOfficial::where('openid',$openid)->first();
         $user = WxEmployeeOfficial::where('openid',$openid)->first();
         if(empty($user)) {
         if(empty($user)) {