- 小程序上传素材图片问题?
用的httpClient,相关代码如下 String result=null; //文件名 String fileName = file.getName(); MultipartEntityBuilder mBuilder = MultipartEntityBuilder.create(); mBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); mBuilder.addBinaryBody("media", file, ContentType.DEFAULT_BINARY, fileName); HttpEntity he = mBuilder.build(); SSLContext context = getTrustAllSSLContext(); SSLConnectionSocketFactory factory = new SSLConnectionSocketFactory(context); CloseableHttpClient client = HttpClients.custom().setSSLSocketFactory(factory).build(); try { HttpPost post = wxPost(url); post.setEntity(he); CloseableHttpResponse reponse = client.execute(post); try { HttpEntity entity = reponse.getEntity(); result = EntityUtils.toString(entity); EntityUtils.consume(entity); } finally { reponse.close(); } } finally { client.close(); } return result; 返回的是{"errcode":40005,"errmsg":"invalid file type hint: [iIdHwA05760016] rid: 5fb4ae20-29f4fcd2-69b1e7b1"}
2020-11-18 - 小程序订阅消息问题?
请求参数:{"data":"{\"time3\":{\"value\":\"2020年11月17日 00:00\"},\"thing2\":{\"value\":\"孕妈有礼测试005\"},\"thing4\":{},\"time7\":{\"value\":\"2020年11月16日 13:18\"}}","template_id":"YJ8vrqw08rZoH**********nNs6hZjuymKgBwU","touser":"o89a15NlAsPq*****zAQAfGRlA"} 返回参数:{"errcode":47003,"errmsg":"argument invalid! data.time3.value is emtpy rid: 5fb20de0-60d59e4b-4486d0ed"} data.time3.value不为空啊,为啥?
2020-11-16 - 小程序订阅消息问题?
请求参数:{"data":"{\"time3\":{\"value\":\"2020年11月14日 00:00\"},\"thing2\":{\"value\":\"*****测试004\"},\"thing4\":{},\"time7\":{\"value\":\"2020年11月13日 15:42\"}}","templateId":"YJ8vrqw08rZoH1**********s6hZjuymKgBwU","touser":"o89a15G**********SklSN50Q"} 返回参数:{"errcode":40037,"errmsg":"invalid template_id rid: 5fae3a30-02167c9f-1d3f5ad6"} 确认了templateId是正确的啊,为啥啊???
2020-11-13 - 小程序订阅消息返回40037,还有个rid是什么?
{"errcode":40037,"errmsg":"invalid template_id rid: 5fadf892-0026eb0b-2c3d443d"}
2020-11-13