wesmiler пре 2 недеља
родитељ
комит
700eb593a6
2 измењених фајлова са 2 додато и 7 уклоњено
  1. 0 5
      app/Http/Controllers/Api/webApp.php
  2. 2 2
      app/Services/Api/MemberService.php

+ 0 - 5
app/Http/Controllers/Api/webApp.php

@@ -38,9 +38,6 @@ class webApp extends BaseController
     // 用户类型
     protected $userType = 1;
 
-    // 仓库ID
-    protected $stockId = 1;
-
     // 登录信息
     protected $userInfo = [];
 
@@ -72,7 +69,6 @@ class webApp extends BaseController
                 $this->initLogin($userId);
             }else{
                 $this->userId = $userId;
-                $this->stockId = isset($userInfo['stock_id'])? $userInfo['stock_id'] : 0;
                 $this->userType = isset($userInfo['user_type']) && $userInfo['user_type']? $userInfo['user_type'] : 1;
                 $this->userInfo = $userInfo;
             }
@@ -113,7 +109,6 @@ class webApp extends BaseController
             $memberModel = new MemberModel();
             $userInfo = $memberModel->getInfo($this->userId);
             $this->userInfo = $userInfo;
-            $this->stockId = isset($userInfo['stock_id'])? $userInfo['stock_id'] : 0;
             $this->userType = isset($userInfo['user_type']) && $userInfo['user_type']? $userInfo['user_type'] : 1;
             RedisService::set("auths:info:{$userId}", $this->userInfo, 7*24*3600);
         }

+ 2 - 2
app/Services/Api/MemberService.php

@@ -131,7 +131,7 @@ class MemberService extends BaseService
         // 结果返回
         $result = [
             'access_token' => $token,
-            'info' => ['uid' => $userId, 'openid' => $openid,'nickname'=>$nickname, 'mobile' => $mobile],
+            'info' => ['id' => $userId, 'openid' => $openid,'nickname'=>$nickname, 'mobile' => $mobile],
         ];
 
         // 用户缓存信息
@@ -282,7 +282,7 @@ class MemberService extends BaseService
         // 结果返回
         $result = [
             'access_token' => $token,
-            'info' => ['uid' => $userId, 'openid' => $openid, 'mobile' => $data['mobile']],
+            'info' => ['id' => $userId, 'openid' => $openid, 'mobile' => $data['mobile']],
         ];
 
         // 用户缓存信息