diff --git a/admin/controllers/sys/admin/Admin.php b/admin/controllers/sys/admin/Admin.php index b0484469..64e20b25 100755 --- a/admin/controllers/sys/admin/Admin.php +++ b/admin/controllers/sys/admin/Admin.php @@ -83,20 +83,6 @@ class Admin extends HD_Controller { $this->data = $this->_get_info(); $data = $this->sysAdmin->get(['id' => $id]); $json = (array)json_decode($data['other_json']); - if(isset($json['cate_id'])) { - $this->data['cate_id'] = array_combine($json['cate_id'], $json['cate_id']); - } - if(isset($json['city_id'])) { - if(is_array($json['city_id'])) { - $this->data['city_id'] = array_combine($json['city_id'], $json['city_id']); - } - } - if(isset($json['platfrom_id']) && is_array($json['platfrom_id'])) { - $this->data['platfrom_id'] = array_combine($json['platfrom_id'], $json['platfrom_id']); - } - if(isset($json['app_id']) && is_array($json['app_id'])) { - $this->data['app_id'] = array_combine($json['app_id'], $json['app_id']); - } $this->data['username'] = $data['username']; $this->data['role_id'] = $data['role_id']; $this->data['mobile'] = $data['mobile']; @@ -145,13 +131,7 @@ class Admin extends HD_Controller { 'username' => $input['username'], 'mobile' => $input['mobile'], 'role_id' => $input['role'], - 'role_id' => $input['role'], - 'other_json' => json_encode([ - 'cate_id' => $input['category'], - 'city_id' => $input['city'], - 'platfrom_id' => $input['platfrom'], - 'app_id' => $input['apps'], - ]), + 'other_json' => json_encode([]), 'password' => password_hash($input['password1'],PASSWORD_BCRYPT), 'c_time' => time(), ]; @@ -172,12 +152,7 @@ class Admin extends HD_Controller { 'username' => $input['username'], 'mobile' => $input['mobile'], 'role_id' => $input['role'], - 'other_json' => json_encode([ - 'cate_id' => $input['category'], - 'city_id' => $input['city'], - 'platfrom_id' => $input['platfrom'], - 'app_id' => $input['apps'], - ]), + 'other_json' => json_encode([]), ]; if($this->sysAdmin->update($upd,['id' => $input['id']])) { return $this->show_json(SYS_CODE_SUCCESS,'修改成功!'); @@ -209,10 +184,6 @@ class Admin extends HD_Controller { private function _get_info() { $data['role'] = $this->sysRole->select(['status' => '1'],'','','','id,name'); - $data['category'] = $this->sysCate->select(['pid' => '0', 'status' => '1']); - $data['city'] = $this->sysCity->select(['status' => '1']); - $data['platfrom'] = array(0=>'总后台',1=>'商家后台'); - $data['apps'] = $this->app_model->select(array(),'','','','id,name'); return $data; } @@ -265,14 +236,10 @@ class Admin extends HD_Controller { { $data = [ 'id' => $this->input->post('id'), - 'category' => $this->input->post('category'), - 'city' => $this->input->post('city[]'), - 'platfrom' => $this->input->post('platfrom[]'), 'username' => trim($this->input->post('username')), 'mobile' => trim($this->input->post('mobile')), 'status' => $this->input->post('status'), 'role' => $this->input->post('role'), - 'apps' => $this->input->post('apps'), 'password1' => trim($this->input->post('password1')), 'password2' => trim($this->input->post('password2')), ]; diff --git a/admin/views/sys/admin/edit.php b/admin/views/sys/admin/edit.php index bc4d3669..d94b4dca 100755 --- a/admin/views/sys/admin/edit.php +++ b/admin/views/sys/admin/edit.php @@ -39,42 +39,6 @@ -