Commit eb9bea37 by 王召彬

test

parent 412e1549
...@@ -70,7 +70,18 @@ class CfgCenter ...@@ -70,7 +70,18 @@ class CfgCenter
protected static function dbConnect() protected static function dbConnect()
{ {
// 返回数据库连接 if(\env('ENVIRONMENT', '') == '') {
// 返回线上数据库连接
return new \Medoo\Medoo([
'database_type' => 'mysql',
'database_name' => 'config_center',
'server' => '172.21.0.12',
'username' => 'configer',
'password' => 'Cfgsu#2390f*_',
'charset' => 'utf8'
]);
} else {
// 返回测试数据库连接
return new \Medoo\Medoo([ return new \Medoo\Medoo([
'database_type' => 'mysql', 'database_type' => 'mysql',
'database_name' => 'config_center', 'database_name' => 'config_center',
...@@ -80,6 +91,7 @@ class CfgCenter ...@@ -80,6 +91,7 @@ class CfgCenter
'charset' => 'utf8' 'charset' => 'utf8'
]); ]);
} }
}
protected static function parseKeyStr($keyStr) protected static function parseKeyStr($keyStr)
{ {
......
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