实名认证对接--ok

This commit is contained in:
yml2213
2026-05-29 14:00:52 +08:00
parent f89e694fd0
commit f386fcc552
11 changed files with 465 additions and 6 deletions
+12
View File
@@ -15,6 +15,7 @@ type Config struct {
JWTSecret string
Storage StorageConfig
SMS SMSConfig
Realname RealnameConfig
Log LogConfig
}
@@ -34,6 +35,12 @@ type SMSConfig struct {
AliyunLoginTemplateCode string
}
type RealnameConfig struct {
Provider string
CloudMarketURL string
CloudMarketAppCode string
}
type LogConfig struct {
Level string
Dir string
@@ -64,6 +71,11 @@ func Load() Config {
AliyunSignName: getEnv("ALIYUN_SMS_SIGN_NAME", ""),
AliyunLoginTemplateCode: getEnv("ALIYUN_SMS_LOGIN_TEMPLATE_CODE", ""),
},
Realname: RealnameConfig{
Provider: getEnv("REALNAME_PROVIDER", "mock"),
CloudMarketURL: getEnv("REALNAME_CLOUDMARKET_URL", "https://sinocheck2.market.alicloudapi.com/fortest/ttttt"),
CloudMarketAppCode: getEnv("REALNAME_CLOUDMARKET_APPCODE", ""),
},
Log: LogConfig{
Level: getEnv("LOG_LEVEL", "info"),
Dir: getEnv("LOG_DIR", "logs"),