更新小程序和管理后台配置,将 API 地址切换为生产环境。新增撤回打款功能,允许用户在特定状态下撤回打款请求,并优化相关页面交互。更新文档以反映新的流程图,确保用户体验一致性。
This commit is contained in:
@@ -118,7 +118,14 @@ func WithdrawPost(c *gin.Context) {
|
||||
if err := db.Where("config_key = ?", "referral_config").First(&refCfg).Error; err == nil {
|
||||
var config map[string]interface{}
|
||||
if _ = json.Unmarshal(refCfg.ConfigValue, &config); config != nil {
|
||||
if enabled, ok := config["enableAutoWithdraw"].(bool); ok && enabled {
|
||||
enabled := false
|
||||
switch v := config["enableAutoWithdraw"].(type) {
|
||||
case bool:
|
||||
enabled = v
|
||||
case float64:
|
||||
enabled = v != 0
|
||||
}
|
||||
if enabled {
|
||||
go func(id string) {
|
||||
if _, e := doApproveWithdrawal(db, id); e != nil {
|
||||
fmt.Printf("[WithdrawPost] 自动审批失败 id=%s: %v\n", id, e)
|
||||
|
||||
Reference in New Issue
Block a user