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