| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace addons\YunfastPay\backend\controllers;
- use addons\YunfastPay\common\services\AgentService;
- use common\enums\ApiStatusEnum;
- /**
- * 代付订单控制器
- * @package addons\YunfastPay\backend\controllers
- */
- class AgentController extends BaseController
- {
- public $enableCsrfValidation = false;
- /**
- * @var AgentService
- */
- private $service;
- public function init()
- {
- parent::init();
- $this->service = new AgentService(
- ['mall_id' => $this->mall_id]
- );
- }
- /**
- * 设置页面
- *
- * @return void
- */
- public function actionIndex()
- {
- if ($this->request->isAjax) {
- return $this->success(
- 'ok',
- $this->service->getPageList(
- array_merge(
- $this->request->post(),
- $this->request->get()
- )
- ),
- ApiStatusEnum::CODE_SUCCESS,
- 0
- );
- }
-
- return $this->render('index');
- }
- }
|