|
|
@ -1,7 +1,6 @@ |
|
|
|
package weixinrpc |
|
|
|
|
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"testing" |
|
|
|
) |
|
|
|
|
|
|
@ -15,7 +14,10 @@ func Test_SendUniformMessage(t *testing.T) { |
|
|
|
mp_appid := "wx056995d61ca222f5" |
|
|
|
temp_id := "6xgj_65KivigMvwdJgiveR4wLXJLDpzsT2-hShczLmU" |
|
|
|
url := "" |
|
|
|
mini_program := "wx7be627d0325135f4" |
|
|
|
mini_program := map[string]string{ |
|
|
|
"appid": "wx7be627d0325135f4", |
|
|
|
"pagepath": "pages/index/index", |
|
|
|
} |
|
|
|
data := map[string]map[string]string{ |
|
|
|
"first": map[string]string{"value": "来新订单了"}, |
|
|
|
"keyword1": map[string]string{"value": "订单号是。。。"}, |
|
|
@ -26,7 +28,7 @@ func Test_SendUniformMessage(t *testing.T) { |
|
|
|
"remark": map[string]string{"value": "这是备注"}, |
|
|
|
} |
|
|
|
|
|
|
|
data_json, _ := json.Marshal(data) |
|
|
|
// 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) |
|
|
|