Article directory
Introduction
Mini program silently authorizes unionid
Article focus
Use wx.login(Object object) and put it in app.js
wx.login({
success (res) {
console.log(123);
if (res.code) {
//发起网络请求
// wx.request({
// url: 'https://example.com/onLogin',
// data: {
// code: res.code
// }
// })
console.log(res.code,'res.code');
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
Effect:
Hello, I am Feichen.
Welcome to follow me to obtain front-end learning resources, daily sharing of technological changes and survival rules; industry insiders and insights.