| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\BaseController;
- use App\Http\Validator\GongdengValidator;
- use App\Services\DevicesService;
- 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();
- $this->deviceService = new DevicesService();
- }
- /**
- * 套餐列表
- * @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 $validator){
- $params = $validator->check(request()->all(),'buy');
- if(!is_array($params)){
- return message($params, false);
- }
- return $this->service->buy($this->userId);
- }
- /**
- * 供灯拍照图片
- * @return array
- */
- public function picList(){
- return $this->deviceService->getPicList();
- }
- }
|