html52.com
我爱小程序-开发者交流社区

消息推送总显示”请求超时,请检查信息是否填写正确“,请问是什么原因?

我在配置消息推送时 配置界面总显示“请求超时,请检查信息是否填写正确”,不知道是什么原因!

”,不知道是什么原因!我的域名也是备案过的 也用的443端口

我的域名也是备案过的 也用的443端口

https://test.hgsp.cn/api/v1/public/mpcontact

但就是不同 我这边后台node 也接收不到任何发过来的get请求打印日志。

我到底哪配置错了?大神支个招!!!

const { weapp_config } = require('../../../../../config/default')
const router = require('koa-router')()
const { sha1 } = require('object-hash')


/**
 * 消息推送签名验证
 */
router.get('/', async(ctx, next) => {


    let token = weapp_config.contact_token


    let { signature, timestamp, nonce, echostr } = ctx.request.query


    console.log(ctx.request.query)


    let tmpArr = [token, timestamp, nonce].sort().join('')


    let cryptoKey = sha1(tmpArr).toLowerCase()


    console.log('key', cryptoKey, signature)


    if (cryptoKey == signature) {
        //  配置签名无误 直接将得到的echostr返回 表示成功
        ctx.body = echostr
    } else {
        //  配置签名错误
        ctx.body = {
            status: 400,
            data: "check msg error" 
        }
    }


    next()
})


module.exports = router.routes()


网友回复

安逸:

https://test.hgsp.cn/api/v1/public/mpcontac

这个链接确实打不开呀~.~

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付