feat(IndexController): 修改用户昵称获取方式

This commit is contained in:
mkm 2024-07-18 17:43:15 +08:00
parent 4d8d622cb4
commit 3be7efb356

View File

@ -137,7 +137,7 @@ class IndexController extends BaseLikeController
// }
$res = Db::connect('demo')->name('user_recharge')->where($where)->limit(20)->select()->each(function ($item) {
if ($item['uid']) {
$item['nickname'] = User::where('id', $item['uid'])->value('nickname');
$item['nickname'] = Db::connect('demo')->name('user')->where('id', $item['uid'])->value('nickname');
} else {
$item['nickname'] = '';
}