Commit eb9bea37 by 王召彬

test

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