如何获取access_taken,是这样获取吗?
testTap:function(){
wx.request({
url: ‘https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET’,
success:function(res){
console.log(res.data);
}
})
},
还有获取小程序页面带参二维码时这样获取的吗?
testTap1:function(){
wx.request({
data: {
‘path’: ‘pages/test/test’,
‘width’: 200},
url: ‘https://api.weixin.qq.com/wxa/getwxacode?access_token=“sdgwtjuer4iwtrujtkljjjwetkljwle”’,
method:‘POST’,
header: {
‘content-type’: ‘application/json’
},
success: function (res) {
console.log(res);
}
})
}