- 同样的内容,使用 NodeJS 请求成功,在C#中使用 HttpClient 请求返回签名错误?
https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/business/intracity_service.html 现在的鄙视链都已经这么严重了嘛?同样签名,同样的请求头部,同样的参数。使用NodeJS 的 axios 请求库,可以正常返回。但是在C#中使用HttpClient 却显示签名错误。 为了验证正确性,我都怀疑是我这个写了多年C# 代码的程序员出现了问题,特意的使用 PostMan/ApiPost 进行了测试,断点将 NodeJS 发送的数据和请求头部,全部放入 PostMan/ApiPost 进行了发送请求测试。结果还是得到的这一串: {"errcode":40234,"errmsg":"invalid signature rid: 653249ef-2760901b-3a1f8f59"} OK,OK,OK,说到这里可能并不会有人相信我,现在我就来丢一串视频文件,并且附带两个请求的相关数据。 OK,OK,OK。除了腾讯视频,不支持我上传视频文件是吧???可以,我不上传了,考虑太多因素,本身是想上传服务器的,但是生产服务器,又不敢上传,所以,需要视频的,可以加我微信,我提供给你。 如果官方 需要视频,请及时联系我 微信号:F132951 微信名:小方 放一些参数把,这个是NodeJS 的参数(第一次发现问题保存的) { status: 200, statusText: "OK", headers: { connection: "close", "content-type": "text/plain", date: "Wed, 18 Oct 2023 18:27:31 GMT", "wechatmp-appid": "appid", "wechatmp-timestamp": "1697653651", "wechatmp-serial": "8f60d9c2510d38f3ecaa3b2e8d3b0142", "wechatmp-signature": "foURexH30z6Vq09VmAczYSHYurdmuwDWLMeMgqKm7GlhWkUilS7+35BxIH+RdFHkdqHvmEm7ZPtuyOePyNxyCwnxKAjlNy7+ecKbNlugFEzW4gGjO5f/kL01yqkQeR5Z1UtAot+hADqhaaz+6jtX5CyqUGIGJtS0d+CyD89VnLVk/NjW/DF5J3xIchyHPhytOIiF6gbXCXvaGcu9km8W4fKZOaFfxGAVrHux6PwMVT4Q+j9+HJhunqMG+U2YZLCuLW5oYR7UfHZ9InvNNB3f76nPe64GxPXH81F8zgWqZMJXHBxNZAx2PC99/AEdVMlokoVb6Ij3d2j5cPF3WIYalw==", "content-length": "305", }, config: { headers: { Accept: "application/json, text/plain, */*", "Content-Type": "application/json", "Wechatmp-Appid": "appid", "Wechatmp-TimeStamp": "1697653176", "Wechatmp-Signature": "5LK+EUZQPFu4mdxNMigcddkzy4kbBkZauiaHxqLuM58QCmrf3/EciyXteO3OFe8iCF+oTvLeBC9Eae3ta4mTwAFZrEkOpoxlrUAPyslOvtK0yi3vOgcMyTMZHPPiWICLw9kcruIH6+G5ArQXpQXihLBR8m0ITM/BMds7+gjWKj2mldrNRmsYuJnt9O0bicY7/M0nLdY+qnBO+9q5tT5LZ94akyKYJPr0b/N+a2ZPgJpRJkhZD9YC4SNTeILNRkhSiygXF66WBDyRLNnoGvdHLu4QO199hx4bh/2Cj5b6tmD+pJvCEtFZJTsel+Hsx1ak1+wY+wByS3DTumipqdx8Hg==", "User-Agent": "axios/1.5.1", "Content-Length": "288", "Accept-Encoding": "gzip, compress, deflate, br", }, method: "post", url: "https://api.weixin.qq.com/cgi-bin/express/intracity/queryorder?access_token=73", data: "{\"iv\":\"DOIfvxuZJ2TLRjfc\",\"data\":\"2ozy7HDoW63Nd8BQ8L1U6vCZndN1USXANvA+nMNxHBAgjcGjF/pRNoDUist8+21qzuZ5Es88+NSslKEox2y6o/oMTShrH4dGWrpHORHBijhwdN8fwH1eF5GOPOsbqX4SUHlfDk1sPzxfASOy1amsMYzIDsLeN/jQ9309thRH1NAymjF8eK0t5kOX7EauTZUurEmKw5iIT3GK9ALuowYu1g==\",\"authtag\":\"SjxCh/eAA1Rjas5IbAxDog==\"}", }, request: { _eventsCount: 7, _maxListeners: undefined, outputData: [ ], outputSize: 0, writable: true, destroyed: false, _last: true, chunkedEncoding: false, shouldKeepAlive: false, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: "288", _hasBody: true, _trailer: "", finished: true, _headerSent: true, _closed: false, _header: "POST /cgi-bin/express/intracity/queryorder?access_token=73 HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nContent-Type: application/json\r\nWechatmp-Appid: appid\r\nWechatmp-TimeStamp: 1697653176\r\nWechatmp-Signature: 5LK+EUZQPFu4mdxNMigcddkzy4kbBkZauiaHxqLuM58QCmrf3/EciyXteO3OFe8iCF+oTvLeBC9Eae3ta4mTwAFZrEkOpoxlrUAPyslOvtK0yi3vOgcMyTMZHPPiWICLw9kcruIH6+G5ArQXpQXihLBR8m0ITM/BMds7+gjWKj2mldrNRmsYuJnt9O0bicY7/M0nLdY+qnBO+9q5tT5LZ94akyKYJPr0b/N+a2ZPgJpRJkhZD9YC4SNTeILNRkhSiygXF66WBDyRLNnoGvdHLu4QO199hx4bh/2Cj5b6tmD+pJvCEtFZJTsel+Hsx1ak1+wY+wByS3DTumipqdx8Hg==\r\nUser-Agent: axios/1.5.1\r\nContent-Length: 288\r\nAccept-Encoding: gzip, compress, deflate, br\r\nHost: api.weixin.qq.com\r\nConnection: close\r\n\r\n", _keepAliveTimeout: 0, _onPendingData: () => {}, socketPath: undefined, method: "POST", maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: "/cgi-bin/express/intracity/queryorder?access_token=73_", _ended: true, res: { _readableState: { objectMode: false, highWaterMark: 16384, buffer: { head: null, tail: null, length: 0, }, length: 0, pipes: [ ], flowing: true, ended: true, endEmitted: true, reading: false, constructed: true, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, errored: null, closed: true, closeEmitted: true, defaultEncoding: "utf8", awaitDrainWriters: null, multiAwaitDrain: false, readingMore: true, dataEmitted: true, decoder: null, encoding: null, }, _eventsCount: 4, _maxListeners: undefined, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: "1.1", complete: true, rawHeaders: [ "Connection", "close", "Content-Type", "text/plain", "Date", "Wed, 18 Oct 2023 18:27:31 GMT", "Wechatmp-Appid", "appid", "Wechatmp-TimeStamp", "1697653651", "Wechatmp-Serial", "8f60d9c2510d38f3ecaa3b2e8d3b0142", "Wechatmp-Signature", "foURexH30z6Vq09VmAczYSHYurdmuwDWLMeMgqKm7GlhWkUilS7+35BxIH+RdFHkdqHvmEm7ZPtuyOePyNxyCwnxKAjlNy7+ecKbNlugFEzW4gGjO5f/kL01yqkQeR5Z1UtAot+hADqhaaz+6jtX5CyqUGIGJtS0d+CyD89VnLVk/NjW/DF5J3xIchyHPhytOIiF6gbXCXvaGcu9km8W4fKZOaFfxGAVrHux6PwMVT4Q+j9+HJhunqMG+U2YZLCuLW5oYR7UfHZ9InvNNB3f76nPe64GxPXH81F8zgWqZMJXHBxNZAx2PC99/AEdVMlokoVb6Ij3d2j5cPF3WIYalw==", "Content-Length", "305", ], _consuming: false, _dumped: false, req: [Circular], responseUrl: "https://api.weixin.qq.com/cgi-bin/express/intracity/queryorder?access_token=73_", redirects: [ ], }, _ended: true, _ending: true, _redirectCount: 0, _redirects: [ ], _requestBodyLength: 288, _requestBodyBuffers: [ ], _onNativeResponse: function (response) { self._processResponse(response); }, _currentRequest: [Circular], _currentUrl: "https://api.weixin.qq.com/cgi-bin/express/intracity/queryorder?access_token=73_", }, }, data: { iv: "yhi5QzsMLJY6PNll", data: "jTGIhh3qrOrEuZaNdnCX0KTWxCDFP/lg6UmO0w/WiEaDH0rQK+7v3aO2AAturcKO5AeFoYmv/muAUeeXQGbgphFysVXRrbh8/ZafuIbMFPzbZ3L2s7dCY70AGF13yk4hyJGMjPlgjZIATN+pD4KZ99PPKmjdqCUU3kWFatxjgbS93Aw3xziFKPKWVlqanF41eGEbNYYtGYBO1/eOR2g2dpKXdh1NTSGzuANO", authtag: "9VK7NRTda6zmNwQ9OspeMw==", }, } 这个是 ApiMan 生成的代码参数: 返回数据 { "errcode": 40234, "errmsg": "invalid signature rid: 653023cb-5d07d341-4b375b18" } import axios from "axios"; const options = { method: 'POST', url: 'https://api.weixin.qq.com/cgi-bin/express/intracity/queryorder', params: { access_token: '73_' }, headers: { 'Api-Origin': 'PC', 'App-Origin': 'http://127.0.0.1:2001', 'Wechatmp-Appid': 'appid', 'Wechatmp-TimeStamp': '1697653176', 'Wechatmp-Signature': '5LK+EUZQPFu4mdxNMigcddkzy4kbBkZauiaHxqLuM58QCmrf3/EciyXteO3OFe8iCF+oTvLeBC9Eae3ta4mTwAFZrEkOpoxlrUAPyslOvtK0yi3vOgcMyTMZHPPiWICLw9kcruIH6+G5ArQXpQXihLBR8m0ITM/BMds7+gjWKj2mldrNRmsYuJnt9O0bicY7/M0nLdY+qnBO+9q5tT5LZ94akyKYJPr0b/N+a2ZPgJpRJkhZD9YC4SNTeILNRkhSiygXF66WBDyRLNnoGvdHLu4QO199hx4bh/2Cj5b6tmD+pJvCEtFZJTsel+Hsx1ak1+wY+wByS3DTumipqdx8Hg==', 'content-type': 'application/json' }, data: { iv: 'DOIfvxuZJ2TLRjfc', data: '2ozy7HDoW63Nd8BQ8L1U6vCZndN1USXANvA+nMNxHBAgjcGjF/pRNoDUist8+21qzuZ5Es88+NSslKEox2y6o/oMTShrH4dGWrpHORHBijhwdN8fwH1eF5GOPOsbqX4SUHlfDk1sPzxfASOy1amsMYzIDsLeN/jQ9309thRH1NAymjF8eK0t5kOX7EauTZUurEmKw5iIT3GK9ALuowYu1g==', authtag: 'SjxCh/eAA1Rjas5IbAxDog==' } }; axios.request(options).then(function (response) { console.log(response.data); }).catch(function (error) { console.error(error); }); [图片] 看到了嘛?参数一样,返回的结果不一样,我还有一段12分钟长的视频证据,所以,到底是什么问题呢??? 希望可以尽快的得到一个满意的答复!
2023-10-20 - 微信支付回调一直没有调用?
微信JSAPI支付,微信H5页面,回调一直没有调用。可以帮忙查询一下嘛? 4200001309202203254601342712 4200001317202203262033991284 两个单号,一个是昨天的,一个是今天的,昨天的是通过定时任务修复的。
2022-03-26 - 微信分享失败?
微信分享失败,报错: errMsg: "updateAppMessageShareData:fail, the permission value is offline verifying" errMsg: "updateTimelineShareData:fail, the permission value is offline verifying" [图片] 如图,wx.config() 配置加载正常返回 config:ok,但是JsApiList列表里面没有传入的两个接口。 根据官方文档排查: https://developers.weixin.qq.com/community/develop/doc/000a24a11e8c786fdf29b6dc659c09?highline=%E5%BE%AE%E4%BF%A1%E5%88%86%E4%BA%AB%E5%A4%B1%E8%B4%A5%EF%BC%8C%E6%8A%A5%E9%94%99the%20permission%20value%20is%20offline%20verifying 1. config正确通过。 2. 页面加载的时候调用,确实放在wx.ready 回调中 [图片] 3. config 参数中返回包含了这两个接口信息。 [图片] 公众号设置也配置了这个域名。 其余的业务没有问题,只有这个H5页面存在问题,纯js JQ 代码,不过这个页面做了Nginx二级目录,不确定是不是这个问题导致的。 目前很急,今天就要上线,找了半天问题。 麻烦大佬们帮我看看。
2021-12-26 - vue中使用WX JS SDK 进行分享朋友圈和好友,分享的链接后面的参数丢失,只有部分机型有问题!
/**分享朋友圈和好友 */ toShareMomentsAndFriends() { var url = `${window.location.origin}${window.location.pathname}?state=${encodeURI(state)}` var title = this.pageData.shareTitle wx.ready(function() { wx.updateAppMessageShareData({ title: title, desc: '我在参加童妍记忆银行大咖宝贝挑赞赛,快来帮我点赞哦...', // link: url, link: 'https://clientserver.zhongyanimage.com/AlbumsLive/DetailNew?state=6010762_1⊱1⊱43369', imgUrl: 'https://objstorage.zhongyanimage.com/albumsLive/detailNew/shareImg.jpg', success: function(res) { // alert('分享好友') }, cancel: function(res) { // alert('取消分享好友') }, fail: function(res) { // alert('分享好友失败') } }) wx.updateTimelineShareData({ title: title, desc: '我在参加童妍记忆银行大咖宝贝挑赞赛,快来帮我点赞哦...', // link: url, link: 'https://clientserver.zhongyanimage.com/AlbumsLive/DetailNew?state=6010762_1⊱1⊱43369', imgUrl: 'https://objstorage.zhongyanimage.com/albumsLive/detailNew/shareImg.jpg', success: function(res) { // alert('分享到朋友圈成功') }, cancel: function(res) { // alert('取消分享到朋友圈') }, fail: function(res) { // alert('分享到朋友圈失败') } }) }) }, 正确链接 https://clientserver.zhongyanimage.com/albumsLive/detailNew?state=0018170%E2%8A%B11%E2%8A%B133539 在当前手机上分享出去的链接为:https://clientserver.zhongyanimage.com/albumsLive/detailNew 前后对比,参数丢失。 场景:H5页面,VUE(2.6.10) weixin-js-sdk(1.6.0) 代码如上。 目前,XS MAX(15.1) 和红米K30 5G版(MIUI 12.5.7)两台手机微信版本都是8.0.16 可以进行正常的分享,链接参数不会丢失。 之前都没有出现这个问题。 还有一个问题就是正常打开链接后,点击三个点的菜单,然后点击复制链接,复制出来的链接后面也是不带参数的。 需要加急!!!加急!!!加急!!! 微信日志已经上传,时间大概在 2021年11月28号 18:02:10 左右 上传日志的微信号:lyh_Gerry
2021-11-28 - VUE 微信复制链接参数丢失?
VUE 页面在微信打开,正常分享链接没有问题,但是如果点击复制链接,就会出现链接后面的参数丢失,只保留源地址。 看了社区文档是说发生了重定向。 那有个问题,如果不重定向,怎么做微信登录? 跳转微信登录: window.location.href 和 window.location.replace() 都测试过了,没有用。 是跳转授权微信登录时候有问题,还是?
2021-08-04 - imgSecCheck POST请求方式?
imgSecCheckPOST 请求,ContentType方式是什么?JSON还是octet-stream C# 通过外网URL 获取到了 Stream ,但是POST请求会出现 Timeouts are not supported on this stream. 有没有C#的案例借我借鉴一下。卡在这里一天了。,感谢大佬们~~~
2021-06-16 - imgSecCheck 和msgSecCheck 在.NET 中调用返回的是OK?
不管是什么样子的问题,或者图片在.NET 中调用返回的都是OK。是这个两个接口没用了嘛?
2021-06-16