重构项目结构,将 orm 和 rds 包迁移到 web/globals

This commit is contained in:
2025-05-10 16:59:41 +08:00
parent 37e6e58816
commit d256359681
60 changed files with 363 additions and 349 deletions

10
pkg/env/env.go vendored
View File

@@ -268,7 +268,6 @@ var (
WechatPayPublicKey string
WechatPayApiCert string
WechatPayCallbackUrl string
WechatPayProduction = false
)
func loadWechatPay() {
@@ -312,15 +311,6 @@ func loadWechatPay() {
if WechatPayCallbackUrl == "" {
panic("环境变量 WECHATPAY_CALLBACK_URL 的值不能为空")
}
_WechatPayProduction := os.Getenv("WECHATPAY_PRODUCTION")
if _WechatPayProduction != "" {
value, err := strconv.ParseBool(_WechatPayProduction)
if err != nil {
panic("环境变量 WECHATPAY_PRODUCTION 的值不是布尔值")
}
WechatPayProduction = value
}
}
// endregion