|
@@ -7,6 +7,7 @@ import ( |
|
|
"applet/app/utils" |
|
|
"applet/app/utils" |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"github.com/gin-gonic/gin" |
|
|
"github.com/gin-gonic/gin" |
|
|
|
|
|
"strings" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
// GetBasic |
|
|
// GetBasic |
|
@@ -110,7 +111,11 @@ func SetDownDomainBasic(c *gin.Context) { |
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) |
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
svc.SetSysCfgStr("down_web_domain", utils.SerializeStr(req.WebDomain)) |
|
|
|
|
|
|
|
|
domain := utils.SerializeStr(req.WebDomain) |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "http://", "") |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "https://", "") |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "/", "") |
|
|
|
|
|
svc.SetSysCfgStr("down_web_domain", domain) |
|
|
e.OutSuc(c, "success", nil) |
|
|
e.OutSuc(c, "success", nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
@@ -154,8 +159,12 @@ func SetRegisterDomainBasic(c *gin.Context) { |
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) |
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
domain := utils.SerializeStr(req.WebDomain) |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "http://", "") |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "https://", "") |
|
|
|
|
|
domain = strings.ReplaceAll(domain, "/", "") |
|
|
svc.SetSysCfgStr("down_web_open", req.DownWebOpen) |
|
|
svc.SetSysCfgStr("down_web_open", req.DownWebOpen) |
|
|
svc.SetSysCfgStr("down_register_domain", utils.SerializeStr(req.WebDomain)) |
|
|
|
|
|
|
|
|
svc.SetSysCfgStr("down_register_domain", domain) |
|
|
e.OutSuc(c, "success", nil) |
|
|
e.OutSuc(c, "success", nil) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |