|
@@ -12,27 +12,27 @@ public $post = "";
|
|
|
public function __construct(App $app){
|
|
|
parent::__construct($app);
|
|
|
$this->post = $this->request->post();
|
|
|
- $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
- if($token==""){
|
|
|
- return error_show(101,'token不能为空');
|
|
|
- }
|
|
|
- $effetc = VerifyTokens($token);
|
|
|
- if(!empty($effetc) && $effetc['code']!=0){
|
|
|
- return error_show($effetc['code'],$effetc['message']);
|
|
|
- }
|
|
|
+// $token = isset($this->post['token']) ? trim($this->post['token']) : "";
|
|
|
+// if($token==""){
|
|
|
+// return error_show(101,'token不能为空');
|
|
|
+// }
|
|
|
+// $effetc = VerifyTokens($token);
|
|
|
+// if(!empty($effetc) && $effetc['code']!=0){
|
|
|
+// return error_show($effetc['code'],$effetc['message']);
|
|
|
+// }
|
|
|
}
|
|
|
/*列表*/
|
|
|
public function list(){
|
|
|
$page = isset($this->post['page']) && $this->post['page'] != "" ? intval($this->post['page']) : 1;
|
|
|
$size = isset($this->post['size']) && $this->post['size'] != "" ? intval($this->post['size']) : 10;
|
|
|
- $where = ['is_del'=>0];
|
|
|
+ $where = [['is_del',"=",0]];
|
|
|
$name = isset($this->post['name']) && $this->post['name'] !== "" ? trim($this->post['name']) : "";
|
|
|
if ($name !== "") {
|
|
|
- $where['name'] = ["like", "%$name%"];
|
|
|
+ $where[] = ["name","like", "%{$name}%"];
|
|
|
}
|
|
|
$code = isset($this->post['code']) && $this->post['code'] !== "" ? trim($this->post['code']) : "";
|
|
|
if ($code !== "") {
|
|
|
- $where['code'] = $code;
|
|
|
+ $where[] = ["code","=", $code];
|
|
|
}
|
|
|
// $source = isset($this->post['source']) && $this->post['source'] !== "" ? trim($this->post['source']) : "";
|
|
|
// if ($source !== "") {
|