d5e87fe9 by yangjianbin

init

1 parent 80a7229f
...@@ -86,6 +86,9 @@ class CheckLogin ...@@ -86,6 +86,9 @@ class CheckLogin
86 if (!$session->loanNatureEnum) { 86 if (!$session->loanNatureEnum) {
87 $session->loanNatureEnum = $this->getLoanNatureEnum(); 87 $session->loanNatureEnum = $this->getLoanNatureEnum();
88 } 88 }
89 if (!$session->sourceBaseType) {
90 $session->sourceBaseType = $this->getSourceBaseType();
91 }
89 /*if (preg_match("/admin|base/i", uri_string())) { 92 /*if (preg_match("/admin|base/i", uri_string())) {
90 if(!$this->CI->session->isadmin){ 93 if(!$this->CI->session->isadmin){
91 redirect('login'); 94 redirect('login');
...@@ -333,4 +336,16 @@ class CheckLogin ...@@ -333,4 +336,16 @@ class CheckLogin
333 } 336 }
334 } 337 }
335 338
339 private function getSourceBaseType()
340 {
341 try {
342 $url = $this->CI->config->item('apiBaseUrl') . 'order/ordersource/baseType';
343 $res = json_decode(file_get_contents($url));
344 $products = $res->data;
345 return $products;
346 } catch (Exception $e) {
347 return array();
348 }
349 }
350
336 } 351 }
...\ No newline at end of file ...\ 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!