1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\admin\controller;
- use app\admin\logic\ExpressLogic;
- use app\BaseController;
- use think\exception\ValidateException;
- use think\facade\Config;
- use think\facade\Validate;
- class Express extends BaseController
- {
- //列表
- public function list(){
- $param = $this->request->only(['page'=>1,'size'=>10,'express_code'=>'','express_name'=>'','mobile'=>'','status'=>''],'post');
- return ExpressLogic::list($param);
- }
- //启禁用
- public function status(){
- $param = $this->request->only(['id','status'],'post');
- $val = Validate::rule(Config::get('validate_rules.status'));
- if(!$val->check($param)) throw new ValidateException($val->getError());
- return ExpressLogic::status($param);
- }
- }
|