|
@@ -157,8 +157,12 @@ class Issue extends Controller
|
|
|
if (empty($winning_numbers)) {
|
|
if (empty($winning_numbers)) {
|
|
|
$url = "https://ydpc28.co/api/pc28/list";
|
|
$url = "https://ydpc28.co/api/pc28/list";
|
|
|
$result = file_get_contents($url);
|
|
$result = file_get_contents($url);
|
|
|
|
|
+ $result = json_decode($result, true);
|
|
|
|
|
+ if ($result['errorCode'] != 0) {
|
|
|
|
|
+ return $this->error(HttpStatus::CUSTOM_ERROR, '参数错误');
|
|
|
|
|
+ }
|
|
|
return $this->success($result);
|
|
return $this->success($result);
|
|
|
- return $this->error(HttpStatus::CUSTOM_ERROR, '参数错误');
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if (explode(',', $winning_numbers) < 3) {
|
|
if (explode(',', $winning_numbers) < 3) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, '开奖号码格式错误');
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, '开奖号码格式错误');
|