7c331cc4 by yangjianbin

init

1 parent b0af62fd
......@@ -12,6 +12,10 @@ class CheckLogin
/** * 权限认证 */
public function check()
{
$session = $this->CI->session;
if (!$session->products) {
$session->products = getProduct();
}
/*if (preg_match("/admin|base/i", uri_string())) {
if(!$this->CI->session->isadmin){
......@@ -26,4 +30,13 @@ class CheckLogin
}
}*/
}
private function getProduct()
{
$url = 'http://151.28ms.com:8088/config/products/';
$res = json_decode(file_get_contents($url));
$products = $res->data;
return $products;
}
}
\ 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!