|
package weixinrpc
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
)
|
|
|
|
func Test_SendUniformMessage(t *testing.T) {
|
|
|
|
db := "gkxy_tetele_net"
|
|
site_id := "1101832"
|
|
appid := "wx7be627d0325135f4"
|
|
secret := "984c6d213c60419c4f30c159fbbe1ce9"
|
|
touser := "osxVD5S0PAh82gyIXSiXCJzM_k6s"
|
|
mp_appid := "wx056995d61ca222f5"
|
|
temp_id := "6xgj_65KivigMvwdJgiveR4wLXJLDpzsT2-hShczLmU"
|
|
url := ""
|
|
mini_program := "wx7be627d0325135f4"
|
|
data := map[string]map[string]string{
|
|
"first": map[string]string{"value": "来新订单了"},
|
|
"keyword1": map[string]string{"value": "订单号是。。。"},
|
|
"keyword2": map[string]string{"value": "取货位置"},
|
|
"keyword3": map[string]string{"value": "收货人"},
|
|
"keyword4": map[string]string{"value": "联系电话"},
|
|
"keyword5": map[string]string{"value": "收货地址"},
|
|
"remark": map[string]string{"value": "这是备注"},
|
|
}
|
|
|
|
data_json, _ := json.Marshal(data)
|
|
|
|
ret, err := SendUniformMessage(db, site_id, appid, secret, touser, mp_appid, temp_id, url, mini_program, data)
|
|
t.Log(ret, err)
|
|
}
|