附近的小程序

添加地点

  1. MiniProgramApp.NearbyPoi.Add(ctx, &request.RequestNearbyPoiAdd{
  2. IsCommNearby: "1", //值固定
  3. KfInfo: "{\"open_kf\":true,\"kf_headimg\":\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"kf_name\":\"Harden\"}",
  4. PicList: "{\"list\":[\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITqmP914zSwhajIEJzUPpx40P7R8fRe1QmicneQMhFzpZNhSLjrvU1pIA/0?wx_fmt=jpeg\",\"http://mmbiz.qpic.cn/mmbiz_jpg/kKMgNtnEfQzDKpLXYhgo3W3Gndl34gITRneE5FS9uYruXGMmrtmhsBySwddEWUGOibG8Ze2NT5E3Dyt79I0htNg/0?wx_fmt=jpeg\"]}",
  5. ServiceInfos: "{\"service_infos\":[{\"id\":2,\"type\":1,\"name\":\"快递\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"},{\"id\":0,\"type\":2,\"name\":\"自定义\",\"appid\":\"wx1373169e494e0c39\",\"path\":\"index\"}]}",
  6. StoreName: "羊村小马烧烤",
  7. ContractPhone: "111111111",
  8. Hour: "00:00-11:11",
  9. CompanyName: "深圳市腾讯计算机系统有限公司",
  10. Credential: "156718193518281",
  11. Address: "新疆维吾尔自治区克拉玛依市克拉玛依区碧水路15-1-8号(碧水云天广场)",
  12. QualificationList: "3LaLzqiTrQcD20DlX_o-OV1-nlYMu7sdVAL7SV2PrxVyjZFZZmB3O6LPGaYXlZWq",
  13. PoiID: "",
  14. })

微信官方文档

删除地点

  1. MiniProgramApp.NearbyPoi.Delete("[poi_id]")

微信官方文档

查看地点列表

  1. page := 1
  2. pageRows := 100
  3. services.MiniProgramApp.NearbyPoi.GetList(page, pageRows)

微信官方文档

展示/取消展示附近小程序

  1. MiniProgramApp.NearbyPoi.SetShowStatus("[poi_id]", 1) // 0: 不展示 1: 展示

微信官方文档

使用示例

参考: PowerWechatTutorial