通过官方的签名校验工具,顺利通过,前端代码如下
let param = '{"nonce_str":"' + data.nonce_str +'","signature":"'+data.signature+'","timestamp":"' + data.timestamp + '"}';
console.log(param)
// 打印出来的结果是:{"nonce_str":"3uvnu","signature":"d36d4cd5eb7fa3b359bd8b129233cee41ce7573a","timestamp":1660214893}
wx.addCard({
cardList: [
{
cardId: 'pJayW6K6y4mWyr1E_MpngOOsqZKc',
cardExt: param
}
]
小程序已经和公众号做了关联处理!
不知道哪里出问了问题,请求帮助,谢谢!
生成ticket的参数发一下
{"apiTicket":"VUkHJgW2SFNG4xhs6ZntSLRtyAOIlyU5FatjrfrzswI5md_zvC3a9nwP2PGdR1JLm59lYgrBuypnzsYjkAJN8w","card_id":"pJayW6K6y4mWyr1E_MpngOOsqZKc","nonce_str":"bfXOR","signature":"831fbf2375988ed27801b4e62bccf071427d5089","timestamp":"1660276562"}
调用 https://api.weixin.qq.com/cgi-bin/ticket/getticket 这个接口生成的