| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- namespace App\Http\Controllers\api;
- use App\Models\Config;
- use Carbon\Carbon;
- use Illuminate\Http\JsonResponse;
- use App\Http\Controllers\api\Issue;
- use App\Http\Controllers\api\NewPc;
- /**
- * pc28,根据配置的游戏玩法返回指定的数据
- */
- class PcIssue extends BaseController
- {
- /**
- * @api {get} /pcissue/yuanTou 源头
- *
- */
- function yuanTou()
- {
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- //pc28分分彩/极速28
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->yuanTou();
- }
- /**
- * @api {get} /pcissue/history 天机
- *
- */
- function history()
- {
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- //pc28分分彩/极速28
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->history();
- }
- /**
- * @api {get} /pcissue/prediction 预测
- */
- function prediction()
- {
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- //pc28分分彩/极速28
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->prediction();
- }
- /**
- * @api {get} /pcissue/countdown 倒计时
- *
- */
- public function countdown(): JsonResponse
- {
- //0:pc28 1:急速28
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->countdown();
- }
- /**
- * @api {get} /pcissue 结果,走势
- */
- public function index()
- {
- //0:pc28 1:急速28
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->index();
- }
- /**
- * @api {get} /pcissue/cao 统计,历史
- */
- public function cao()
- {
- $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
- if ($pc28Switch == 1) {
- //pc28分分彩/极速28
- $issueController = new NewPc();
- } else {
- //pc28
- $issueController = new Issue();
- }
- return $issueController->cao();
- }
- }
|