0223b292 by yangjianbin

init

1 parent a39e00fe
......@@ -19,6 +19,12 @@ class CheckLogin
if (!$session->orderStatus) {
$session->orderStatus = $this->getOrderStatus();
}
if (!$session->departments) {
$session->departments = $this->getDepartment();
}
if (!$session->customerManagers) {
$session->customerManagers = $this->getCustomerManagers();
}
/*if (preg_match("/admin|base/i", uri_string())) {
if(!$this->CI->session->isadmin){
......@@ -50,4 +56,20 @@ class CheckLogin
return $products;
}
private function getDepartment()
{
$url = 'http://151.28ms.com:8088/department/getTree';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
}
private function getCustomerManagers()
{
$url = 'http://151.28ms.com:8088/system/user/getAllCustomerManager';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
}
}
\ No newline at end of file
......
......@@ -17,9 +17,9 @@
<span class="select-box">
<select class="select table_search" name="departmentId" size="1" column="6">
<option value="" selected>网点</option>
<option value="1">菜单一</option>
<option value="2">菜单二</option>
<option value="3">菜单三</option>
<?php foreach ($this->session->departments as $k=>$v):?>
<option value="<?=$v->id?>"><?=$v->name?></option>
<?php endforeach;?>
</select>
</span>
</div>
......@@ -37,9 +37,9 @@
<span class="select-box">
<select class="select table_search" name="createUser" size="1" column="10">
<option value="" selected>客户经理</option>
<option>李四</option>
<option>菜单二</option>
<option>菜单三</option>
<?php foreach ($this->session->customerManagers as $k=>$v):?>
<option value="<?=$v->id?>"><?=$v->name?></option>
<?php endforeach;?>
</select>
</span>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!