init
Showing
2 changed files
with
14 additions
and
3 deletions
| ... | @@ -52,9 +52,17 @@ class Perm extends CI_Controller { | ... | @@ -52,9 +52,17 @@ class Perm extends CI_Controller { |
| 52 | $this->load->view('perm/roleAdd'); | 52 | $this->load->view('perm/roleAdd'); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | public function roleEdit() | 55 | public function roleEdit($id) |
| 56 | { | 56 | { |
| 57 | $this->load->view('perm/roleEdit'); | 57 | $url = $this->CI->config->item('apiBaseUrl') . 'system/role/get/'.$id; |
| 58 | $result = file_get_contents($url); | ||
| 59 | $json = json_decode($result); | ||
| 60 | $ret = $json->data; | ||
| 61 | $data = array( | ||
| 62 | 'item'=>$ret, | ||
| 63 | 'id'=>$id | ||
| 64 | ); | ||
| 65 | $this->load->view('perm/roleEdit', $data); | ||
| 58 | } | 66 | } |
| 59 | 67 | ||
| 60 | public function organization() | 68 | public function organization() | ... | ... |
| ... | @@ -2,6 +2,9 @@ | ... | @@ -2,6 +2,9 @@ |
| 2 | 2 | ||
| 3 | <body> | 3 | <body> |
| 4 | <div class="panel panel-default"> | 4 | <div class="panel panel-default"> |
| 5 | <form action=""> | ||
| 6 | <input type="hidden" value="<?=$id?>" name="id"> | ||
| 7 | </form> | ||
| 5 | <div class="panel-body"> | 8 | <div class="panel-body"> |
| 6 | <div class="row cl"> | 9 | <div class="row cl"> |
| 7 | <!--<div class="form-group col-sm-3 col-md-2"> | 10 | <!--<div class="form-group col-sm-3 col-md-2"> |
| ... | @@ -14,7 +17,7 @@ | ... | @@ -14,7 +17,7 @@ |
| 14 | </div>--> | 17 | </div>--> |
| 15 | <div class="form-group col-sm-3 col-md-2"> | 18 | <div class="form-group col-sm-3 col-md-2"> |
| 16 | <label>角色</label> | 19 | <label>角色</label> |
| 17 | <input type="text" class="form-control input-text" value=""> | 20 | <input type="text" class="form-control input-text" value="<?=$item->nameZh?>"> |
| 18 | </div> | 21 | </div> |
| 19 | </div> | 22 | </div> |
| 20 | <div class="row cl"> | 23 | <div class="row cl"> | ... | ... |
-
Please register or sign in to post a comment