Javen205 / TNWX

TNWX: TypeScript + Node.js + WeiXin 微信系开发脚手架,支持微信公众号、微信支付、微信小游戏、微信小程序、企业微信/企业号。最最最重要的是能快速的集成至任何 Node.js 框架(Express、Nest、Egg、Koa 等)
Apache License 2.0
642 stars 97 forks source link

开发者模式验证失败 #5

Closed callmesoul closed 4 years ago

callmesoul commented 4 years ago
let signature = ctx.request.query.signature,//微信加密签名
        timestamp = ctx.request.query.timestamp,//时间戳
        nonce = ctx.request.query.nonce,//随机数
        echostr = ctx.request.query.echostr;//随机字符串
    console.log('signature', signature)
    console.log('timestamp', timestamp)
    console.log('nonce', nonce)
    console.log('echostr', echostr)
    const result = WeChat. (signature, timestamp,nonce, echostr)
    console.log('result', result)
    ctx.send(WeChat.checkSignature(signature, timestamp,nonce, echostr));

经打印确认 result 时跟 echostr 一样的

callmesoul commented 4 years ago

外网映射问题,点多几次就好了