|
...
|
...
|
@@ -53,7 +53,7 @@ class CountAllProject extends Command |
|
|
|
$res_data = [];
|
|
|
|
$i = 1;
|
|
|
|
while (true) {
|
|
|
|
$url = 'https://quanqiusou.cn/extend_api/api/projects.php?page=' . $i . '&pagesize=2';
|
|
|
|
$url = 'https://quanqiusou.cn/extend_api/api/projects.php?page=' . $i . '&pagesize=100';
|
|
|
|
$result = http_get($url);
|
|
|
|
// 检查结果是否成功,并且结构符合预期
|
|
|
|
if (isset($result['data']['data']) && is_array($result['data']['data'])) {
|
|
...
|
...
|
@@ -67,7 +67,7 @@ class CountAllProject extends Command |
|
|
|
$i++;
|
|
|
|
} else {
|
|
|
|
// 如果数据结构不符合预期,输出错误信息并跳出循环
|
|
|
|
echo '数据结构不符合预期或请求失败,停止执行。' . PHP_EOL;
|
|
|
|
echo '数据结构不符合预期或请求失败,停止执行。' . PHP_EOL . json_encode($result);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|