在文档里的接口是需要知道授权方小程序的APPID,在小程序里怎么可以通过API获取小程序的APPID,然后在传到后台
https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1492585163_FtTNA&token=7ba51072e750dc38dd94ee30124920530a6a9e72&lang=zh_CN
网友回复
゛howe°:
https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1453779503&token=&lang=zh_CN
授权的时候不是会返回小程序的相关信息吗?
Tony:
//app.jsApp({
onLaunch: function() {
wx.login({
success: function(res) { if (res.code) { //发起网络请求
wx.request({
url: 'https://test.com/onLogin',
data: {
code: res.code
}
})
} else { console.log('登录失败!' + res.errMsg)
}
}
});
}
})
在小程序的页面里可以拿到登录的code, 把code传到后台后,后台要拿到小程序的appid才能进行后续的操作,现在卡住在怎么拿授权方的appid那里了