Express.php 717 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace addons\shopro\controller\data;
  3. use addons\shopro\controller\Common;
  4. use think\Db;
  5. /**
  6. * 快递公司
  7. */
  8. class Express extends Common
  9. {
  10. protected $noNeedLogin = ['index'];
  11. protected $noNeedRight = ['*'];
  12. /**
  13. * 查看
  14. *
  15. * @return string|Json
  16. * @throws \think\Exception
  17. * @throws DbException
  18. */
  19. public function index()
  20. {
  21. $keyword = input('keyword','');
  22. $map = [];
  23. if(!empty($keyword)){
  24. $map['name'] = ['LIKE','%'.$keyword.'%'];
  25. }
  26. $model = new \app\admin\model\shopro\data\Express;
  27. $list = $model->sheepFilter()->where($map)->select();
  28. $this->success(1, $list);
  29. }
  30. }