Commit c3731410 authored by zhuwei's avatar zhuwei

模型修改优化

parent 26f649d6
...@@ -241,10 +241,10 @@ class Supervise extends Basic ...@@ -241,10 +241,10 @@ class Supervise extends Basic
return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]); return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]);
} }
$res = $this->aSuperviseModel->saveSupervise($params['agent_id'],$params['agent_name'],$params['remark'],$params['img'],$params['address']); $res = $this->aSuperviseModel->saveSupervise(['agent_id' => $params['agent_id'],'agent_name' => $params['agent_name'],'remark' => $params['remark'],'img' => $params['img'],'address' => $params['address']]);
//dump($UPhoneFollowPp->id);exit; //dump($UPhoneFollowPp->id);exit;
if ($res) { if ($res) {
return $this->response("200", "success!", $this->aSuperviseModel->id); return $this->response("200", "success!",$res);
} else { } else {
return $this->response("101", "失败!"); return $this->response("101", "失败!");
} }
......
...@@ -96,7 +96,7 @@ class Basic extends Controller ...@@ -96,7 +96,7 @@ class Basic extends Controller
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1]; $requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口 //过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) { if (!in_array(trim($requestPath), $this->filterVerify)) {
// $this->tokenVerify(); $this->tokenVerify();
// $this->userAuth(trim($requestPath)); // $this->userAuth(trim($requestPath));
} }
unset($this->params["AuthToken"]); unset($this->params["AuthToken"]);
......
...@@ -22,18 +22,8 @@ class ASuperviseModel extends Model ...@@ -22,18 +22,8 @@ class ASuperviseModel extends Model
$this->db_model = Db::name($this->table); $this->db_model = Db::name($this->table);
} }
public function saveSupervise($agent_id,$agent_name,$remark,$img,$address) { public function saveSupervise($data) {
return $this->insert($data);
$this->agent_id = $agent_id;
$this->agent_name = $agent_name;
$this->remark = $remark;
$this->img = $img;
$this->address = $address;
$this->create_time = date("Y-m-d h:i:sa", time());
$this->update_time = date("Y-m-d h:i:sa", time());
$this->save();
return $this->id;
} }
public function findSuperviseList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params = '') { public function findSuperviseList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params = '') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment