作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

@@ -92,9 +92,15 @@ class AdminEquipmentController extends AdminBaseController{ @@ -92,9 +92,15 @@ class AdminEquipmentController extends AdminBaseController{
92 } 92 }
93 93
94 public function editPost(){ 94 public function editPost(){
95 - $data=$this->request->post(); 95 + $param=$this->request->post();
  96 + $id=$param['id'];
  97 + $data=[
  98 + 'serial_number'=>$param['serial_number'],
  99 + 'hospital'=>$param['hospital'],
  100 + 'note'=>$param['note']
  101 + ];
96 $Equipment=new EquipmentModel(); 102 $Equipment=new EquipmentModel();
97 - $res=$Equipment->save($data); 103 + $res=$Equipment->save($data,['id'=>$id]);
98 if ($res){ 104 if ($res){
99 $this->apiResponse(200,'保存成功'); 105 $this->apiResponse(200,'保存成功');
100 }else{ 106 }else{
@@ -207,6 +207,7 @@ @@ -207,6 +207,7 @@
207 url:"{:url('AdminEquipment/editPost')}", 207 url:"{:url('AdminEquipment/editPost')}",
208 type:"POST", 208 type:"POST",
209 data:{ 209 data:{
  210 + id:id,
210 serial_number:data.serial_number, 211 serial_number:data.serial_number,
211 // mac_address:data.mac_address, 212 // mac_address:data.mac_address,
212 // name:data.name, 213 // name:data.name,