微信接口的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

  1. package weixinrpc
  2. import (
  3. "testing"
  4. )
  5. func Test_SendUniformMessage(t *testing.T) {
  6. db := "gkxy_tetele_net"
  7. site_id := "1101832"
  8. appid := "wx7be627d0325135f4"
  9. secret := "984c6d213c60419c4f30c159fbbe1ce9"
  10. touser := "osxVD5S0PAh82gyIXSiXCJzM_k6s"
  11. mp_appid := "wx056995d61ca222f5"
  12. temp_id := "6xgj_65KivigMvwdJgiveR4wLXJLDpzsT2-hShczLmU"
  13. url := ""
  14. mini_program := map[string]string{
  15. "appid": "wx7be627d0325135f4",
  16. "pagepath": "pages/index/index",
  17. }
  18. data := map[string]map[string]string{
  19. "first": map[string]string{"value": "小程序商城来新订单了"},
  20. "keyword1": map[string]string{"value": "2002030211223"},
  21. "keyword2": map[string]string{"value": "五饭堂-沙县小吃"},
  22. "keyword3": map[string]string{"value": "王小二"},
  23. "keyword4": map[string]string{"value": "13022336652"},
  24. "keyword5": map[string]string{"value": "5号宿舍"},
  25. "remark": map[string]string{"value": "下单备注"},
  26. }
  27. // data_json, _ := json.Marshal(data)
  28. ret, err := SendUniformMessage(db, site_id, appid, secret, touser, mp_appid, temp_id, url, mini_program, data)
  29. t.Log(ret, err)
  30. }