修复无法正常登陆的问题

Signed-off-by: vilson <545522390@qq.com>
This commit is contained in:
vilson 2019-07-15 10:44:41 +08:00
parent 76e4b9712c
commit 013ea28608
3 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ class Member extends CommonModel
$departments[] = $department['name']; $departments[] = $department['name'];
} }
} }
$item['department'] = implode(' - ', $departments); $item['department'] = $departments ? implode(' - ', $departments) : '';
$organization = Organization::where(['code' => $item['organization_code']])->find(); $organization = Organization::where(['code' => $item['organization_code']])->find();
if ($organization) { if ($organization) {
$organizationList[] = $organization; $organizationList[] = $organization;
@ -50,7 +50,7 @@ class Member extends CommonModel
$member['is_owner'] = $list[0]['is_owner']; $member['is_owner'] = $list[0]['is_owner'];
$member['authorize'] = $list[0]['authorize']; $member['authorize'] = $list[0]['authorize'];
$member['position'] = $list[0]['position']; $member['position'] = $list[0]['position'];
$member['department'] = implode(' - ', $list[0]['department']); $member['department'] = $list[0]['department'];
setCurrentMember($member); setCurrentMember($member);
!empty($member['authorize']) && NodeService::applyProjectAuthNode(); !empty($member['authorize']) && NodeService::applyProjectAuthNode();

View File

@ -87,7 +87,7 @@ class Account extends BasicApi
$departments[] = $department['name']; $departments[] = $department['name'];
} }
} }
$item['departments'] = implode(' - ', $departments); $item['departments'] = $departments ? implode(' - ', $departments) : '';
} }
unset($item); unset($item);
} }
@ -112,7 +112,7 @@ class Account extends BasicApi
$departments[] = $department['name']; $departments[] = $department['name'];
} }
} }
$memberAccount['departments'] = implode(' - ', $departments); $memberAccount['departments'] = $departments ? implode(' - ', $departments) : '';
} }
$this->success('', $memberAccount); $this->success('', $memberAccount);
} }

View File

@ -70,7 +70,7 @@ class Index extends BasicApi
} }
} }
$member['position'] = $memberAccount['position']; $member['position'] = $memberAccount['position'];
$member['department'] = implode(' - ', $departments); $member['department'] = $departments ? implode(' - ', $departments) : '';
$member['account_id'] = $memberAccount['id']; $member['account_id'] = $memberAccount['id'];
$member['is_owner'] = $memberAccount['is_owner']; $member['is_owner'] = $memberAccount['is_owner'];
$member['authorize'] = $memberAccount['authorize']; $member['authorize'] = $memberAccount['authorize'];