d5e87fe9 by yangjianbin

init

1 parent 80a7229f
......@@ -86,6 +86,9 @@ class CheckLogin
if (!$session->loanNatureEnum) {
$session->loanNatureEnum = $this->getLoanNatureEnum();
}
if (!$session->sourceBaseType) {
$session->sourceBaseType = $this->getSourceBaseType();
}
/*if (preg_match("/admin|base/i", uri_string())) {
if(!$this->CI->session->isadmin){
redirect('login');
......@@ -333,4 +336,16 @@ class CheckLogin
}
}
private function getSourceBaseType()
{
try {
$url = $this->CI->config->item('apiBaseUrl') . 'order/ordersource/baseType';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
} catch (Exception $e) {
return array();
}
}
}
\ No newline at end of file
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!