@wtss/wx-component-getuserinfo
v1.1.0
Published
微信小程序获取用户信息组件
Downloads
1
Readme
@wtss/wx-component-getuserinfo
获取用户信息组建:
使用
page.json
{
"usingComponents": {
"getuserinfo": "@wtss/wx-component-getuserinfo"
}
}
page.wxml
<getuserinfo hover-class='class' bind:getUserinfo="bindGetUserinfo">立即开始</getuserinfo>
page.js
Page({
bindGetUserinfo(e) {
console.log(e)
if (e.detail.nickname) {
wx.redirectTo({url: ''}) //登录后跳转的页面
}
},
})