signature 生成的跟工具上测试的是一样的,为什么还是签名错误呢
lingka:function(){
wx.request({
url: app.d.ceshiUrl+’/Api/Api/suiji’,
method: ‘post’,
data: {
},
header: {
‘Content-Type’: ‘application/x-www-form-urlencoded’
},
success: function (res) {
console.log(res)
var time = JSON.stringify(res.data.time);
var str = JSON.stringify(res.data.success);
console.log(str)
console.log(time)
wx.addCard({
cardList: [
{
cardId: ‘pRYCp0yeF36-CY1CxF6eQq5BdBnI’,
cardExt: '{“code”: “”, “openid”:"", “timestamp”: ’ + time + ‘, “signature”:’ + str+ ‘}’
}
],
success: function (res) {
console.log(res) // 卡券添加结果
}
})
}
})
}
前端代码哪里错了吗