getui_sms2

This commit is contained in:
jiangyong27 2025-03-25 17:59:14 +08:00
parent 272f7889b2
commit 62c6809a93
1 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ func (g *GetuiSms) Token() string {
return g.token
}
func (g *GetuiSms) Send(phone string, data map[string]string) error {
func (g *GetuiSms) Send(phone string, data map[string]string) (interface{}, error) {
reqUrl := "https://openapi-smsp.getui.com/v1/sps/push_sms_list"
params := make(map[string]interface{})
@ -91,14 +91,14 @@ func (g *GetuiSms) Send(phone string, data map[string]string) error {
rspBody, err := HttpPostJson(reqUrl, nil, reqBody)
if err != nil {
log.Errorf("http post [%s] error :%s", string(reqBody), err.Error())
return err
return nil, err
}
fmt.Println(string(reqBody), string(rspBody))
_, err = g.getResult(rspBody)
if err != nil {
log.Errorf("get Result error :%s", err.Error())
return err
return nil, err
}
return nil
return nil, nil
}