收藏
回答

微信小店查询全量商品,返回信息为空?

参考接口使用文档:

https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/product/category.html#2.%E6%9F%A5%E8%AF%A2%E5%85%A8%E9%87%8F%E5%95%86%E5%93%81

使用以下代码发起 get 请求,返回数据中 productList 为空数组

{"errcode":0,"errmsg":"ok","productList":[],"total":29548,"next":20}

static void getWxGoods() throws IOException {

    String url="https://api.weixin.qq.com/union/promoter/product/list";
    Map<String, Object> params=new HashMap<>();
    params.put("access_token","正确的token");
    params.put("from","0");
    params.put("limit","20");
    params.put("query","牙膏");
    System.out.println(params);
    try {
        doGet2(url,params);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }

}

回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签