소스 검색

提交极速游戏

lip 5 달 전
부모
커밋
cbcceb2e13
1개의 변경된 파일과 9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      app/Http/Controllers/admin/JisuLottery.php

+ 9 - 0
app/Http/Controllers/admin/JisuLottery.php

@@ -83,6 +83,15 @@ class JisuLottery extends Controller
             if (!empty($info->advance_code)) {
             if (!empty($info->advance_code)) {
                 throw new Exception('已设置');
                 throw new Exception('已设置');
             }
             }
+            if ($info->type == 2) {
+                if (count($params['advance_code']) != 5) {
+                    throw new Exception('开奖号码必须是5个数');
+                }
+            } else {
+                if (count($params['advance_code']) != 10) {
+                    throw new Exception('开奖号码必须是10个数');
+                }
+            }
             $info->advance_code = implode(",",$params['advance_code']);
             $info->advance_code = implode(",",$params['advance_code']);
             $info->save();
             $info->save();
             return $this->success();
             return $this->success();