Skip to content

Commit f74452e

Browse files
committed
fix(app/controller/Game.php): 修复游戏数据合并逻辑
- 将游戏数据合并到现有数组中,而不是覆盖 - 提高了代码的效率和准确性
1 parent d50745d commit f74452e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

app/controller/Game.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public function record(): Json
4545
]);
4646
$data = json_decode($response->getBody()->getContents(), true);
4747
if ($data['ret'] === 0 && !empty($data['jData']['data'])) {
48-
$gameData[$key] = $data['jData']['data'];
49-
break;
48+
$gameData[$key] = array_merge($gameData[$key], $data['jData']['data']);
5049
}
5150
}
5251
if ($data['ret'] != 0) {

0 commit comments

Comments
 (0)