Freight.php 659 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\admin\controller\shop;
  3. use app\common\controller\Backend;
  4. /**
  5. * 运费模板
  6. *
  7. * @icon fa fa-circle-o
  8. */
  9. class Freight extends Backend
  10. {
  11. /**
  12. * Freight模型对象
  13. * @var \app\admin\model\shop\Freight
  14. */
  15. protected $model = null;
  16. protected $noNeedRight = ["getList"];
  17. public function _initialize()
  18. {
  19. parent::_initialize();
  20. $this->model = new \app\admin\model\shop\Freight;
  21. $this->view->assign("typeList", $this->model->getTypeList());
  22. }
  23. public function getList()
  24. {
  25. $list = $this->model->field('id,name')->select();
  26. return json($list);
  27. }
  28. }