|
|
@@ -249,9 +249,24 @@ class BetService extends BaseService
|
|
|
}
|
|
|
|
|
|
// 期数验证
|
|
|
- $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
+
|
|
|
+ $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
+ if ($pc28Switch == 1) {
|
|
|
+ $issueInfo = PcIssue::where('status', PcIssue::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
+ } else {
|
|
|
+ $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
+ }
|
|
|
+
|
|
|
if (empty($issueInfo)) {
|
|
|
- $issueCloseInfo = IssueService::model()::where('status', IssueService::model()::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
+ if ($pc28Switch == 1) {
|
|
|
+
|
|
|
+ $issueCloseInfo = PcIssue::where('status', PcIssue::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
+
|
|
|
+ }else{
|
|
|
+ $issueCloseInfo = IssueService::model()::where('status', IssueService::model()::STATUS_CLOSE)->orderBy('id', 'desc')->first();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (empty($issueCloseInfo)) {
|
|
|
$errText .= lang("暂无可下注期数,本次下注无效!");
|
|
|
return false;
|
|
|
@@ -380,7 +395,7 @@ class BetService extends BaseService
|
|
|
|
|
|
$pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
|
|
|
if ($pc28Switch == 1) {
|
|
|
- $issueInfo = PcIssue::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
+ $issueInfo = PcIssue::where('status', PcIssue::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
} else {
|
|
|
$issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
|
|
|
}
|