Merge branch 'develop' of https://e.coding.net/g-xtcy5189/cunkebao/cunkebao_v3 into develop
This commit is contained in:
@@ -98,7 +98,7 @@ export default function EditContentLibraryPage({ params }: { params: Promise<{ i
|
||||
const data = response.data
|
||||
|
||||
// 直接使用API返回的好友和群组数据
|
||||
const friends = data.sourceFriends || [];
|
||||
const friends = data.selectedFriends || [];
|
||||
const groups = data.sourceGroups || [];
|
||||
|
||||
setFormData({
|
||||
|
||||
@@ -111,6 +111,24 @@ class ContentLibraryController extends Controller
|
||||
$library['timeEnd'] = date('Y-m-d', $library['timeEnd']);
|
||||
}
|
||||
|
||||
// 获取好友详细信息
|
||||
if (!empty($library['sourceFriends'])) {
|
||||
$friendIds = $library['sourceFriends'];
|
||||
$friendsInfo = [];
|
||||
|
||||
if (!empty($friendIds)) {
|
||||
// 查询好友信息,使用wechat_account表
|
||||
$friendsInfo = Db::name('wechat_account')
|
||||
->field('wechatId, nickname, avatar')
|
||||
->whereIn('wechatId', $friendIds)
|
||||
->select();
|
||||
}
|
||||
|
||||
// 将好友信息添加到返回数据中
|
||||
$library['selectedFriends'] = $friendsInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return json([
|
||||
'code' => 200,
|
||||
|
||||
Reference in New Issue
Block a user