微信接口的RPC包
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
  1. package weixinrpc
  2. import (
  3. "testing"
  4. )
  5. func Test_SendUniformMessage(t *testing.T) {
  6. db := "gkxy_tetele_net"
  7. site_id := "1111"
  8. appid := "wx5ef4ad840cb3d269"
  9. secret := "a937a3f5ac918ebba171deefe2c2ab60"
  10. touser := "ox7nK5OQNuAfNAeIWVE8CsVL6D94" //"oDTib5KC5uX5rVivTnbK-sFkrC2Q" //
  11. mp_appid := "wx5ef4ad840cb3d269"
  12. temp_id := "VDpSj4VVJTH8-wVDp2t3izAuXXl79JYb0l6lezN4kig"
  13. url := ""
  14. mini_program := map[string]string{
  15. "appid": "wx5ef4ad840cb3d269",
  16. "pagepath": "pages/order/index",
  17. }
  18. data := map[string]map[string]string{
  19. "first": map[string]string{"value": "商城小程序"},
  20. "keyword1": map[string]string{"value": "961617783456"},
  21. "keyword2": map[string]string{"value": "测试商家"},
  22. "keyword3": map[string]string{"value": "顾曾"},
  23. "keyword4": map[string]string{"value": "18607565510"},
  24. "keyword5": map[string]string{"value": "香洲区测试用"},
  25. "remark": map[string]string{"value": "下单备注"},
  26. }
  27. // data_json, _ := json.Marshal(data)
  28. //, "49.232.85.91:17969"
  29. ret, err := SendUniformMessage(db, site_id, appid, secret, touser, mp_appid, temp_id, url, mini_program, data)
  30. t.Log(ret, err)
  31. }