2 Commits

Author SHA1 Message Date
yuguojian
0237a95a43 Merge remote-tracking branch 'origin/feature/sms_tool' 2025-06-26 11:12:29 +08:00
lzh
f1d35cabba sms_tool 2025-06-26 11:09:45 +08:00

View File

@@ -76,6 +76,10 @@ func (c *SmsClient) GetCode(ctx context.Context, key string) (code string, err e
switch value.(type) { switch value.(type) {
case string: case string:
return value.(string), nil return value.(string), nil
case float64:
return fmt.Sprintf("%d", int(value.(float64))), nil
case int64:
return fmt.Sprintf("%d", int(value.(int64))), nil
default: default:
return "", errors.New("验证码类型错误,请联系管理员") return "", errors.New("验证码类型错误,请联系管理员")
} }