shish 4 anni fa
parent
commit
0b7b63eef6

+ 1 - 1
app-ghs/controllers/ConsoleController.php

@@ -27,7 +27,7 @@ class ConsoleController extends BaseController
         $notice = [];
         $admin = $this->admin;
         if ($isMini == 1 && !empty($admin)) {
-            $miniOpenId = $admin['miniOpenId'] ?? '';
+            $miniOpenId = $admin['ghsMiniOpenId'] ?? '';
             if (empty($miniOpenId)) {
                 $notice = [['title' => '绑定微信,下次自动登录后台', 'action' => '去绑定', 'page' => '/admin/staff/miniAutoLogin']];
             }

+ 1 - 5
app-hd/controllers/AuthController.php

@@ -58,7 +58,7 @@ class AuthController extends PublicController
         if (empty($phoneNumber)) {
             util::fail('登录失败了');
         }
-        $admin = AdminService::getByCondition(['mobile' => $phoneNumber, 'style' => AdminClass::STYLE_HD]);
+        $admin = AdminService::getByCondition(['mobile' => $phoneNumber]);
         if (empty($admin)) {
             util::fail('请先注册');
         }
@@ -83,10 +83,6 @@ class AuthController extends PublicController
         if ($shopAdmin->status == 0) {
             util::fail("您的账号已冻结");
         }
-        $shopId = $shopAdmin->shopId ?? 0;
-        if (empty($shopId)) {
-            util::fail('您不是管理员');
-        }
         $token = jwt::getNewToken($adminId);
         $shopAdmin->lastLogin = date("Y-m-d H:i:s");
         $shopAdmin->save();

+ 1 - 1
app-hd/controllers/ShopAdminController.php

@@ -167,7 +167,7 @@ class ShopAdminController extends BaseController
     public function actionList()
     {
         $where = [];
-        $where['shopId'] = $this->shopId;
+        $where['mainId'] = $this->mainId;
         $where['delStatus'] = 0;
         $list = ShopAdminService::getAdminList($where);
         util::success($list);

+ 0 - 1
biz-hd/admin/services/ShopAdminService.php

@@ -137,7 +137,6 @@ class ShopAdminService extends BaseService
             $roleId = $val['roleId'];
             $roleName = isset($roleList[$roleId]['roleName']) ? $roleList[$roleId]['roleName'] : '';
             $list[$key]['roleName'] = $roleName;
-
         }
         $data['list'] = $list;
         return $data;

+ 1 - 0
console/controllers/InitController.php

@@ -169,6 +169,7 @@ class InitController extends Controller
                             if (empty($pfAdmin->currentGhsShopId)) {
                                 $pfAdmin->currentGhsShopId = $pfShopId;
                                 $pfAdmin->ghsMiniOpenId = $pfAdmin->miniOpenId ?? '';
+                                $pfAdmin->miniOpenId = '';
                                 $pfAdmin->save();
                             }
                         } else {