更新用户三方关联信息

This commit is contained in:
yaooo 2023-09-01 16:26:00 +08:00
parent 3e52c3dabd
commit 05fc330d93

View File

@ -218,6 +218,19 @@ class Auth extends BaseController
$data['community_num'] = Db::name('community')->where('uid', $user->uid)->whereIn('is_type', '1,2')->count();
$thirdparty = Db::name('user_thirdparty_token')->where('user_id', $user->uid)->select();
$thirdList = [];
foreach($thirdparty as $v) {
$temp = [
'account' => $v['account'],
'user_type' => $v['user_type'],
'token' => $v['token']
];
if ($v['expires_time'] <= date('Y-m-d H:i:s')) {
$temp['token'] = '';
}
$thirdList[] = $temp;
}
$data['thirdparty'] = $thirdList;
return app('json')->success($data);
}