| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\BaseController;
- use App\Http\Validator\GongdengValidator;
- use App\Services\GongdengOrderService;
- use App\Services\GongdengFoxiangService;
- use App\Services\LampMealsService;
- /**
- * 供灯控制器类
- * @author wesmiler
- * @since 2020/11/10
- * Class GongdengController
- * @package App\Http\Controllers
- */
- class GongdengController extends BaseController
- {
- /**
- * 构造函数
- * @author wesmiler
- * @since 2020/11/11
- * GongdengController constructor.
- */
- public function __construct()
- {
- parent::__construct();
- $this->service = new GongdengOrderService();
- $this->fxService = new GongdengFoxiangService();
- $this->mealService = new LampMealsService();
- }
- /**
- * 套餐列表
- * @return mixed
- */
- public function index(){
- return $this->service->getMyGdList($this->userId);
- }
- /**
- * 佛像列表
- * @return mixed
- */
- public function fxInfo(){
- return $this->fxService->info();
- }
- /**
- * 佛像列表
- * @return mixed
- */
- public function fxList(){
- return $this->fxService->getList();
- }
- /**
- * 套餐列表
- * @return mixed
- */
- public function mealList(){
- return $this->mealService->getDataList();
- }
- /**
- * 功德榜记录
- * @return mixed
- */
- public function gdList(){
- return $this->service->getGdList();
- }
- /**
- * 供灯下单
- * @return mixed
- */
- public function buy(GongdengValidator $validate){
- $params = $validate->check(request()->all(),'buy');
- if(!is_array($params)){
- return message($params, false);
- }
- return $this->service->buy($this->userId);
- }
- }
|