Mike %!s(int64=7) %!d(string=hai) anos
pai
achega
82c9c094d5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/app/Http/Controllers/Api/V1/AuthController.php

+ 1 - 1
server/app/Http/Controllers/Api/V1/AuthController.php

xqd
@@ -186,7 +186,7 @@ class AuthController extends Controller
         \Log::info($res);
         $arr = json_decode($res, true);
         $openid='';
-        if(!$arr['errcode'])$openid = $arr['openid'];
+        if(!isset($arr['errcode']))$openid = $arr['openid'];
         \Log::info('openid: ' . $openid);
         if($openid!='')$user = UserInfoModel::where('wechat',$openid)->first();
         if (empty($user)) {