This commit is contained in:
lzh 2025-06-26 11:09:45 +08:00
parent 2e8f0cb3f2
commit f1d35cabba

View File

@ -76,6 +76,10 @@ func (c *SmsClient) GetCode(ctx context.Context, key string) (code string, err e
switch value.(type) {
case string:
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:
return "", errors.New("验证码类型错误,请联系管理员")
}