GoodsCategoryController.php 690 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\workerapi\controller;
  3. use app\workerapi\lists\GoodsCategoryLists;
  4. use app\workerapi\logic\GoodsCategoryLogic;
  5. /**
  6. * 用户控制器
  7. * Class GoodsCategoryController
  8. * @package app\api\controller
  9. */
  10. class GoodsCategoryController extends BaseApiController
  11. {
  12. public function lists()
  13. {
  14. return $this->dataLists(new GoodsCategoryLists());
  15. }
  16. public function getQrCode()
  17. {
  18. $result = GoodsCategoryLogic::getQRCode();
  19. if (false === $result) {
  20. return $this->fail(GoodsCategoryLogic::getError());
  21. }
  22. return $this->success('生成二维码', ['qrcode'=>$this->request->domain().'/'.$result], 1, 1);
  23. }
  24. }