From f1d35cabba6f9fa4701f491b4c89ab06370f6117 Mon Sep 17 00:00:00 2001 From: lzh <18320341470> Date: Thu, 26 Jun 2025 11:09:45 +0800 Subject: [PATCH] sms_tool --- sms_tool/sms_client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sms_tool/sms_client.go b/sms_tool/sms_client.go index 00c6a95..efc88d6 100644 --- a/sms_tool/sms_client.go +++ b/sms_tool/sms_client.go @@ -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("验证码类型错误,请联系管理员") }