card:function(){
wx.request({
url: 'https://api.weixin.qq.com/card/membercard/activate/geturl?access_token= ACCESS_TOKEN',
method:"POST",
access_token:"38_ZrEhrg8d0jciiol_XeIKx1Qp2uuAL9EVUOsWFTAtdAQquo0vaBh2tR0AQIPT56l4BbefIlC8qNwx1W4_wU9IHrY4jY9XQhI9f-_A-eCjtpj0odDmOM-jCGyC1JmMu84LsoGSSlIHXemhnozPJGJcAAAMJM",
card_id:"pxn4S6MWtwgxIihmLdpY_6TZimsE",
success(res){
console.log(res)
},
fail(err){
console.log(err)
}
})
}
这样写对不对啊
card(){ let token = '38_ZrEhrg8d0jciiol_XeIKx1Qp2uuAL9EVUOsWFTAtdAQquo0vaBh2tR0AQIPT56l4BbefIlC8qNwx1W4_wU9IHrY4jY9XQhI9f-_A-eCjtpj0odDmOM-jCGyC1JmMu84LsoGSSlIHXemhnozPJGJcAAAMJM' wx.request({ url: `https://api.weixin.qq.com/card/membercard/activate/geturl?access_token=${token}`, method:"POST", data: { card_id: "pxn4S6MWtwgxIihmLdpY_6TZimsE", outer_str: '123' }, success: (res)=> { console.log(res) }, fail: (err)=> { console.log(err) } }) }