我是通过调 https://api.weixin.qq.com/cgi-bin/menu/create?access_token=xxxx 这个地址创建的; 传入的菜单是 JSON.stringify({ button: [ {type: 'view',name: '消费概览',url: 'xxx',}, {type: 'view',name: '消费与充值',url: 'xxx',}, {type: 'view',name: '个人中心',url: 'xxx',}, ] }) 微信公众平台接口调试工具中调试也是正常返回的[图片]
自定义菜单打开后是微信官网?配置自定义菜单,上午都是正常生效的状态,下午就是第二张图的界面了??这是咋回事 [图片] [图片]
2024-12-14知道了,qs.stringify的时候本身就会encode
redirect_uri 参数错误?const replaceUrl = ()=> { const params = { appid: 'wxef571c309f0f3841', // redirect_uri: encodeURIComponent('https://2330290qr8.zicp.fun'), redirect_uri: encodeURIComponent('http://192.168.31.210:10086'), response_type: "code", scope: 'snsapi_userinfo', state: '11111' } window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?${qs.stringify(params)}#wechat_redirect`; } [图片] 请问这么填有什么问题?始终报错uri参数错误; 上面注释的内网穿透地址也不行 生成的地址:https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxef571c309f0f3841&redirect_uri=http%253A%252F%252F192.168.31.210%253A10086&response_type=code&scope=snsapi_userinfo&state=11111#wechat_redirect
2024-11-30代码中也没有配置任何白名单限制
公众号 填写服务器配置时跟本不发送event?[图片] 我在这里点提交,然后我本地调试根本不进入回调,连最基本的request都没有过来,就直接token验证失败了;我是ngork本地映射外网的; 地址那些没得错误
2024-03-24已解决,没有添加response headers
被动回复xml解密失败,Not xml format?被动回复时始终报错解密失败 [图片][图片] /** * 获取签名 * @param {String} timestamp 时间戳 * @param {String} nonce 随机数 * @param {String} encrypt 加密后的文本 */ getSignature(timestamp, nonce, encrypt) { const sha = crypto.createHash('sha1') const arr = [this.token, timestamp, nonce, encrypt].sort() sha.update(arr.join('')) return sha.digest('hex') } /** * 对明文进行加密 * 算法:Base64_Encode(AES_Encrypt[random(16B) + msg_len(4B) + msg + $appId]) * @param {String} text 待加密明文文本 */ encrypt(text) { // 16B 随机字符串 const randomString = crypto.pseudoRandomBytes(16) const msg = Buffer.from(text) // 获取4B的内容长度的网络字节序 const msgLength = Buffer.alloc(4) msgLength.writeUInt32BE(msg.length, 0) const id = Buffer.from(this.appId) const bufMsg = Buffer.concat([randomString, msgLength, msg, id]) // 对明文进行补位操作 const encoded = this.pkcs7.encode(bufMsg) // 创建加密对象,AES采用CBC模式,数据采用PKCS#7填充;IV初始向量大小为16字节,取AESKey前16字节 const cipher = crypto.createCipheriv('aes-256-cbc', this.key, this.iv) cipher.setAutoPadding(false) const cipheredMsg = Buffer.concat([cipher.update(encoded), cipher.final()]) return cipheredMsg.toString('base64') } // 结果 <xml> <Encrypt><![CDATA[SRv/guLb0lMXZdNS2qZAXUtunk8N7nFU2tlnCboTicZPZIDyOTNLHsm//AJx5v3fKZGldGLx0ypdBOR5Vrm4swgwa6AP8ReqcTI2AyUQKwGYfJD5Mj0Tfo/uS03YpIjGO9rHpACuhrO/lesEGLhAKkkD71jXDli6K2aEDo12U5eJr4NHg7s6t3gIPgq1xoxbSyDplmQt0uERd+BQt2Hr+vz9MWEP8sVV oa8pj+LTgN8R/rklvC0GHwUi9t0h0tTQORzjcvRF0Z1e53h9UEiKIc+hpNHdaqjP2WtvC3YiIt7X4A+PKmAG9VDAigboCLdKtmKaWvnQcLrGl4AbQDbTVDE+LxtW1UJArWhb3obPt+kmTfjhBDb4a2ajtbGTgCzPZyL4RDr9M1rsoYkE5xkJvvp9Xuw42Cf5/EdnLbjUFwBNqti3MLHGkbXHoxnaiTELFJFr9NJmqBFl24//6Oeh3JpV/fKkqzZtsTINYcmW9ztpK2 Z0hFUC/z/0HqcgMEmb]]></Encrypt> <MsgSignature><![CDATA[6e30ea1352b17e32815559150fcc400a74aacc19]]></MsgSignature> <TimeStamp><![CDATA[1696398547754]]></TimeStamp> <Nonce><![CDATA[1787384193]]></Nonce> </xml>
2023-10-04哈哈哈,到现在都没有
没有小程序备案入口https://developers.weixin.qq.com/miniprogram/product/record_guidelines.htmlhttps://developers.weixin.qq.com/miniprogram/product/record_guidelines.htmlhttps://developers.weixin.qq.com/miniprogram/product/record_guidelines.html 并没有找到小程序备案入口
2023-09-04