微信小程序|uniapp开发微信小程序获取code

【微信小程序|uniapp开发微信小程序获取code】1.在hb的manifest.json中小程序配置项中写入appid
2.wx.login({
success: function(res) {
console.log(res); //这里的返回值里面便包含code
},
fail: function(res) {
console.log('登陆失败');
},

})

    推荐阅读