|
|
@@ -150,9 +150,7 @@ class Issue extends Controller
|
|
|
{
|
|
|
$id = request()->input('id');
|
|
|
$winning_numbers = request()->input('winning_numbers');
|
|
|
- $winArr = array_map('intval', explode(',', $winning_numbers));
|
|
|
- $combo = IssueService::getCombo($winArr);
|
|
|
- $image = null;
|
|
|
+
|
|
|
if (!$id) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, '参数错误');
|
|
|
}
|
|
|
@@ -162,6 +160,9 @@ class Issue extends Controller
|
|
|
if (explode(',', $winning_numbers) < 3) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, '开奖号码格式错误');
|
|
|
}
|
|
|
+ $winArr = array_map('intval', explode(',', $winning_numbers));
|
|
|
+ $combo = IssueService::getCombo($winArr);
|
|
|
+ $image = null;
|
|
|
$ret = IssueService::lotteryDraw($id, $winning_numbers, $combo, $image);
|
|
|
if ($ret['code'] == BaseService::NOT) {
|
|
|
return $this->error($ret['code'], $ret['error'] ?: $ret['msg']);
|