uniapp获取openid
wx.login({
success: function(res) {
console.log('resCode', res)
//发起网络请求
wx.request({
url: 接口地址,
data: {
code: res.code
},
success: res => {
console.log('res获取openid', res, res.data.openid);
// this.openid = res.data.openid;
console.log('this.openid', res.data.openid)
}
});