fix: 修复网站配置bug

This commit is contained in:
tangtanglove
2024-10-03 08:02:12 +08:00
parent 59750edcf7
commit 4f127d64f6
2 changed files with 4 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ func (p *WebConfig) BeforeCreating(ctx *builder.Context) map[string]interface{}
}
if config["type"] == "picture" || config["type"] == "file" {
if config["value"] != nil {
if config["value"] != nil && config["value"] != "" {
// json字符串
if strings.Contains(config["value"].(string), "{") {
var jsonData interface{}
@@ -151,6 +151,8 @@ func (p *WebConfig) BeforeCreating(ctx *builder.Context) map[string]interface{}
data[config["name"].(string)] = arrayData
}
}
} else {
data[config["name"].(string)] = nil
}
}
}

View File

@@ -22,7 +22,7 @@ const (
AppName = "QuarkGo"
// 版本号
Version = "2.4.4"
Version = "2.4.5"
// 包名
PkgName = "github.com/quarkcloudio/quark-go/v2"