[图片]
[小白]请问wx.getLocation 可以在微信公众号开发里使用吗?// 想要通过api获取用户位置,但是目前定位不精准,只能获取当地市政府的位置。 wx.getLocation({ type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' isHighAccuracy: true, // 启用高精度 highAccuracyExpireTime: 8000, // 超时时间≥3000ms success: function (res) { let latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90 let longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。 console.log("定位结果:"+latitude+","+longitude); alert('定位结果:'+latitude+','+longitude); localStorage.setItem('gps', latitude + ',' + longitude); we.geocoderGps(latitude + ',' + longitude).then(geo => { console.log(geo); alert('返回地图定位结果:'+geo); if (geo.data.code === 200) { localStorage.setItem('address', geo.data.data); } }) } })
04-08直接用稳定版接口吧,token失效说简单也简单,说难也难
wxa/generatescheme接口使用问题调这个接口https://api.weixin.qq.com//wxa/generatescheme的时候,经常返回token失效或不是最新的,我们这边的策略是每小时刷新一次的,不应该出现这个问题的,请帮忙找找原因 另外请提供这个接口https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential,请求参数的appid为wxc40541fccbda2b5a,的近7天的调用情况 是不是使用稳定版https://api.weixin.qq.com/cgi-bin/stable_token 接口可以解决这个问题?
04-08就一定会返回图片吗?
使用Java调用https://api.weixin.qq.com/wxa/getwxacodeun使用Java 调用https://api.weixin.qq.com/wxa/getwxacodeun 获取微信二维码时,生成的二维码图片破损如何解决? public static void generateQrcode(String scene, String page, String filePath) { HttpURLConnection connection = null; try { String accessToken = getAccessToken(); URL url = new URL(WXACODE_URL+"?access_token=" + accessToken); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setRequestProperty("Content-Type", "application/json"); JSONObject requestBody = new JSONObject(); requestBody.put("scene", scene); requestBody.put("page", page); try (OutputStream os = connection.getOutputStream()) { byte[] input = requestBody.toString().getBytes("utf-8"); os.write(input, 0, input.length); } int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { // 读取响应流 try (InputStream is = connection.getInputStream(); FileOutputStream fos = new FileOutputStream(filePath)) { byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = is.read(buffer)) != -1) { fos.write(buffer, 0, bytesRead); } System.out.println("二维码生成成功,保存路径:" + filePath); } } else { System.out.println("请求失败,响应状态码:" + responseCode); } } catch (IOException e) { System.err.println("发生 IO 异常: " + e.getMessage()); } catch (JSONException e) { throw new RuntimeException(e); } finally { if (connection != null) { connection.disconnect(); } } }
04-08没代码,猜不出来
报错HTTP/1.1 500 Internal Server Error 是哪里出问题了?无法正常拍[图片]
04-07麻烦用postman直接请求微信接口截个图
小程序发货信息接口,一直报47001错误,对比了参数都正确,请帮忙看看是怎么回事?{"order_key":{"order_number_type":2,"transaction_id":"4200002599202504076072420514"},"delivery_mode":3,"logistics_type":1,"shipping_list":[{"tracking_no":"","express_company":"","item_desc":"玉文化展成人票等商品"}],"upload_time":"2025-04-07T17:28:03+08:00","payer":{"openid":"oYqmk7X4pNnKYCDz6aJaoqcBdxfA"}} [图片] 这是发送的信息。
04-07在哪引入?无法使用哪个接口?猜猜猜
JSSDK引入后无法使用接口?[图片] [图片] 业务域名也配置了,就是用不了
04-07问题是我获取的openid也多 这句话想表达什么,没看明白
获取用户基本信息(包括UnionID机制)一直40003?https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN 为什么我调用这个接口一直40003,问题是我获取的openid也对 主要我是通过关注和取消关注公众号推送的事件拿到的openid,不知道为什么不对
04-06没有这类api,不要看AI回答
webview使用JSSDK不支持getRecorderManager接口吗?使用startRecord有像onFrameRecorded的方法吗?
04-06你这代码是从哪查的啊 AI回答?
小程序获取webview实例不成功?[图片] [图片] [图片] const webView = this.selectComponent('#webView'); 这行代码一直不生效
04-06[图片]
weui还有人维护吗?文档没有 功能缺失接手了一个weui的项目 组件功能完全不够满足需求的 功能太少可扩展空间完全没有
04-03