This commit is contained in:
mkm 2023-08-07 18:40:58 +08:00
parent 82f60425d5
commit 55dffa0999

View File

@ -35,11 +35,10 @@ class UserLogic extends BaseLogic
/**
* @notes 用户详情
* @param int $userId
* @return array
* @author 段誉
* @date 2022/9/22 16:32
*/
public static function detail(int $userId): array
public static function detail(int $userId)
{
// $field = [
// 'id', 'sn', 'account', 'nickname', 'avatar', 'real_name',
@ -54,7 +53,7 @@ class UserLogic extends BaseLogic
// $user->sex = $user->getData('sex');
$user['qualification'] = json_decode($user->qualification, true);
// if ($user->is_contract == 1) {
$user['contract'] = Contract::where(['type' => 2, 'party_b' => $userId])->with(['partyAInfo', 'contractType'])->find();
$user['contract'] = Contract::where(['type' => 2, 'party_b' => $userId])->with(['party_a_info', 'contractType'])->find();
// }
return $user->toArray();
}