|
@@ -93,12 +93,12 @@ class Login extends Base
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#[GetMapping('profile')]
|
|
#[GetMapping('profile')]
|
|
|
- public function getLoginUser()
|
|
|
|
|
|
|
+ public function getLoginUser(): Response
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
$userData = (new Auth)->guard("admin")->user()->toArray();
|
|
$userData = (new Auth)->guard("admin")->user()->toArray();
|
|
|
if (isset($userData['password'])) unset($userData['password']);
|
|
if (isset($userData['password'])) unset($userData['password']);
|
|
|
- $agent = [];
|
|
|
|
|
|
|
+ $agent = (new SaasStore)->where("poi_id",$userData['store_id'])->findOrEmpty();
|
|
|
if (empty($agent['vip_end']))
|
|
if (empty($agent['vip_end']))
|
|
|
{
|
|
{
|
|
|
$userData['vip_end'] = 0;
|
|
$userData['vip_end'] = 0;
|
|
@@ -110,8 +110,9 @@ class Login extends Base
|
|
|
"truename" => $userData['truename'],
|
|
"truename" => $userData['truename'],
|
|
|
"vip_at" => $userData['vip_end'],
|
|
"vip_at" => $userData['vip_end'],
|
|
|
"agent_id" => $userData['agent_id'],
|
|
"agent_id" => $userData['agent_id'],
|
|
|
|
|
+ "store_id" => $userData['store_id'],
|
|
|
"super" => $userData['is_super'],
|
|
"super" => $userData['is_super'],
|
|
|
- "shop" => $agent['shop_name']??'',
|
|
|
|
|
|
|
+ "shop" => $agent['poi_name']??'',
|
|
|
"type" => $userData['type']
|
|
"type" => $userData['type']
|
|
|
]);
|
|
]);
|
|
|
} catch (\Throwable $throwable) {
|
|
} catch (\Throwable $throwable) {
|