0223b292 by yangjianbin

init

1 parent a39e00fe
...@@ -19,6 +19,12 @@ class CheckLogin ...@@ -19,6 +19,12 @@ class CheckLogin
19 if (!$session->orderStatus) { 19 if (!$session->orderStatus) {
20 $session->orderStatus = $this->getOrderStatus(); 20 $session->orderStatus = $this->getOrderStatus();
21 } 21 }
22 if (!$session->departments) {
23 $session->departments = $this->getDepartment();
24 }
25 if (!$session->customerManagers) {
26 $session->customerManagers = $this->getCustomerManagers();
27 }
22 28
23 /*if (preg_match("/admin|base/i", uri_string())) { 29 /*if (preg_match("/admin|base/i", uri_string())) {
24 if(!$this->CI->session->isadmin){ 30 if(!$this->CI->session->isadmin){
...@@ -50,4 +56,20 @@ class CheckLogin ...@@ -50,4 +56,20 @@ class CheckLogin
50 return $products; 56 return $products;
51 } 57 }
52 58
59 private function getDepartment()
60 {
61 $url = 'http://151.28ms.com:8088/department/getTree';
62 $res = json_decode(file_get_contents($url));
63 $products = $res->data;
64 return $products;
65 }
66
67 private function getCustomerManagers()
68 {
69 $url = 'http://151.28ms.com:8088/system/user/getAllCustomerManager';
70 $res = json_decode(file_get_contents($url));
71 $products = $res->data;
72 return $products;
73 }
74
53 } 75 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
17 <span class="select-box"> 17 <span class="select-box">
18 <select class="select table_search" name="departmentId" size="1" column="6"> 18 <select class="select table_search" name="departmentId" size="1" column="6">
19 <option value="" selected>网点</option> 19 <option value="" selected>网点</option>
20 <option value="1">菜单一</option> 20 <?php foreach ($this->session->departments as $k=>$v):?>
21 <option value="2">菜单二</option> 21 <option value="<?=$v->id?>"><?=$v->name?></option>
22 <option value="3">菜单三</option> 22 <?php endforeach;?>
23 </select> 23 </select>
24 </span> 24 </span>
25 </div> 25 </div>
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
37 <span class="select-box"> 37 <span class="select-box">
38 <select class="select table_search" name="createUser" size="1" column="10"> 38 <select class="select table_search" name="createUser" size="1" column="10">
39 <option value="" selected>客户经理</option> 39 <option value="" selected>客户经理</option>
40 <option>李四</option> 40 <?php foreach ($this->session->customerManagers as $k=>$v):?>
41 <option>菜单二</option> 41 <option value="<?=$v->id?>"><?=$v->name?></option>
42 <option>菜单三</option> 42 <?php endforeach;?>
43 </select> 43 </select>
44 </span> 44 </span>
45 </div> 45 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!