Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0237a95a43 | ||
![]() |
f1d35cabba |
@@ -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("验证码类型错误,请联系管理员")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user