|
@@ -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();
|