perf: 接龙接口-强化排序

This commit is contained in:
weifs 2024-03-11 17:25:40 +08:00
parent 0919e415ec
commit 3a26f420b8

View File

@ -2198,6 +2198,10 @@ class DialogController extends AbstractController
$list = array_reverse(array_values($list)); $list = array_reverse(array_values($list));
} }
// //
usort($list, function($a, $b) {
return $a['id'] - $b['id'];
});
//
$msgData = [ $msgData = [
'text' => $text, 'text' => $text,
'list' => $list, 'list' => $list,