From e321c96b2676ae25fe9b0edfd2efe4ce74f3adf3 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 2 Nov 2023 13:36:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sms/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sms/api.go b/sms/api.go index b718d77..d4589cd 100644 --- a/sms/api.go +++ b/sms/api.go @@ -43,7 +43,7 @@ func SmsSend(engine *xorm.Engine, args map[string]interface{}) error { return errors.New("短信不足") } if args["type"] != "mob" { //联江短信数量 - send, err := SmsApiSend(engine, "api.v1.accountNum", map[string]string{}) + send, err := SmsApiSend(engine, "api.v1.accountNum", map[string]interface{}{}) if err != nil { return err } @@ -128,7 +128,7 @@ func SmsSend(engine *xorm.Engine, args map[string]interface{}) error { return nil } -func SmsApiSend(engine *xorm.Engine, method string, args map[string]string) (string, error) { +func SmsApiSend(engine *xorm.Engine, method string, args map[string]interface{}) (string, error) { smsmsgKey := offical.SysCfgByKey(engine, "smsmsg_key") smsmsgAccount := offical.SysCfgByKey(engine, "smsmsg_account") smsWebHost := offical.SysCfgByKey(engine, "sms_web_host") @@ -146,7 +146,7 @@ func SmsApiSend(engine *xorm.Engine, method string, args map[string]string) (str thisUrl += strings.ReplaceAll(method, ".", "/") args["timestamp"] = zhios_third_party_utils.Int64ToStr(time.Now().Unix()) args["account"] = smsmsgAccount - args["key"] = php2go.Md5(smsmsgKey + php2go.Md5(args["timestamp"])) + args["key"] = php2go.Md5(smsmsgKey + php2go.Md5(args["timestamp"].(string))) post, err := zhios_third_party_utils.CurlPost(thisUrl, zhios_third_party_utils.SerializeStr(args), nil) fmt.Println(string(post)) fmt.Println(err)