Browse Source

app 重新获取登陆信息

shish 4 years ago
parent
commit
f14aec09fb
2 changed files with 24 additions and 2 deletions
  1. 22 0
      app-ghs/controllers/AdminController.php
  2. 2 2
      app-ghs/controllers/AuthController.php

+ 22 - 0
app-ghs/controllers/AdminController.php

@@ -198,4 +198,26 @@ class AdminController extends BaseController
         util::success(['mobile' => $mobile]);
     }
 
+    //已经存有token,但没有store信息重新获取
+    //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!!
+    public function actionAppReGetLoginInfo()
+    {
+        $admin = $this->admin;
+        $currentShopId = $admin->currentShopId ?? 0;
+        $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($this->shopAdmin->attributes);
+        $openShop = $admin['openShop'] ?? 1;
+        $showDemo = 1;
+        util::success([
+            'token' => '',
+            'admin' => $admin,
+            'shopAdminId' => $this->shopAdminId,
+            'shopId' => $currentShopId,
+            'switchShop' => $switchShop,
+            'openShop' => $openShop,
+            'showDemo' => $showDemo,
+            //有小程序新版本提示更新
+            'update' => 0,
+        ]);
+    }
+
 }

+ 2 - 2
app-ghs/controllers/AuthController.php

@@ -252,7 +252,7 @@ class AuthController extends PublicController
         $showDemo = 1;
         $remind = getenv('GHS_UPDATE_REMIND') == false ? 0 : getenv('GHS_UPDATE_REMIND');
 
-        //注意这里的输出内容和actionAppLogin一样,要修改需要同步修改!!!!!!!!
+        //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!!
         util::success([
             'token' => $token,
             'admin' => $admin,
@@ -300,7 +300,7 @@ class AuthController extends PublicController
         $openShop = $admin['openShop'] ?? 1;
         $showDemo = 1;
 
-        //注意这里的输出内容和actionMiniInfo一样,要修改需要同步修改!!!!!!!!
+        //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!!
         util::success([
             'token' => $token,
             'admin' => $admin,