这是自定义的错误,把微信原始错误发出来
服务号模板消息提示内容不合法?[图片]对应的模板ID:[图片] 有人解决一下吗?急用
2022-09-13这是两个api,怎么同时调用?如果能,为啥要分两个api?
小程序订阅一次订阅和设备消息能同时存在吗?wx.requestSubscribeDeviceMessagewx.requestSubscribeMessage能同时存在吗?一部分用设备消息 一部分用一次订阅消息
2022-09-13没理解 怎么个共用?
各位大佬救指导,微信小程序如何实现多个页面共用一个数据库集合?各位大佬救指导,微信小程序如何实现多个页面共用一个数据库集合? [图片][图片]
2022-09-13异步问题,代码不是按顺序执行的 社区高频问题
wx.getStorage得到数据赋值给一个var变量后,无法打印这个变量,显示为空,看看什么情况?[图片]
2022-09-11下载图片能用json接收?
post请求,接口响应时乱码@GetMapping("/generateQrCode") public R generateQrCode(@RequestParam("orgId") Long orgId) { String result = ""; DataOutputStream dataOutputStreamSend = null; InputStream inputStream = null; ByteArrayOutputStream dataOutputStream = null; try { String token = HttpUtil.get(StrUtil.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}", appId, appSecret)); if (StringUtils.isNotBlank(token)) { String accessToken = JSON.parseObject(token).getString("access_token"); HashMap<String, Object> requestMap = new HashMap<>(); requestMap.put("page", "pages/addFace/addFace"); requestMap.put("env_version", "release"); requestMap.put("scene", "orgId=" + orgId); requestMap.put("check_path", true); log.info("requestMap: {}", JSON.toJSON(requestMap)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(requestMap)); System.out.println("访问POST请求:{}" + StrUtil.format("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={}", accessToken)); HttpURLConnection httpConn = null; BufferedReader in = null; String url = StrUtil.format("https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={}", accessToken); URL realUrl = new URL(url); // 打开和URL之间的连接 HttpURLConnection conn = (HttpURLConnection) realUrl.openConnection(); // 设置超时时间 conn.setConnectTimeout(10 * 1000); conn.setReadTimeout(30 * 1000); conn.setRequestMethod("POST"); // 设置通用的请求属性 conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); conn.setRequestProperty("Charset", "UTF-8"); // 设置链接状态 conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); // post请求,参数要放在http正文内,因此需要设为true, 默认情况下是false; conn.setDoOutput(true); // 设置是否从httpUrlConnection读入,默认情况下是true; conn.setDoInput(true); // Post 请求不能使用缓存 conn.setUseCaches(false); // 设置本次连接是否自动处理重定向 conn.setInstanceFollowRedirects(true); conn.connect(); // ++++++++++++++++++++++++++++++++++ // TODO 写入参数 // 基本类型和字符串使用DataOutputStream dataOutputStreamSend = new DataOutputStream(conn.getOutputStream()); dataOutputStreamSend.write(JSON.toJSONString(requestMap).getBytes()); dataOutputStreamSend.flush(); // +++++++++++++++++++++++++++++++ if (conn.getResponseCode() == 200) { // 获取返回流 result = getResult(conn.getInputStream()); } } return R.ok(result); } catch (MalformedURLException e) { // url格式错误 e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally { // 关闭相应的流 } return R.ok(false); }
2022-09-09是同一个token吗?对比下所有参数看看,总不能说不支持java吧,我用的就没问题
公众号模板消息推送功能,使用java程序总是提示40003,使用postman无问题,有人懂吗?[图片][图片]
2022-09-08最低运行实例设置为1
微信云托管是否有守护进程功能?目前我们的后端业务部署到了微信云托管,我们执行的守护进程无效,想咨询一下官方,微信云托管目前支持守护进程吗?具体如何操作?谢谢!
2022-09-08代码里提示的?
公众号后台配置了白名单 还是提示不在白名单中?invalid ip 49.233.9.126 ipv6 ::ffff:49.233.9.126, not in whitelist rid: 63195abe-76443601-01ac927e 微信官方测试工具获取token没问题
2022-09-08https://developers.weixin.qq.com/miniprogram/dev/wxcloud/reference-sdk-api/database/aggregate/Aggregate.lookup.html 看完再说
小程序云开发 联表查询lookup查两个表的不同数据?exports.main = async (event, context) => { return await db.collection('user').aggregate() .lookup({ from: 'pingjia', localField: 'username', foreignField: 'username', as: 'list', }) .addFields({ size: $.size('$list') }) .match({ shitang : '1号食堂', size: 0 }) .limit(1000) .end() user 用户表,带有shitang 字段,带有username字段 pingjia 评价表,带有shitang 字段,username字段,月份字段riqi, 用户每个月都可以对食堂提出一次评价,用以上的方面只能得到该食堂在所有月份中得到未进行评价的用户, 如何对pingjia 评价表进行条件限制,比如查询8月份谁未评价。 pingjia表中的riqi,有6月份,7月份,8月份等等 match是对表user 进行条件限制,如果对pingjia 的riqi字段进行条件限制
2022-09-08好难猜啊 你打着马赛克 说个序号3,有啥意思 推送啥消息?接口返回的啥?
公众号测试的消息推送只能给自己推送,其他人也关注这个测试号。只有自己能收到消息,其它人收到不呢?[图片]
2022-09-07