优化登录逻辑

This commit is contained in:
liweisen 2020-03-12 09:20:16 +08:00
parent dcc8d70935
commit 4ebb688608
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ class Member extends CommonModel
$configModel = new SystemConfig();
$config = $configModel->info();
if ($config['single_mode'] && $config['single_org_code']) {
$result = MemberAccount::inviteMember($result['code'], $config['single_org_code']);
MemberAccount::inviteMember($result['code'], $config['single_org_code']);
}
return $result;
}

View File

@ -33,7 +33,7 @@ class Project extends CommonModel
if ($page < 1) {
$page = 1;
}
$offset = ($page - 1) * $page;
$offset = ($page - 1) * $pageSize;
$limit = $pageSize;
$prefix = config('database.prefix');
$sql = "select *,p.id as id,p.name as name,p.code as code,p.create_time as create_time from {$prefix}project as p join {$prefix}project_member as pm on p.code = pm.project_code left join {$prefix}project_collection as pc on p.code = pc.project_code where pm.member_code = '{$memberCode}' and p.organization_code = '$organizationCode'";