Form.php 928 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\form\shopapi\controller;
  11. use app\shopapi\controller\BaseApi;
  12. use addon\form\model\Form as FormModel;
  13. /**
  14. * 表单管理
  15. * @author Administrator
  16. *
  17. */
  18. class Form extends BaseApi
  19. {
  20. /**
  21. * 获取表单列表
  22. */
  23. public function lists()
  24. {
  25. $form_type = $this->params[ 'form_type' ] ?? 'goods';
  26. $res = ( new FormModel() )->getFormList([ [ 'site_id', '=', $this->site_id ], [ 'form_type', '=', $form_type ], [ 'is_use', '=', 1 ] ], 'id desc', 'id, form_name');
  27. return $this->response($res);
  28. }
  29. }