shish 6 lat temu
rodzic
commit
1cd69e196d
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      app/shop/controllers/AuthController.php

+ 3 - 0
app/shop/controllers/AuthController.php

@@ -159,6 +159,9 @@ class AuthController extends PublicController
         if (empty($merchantId)) {
             util::fail('您不是管理员');
         }
+        //管理员关联商家
+        $relateId = $relate['id'];
+        Yii::$app->redis->executeCommand('SET', ['ADMIN_RELATION_' . $adminId, $relateId]);
         //获取token
         $token = jwt::getNewToken($adminId);
         util::success(['token' => $token, 'account' => $merchantId, 'merchantId' => $merchantId]);