OrderController.php 808 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace addons\WechatVideoShop\backend\controllers;
  3. use addons\WechatVideoShop\common\service\OrderService;
  4. class OrderController extends BaseController
  5. {
  6. public $enableCsrfValidation = false;
  7. /**
  8. * @return string
  9. */
  10. public function actionIndex()
  11. {
  12. if ($this->request->isAjax) {
  13. if ($this->request->isGet) {
  14. $param = \Yii::$app->request->get();
  15. $service = new OrderService();
  16. $list = $service->getOrderList($this->mall_id, $param);
  17. if ($list === false) {
  18. return $this->error($service->getError());
  19. }
  20. return $this->success('数据请求成功', $list);
  21. }
  22. }
  23. return $this->render($this->action->id);
  24. }
  25. }