Commit 62bcc9b7 by xmy

fix:配置中心修改

parent a6d51ff1
...@@ -11,7 +11,10 @@ $data = $redis->get(CACHE_PREFIX . 'all'); ...@@ -11,7 +11,10 @@ $data = $redis->get(CACHE_PREFIX . 'all');
if (!empty($data)) { if (!empty($data)) {
$db = CfgCenter::dbConnect(); $db = CfgCenter::dbConnect();
$data = $db->select('config', ['name', 'value']); $arr = $db->select('config', ['name', 'value']);
foreach ($arr as $key=>$value){
$data[$value['name']] = json_decode($value['value']);
}
$redis->set(CACHE_PREFIX . 'all', $data); $redis->set(CACHE_PREFIX . 'all', $data);
} }
return $data; return $data;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment