新增admin

This commit is contained in:
yan.y
2024-03-29 22:05:43 +08:00
parent f716403e8e
commit 53e9f1cbab
12 changed files with 1223 additions and 24 deletions
+14 -6
View File
@@ -37,9 +37,13 @@ func BeforeTestMainGin(party func(wi *web_gin.WebServer), seed func(wi *web_gin.
if mysqlPwd != "" {
database.CONFIG.Password = mysqlPwd
}
mysqlAddr := g.TestMysqlAddr
if mysqlAddr != "" {
database.CONFIG.Path = mysqlAddr
mysqlAddrIp := g.TestMysqlIp
if mysqlAddrIp != "" {
database.CONFIG.Ip = mysqlAddrIp
}
mysqlPort := g.TestMysqlPort
if mysqlPort != 0 {
database.CONFIG.Port = mysqlPort
}
database.CONFIG.LogMode = true
@@ -91,9 +95,13 @@ func BeforeTestMainIris(party func(wi *web_iris.WebServer), seed func(wi *web_ir
if mysqlPwd != "" {
database.CONFIG.Password = mysqlPwd
}
mysqlAddr := g.TestMysqlAddr
if mysqlAddr != "" {
database.CONFIG.Path = mysqlAddr
mysqlAddrIp := g.TestMysqlIp
if mysqlAddrIp != "" {
database.CONFIG.Ip = mysqlAddrIp
}
mysqlPort := g.TestMysqlPort
if mysqlPort != 0 {
database.CONFIG.Port = mysqlPort
}
database.CONFIG.LogMode = true