1
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package weixinapi
|
||||
|
||||
import "git.rosy.net.cn/baseapi/utils"
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
MaxRemarkByteCount = 30
|
||||
@@ -90,6 +93,8 @@ func (a *API) CBMessageTemplateSend(userOpenID, templateID, downloadURL string,
|
||||
if miniProgram != nil {
|
||||
bodyJson["miniprogram"] = miniProgram
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("cgi-bin/message/template/send======================= : %s", utils.Format4Output(bodyJson, false))
|
||||
_, err = a.AccessAPI("cgi-bin/message/template/send", nil, string(utils.MustMarshal(bodyJson)))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func TestCBMessageTemplateSend(t *testing.T) {
|
||||
// "oYN_usk0AeGc_C6VEZfmFQP5VHMQ": 1, // 周小扬
|
||||
// "oYN_ust9hXKEvEv0X6Mq6nlAWs_E": 1, // me
|
||||
// "oYN_usvnObzrPweIgHTad9-uMf78": 1, // 老赵
|
||||
err := api.CBMessageTemplateSend("oYN_uskWlggFxGNZtagNh-cqfTQs", "b8-tLyWwAmK-1tEU1eGqp_YAAqQtSzoVDZkHuyUe9lk", "", map[string]interface{}{
|
||||
err := api.CBMessageTemplateSend("oYN_usjzxL9LBzh_hjf0-E_LGmvs", "b8-tLyWwAmK-1tEU1eGqp_YAAqQtSzoVDZkHuyUe9lk", "", map[string]interface{}{
|
||||
"appid": "wx4b5930c13f8b1170",
|
||||
//"pagepath": "pages/order-manager/main",
|
||||
}, map[string]interface{}{
|
||||
|
||||
@@ -3,6 +3,7 @@ package weixinapi
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math/rand"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
@@ -92,6 +93,8 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
|
||||
params2["access_token"] = accessToken
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("AccessAPI====================== :%s", utils.Format4Output(params2, false))
|
||||
|
||||
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
||||
// baseapi.SugarLogger.Debug(fullURL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user