关于登录授权的问题
来源:6-1 个人中心-用户信息获取+展示
赵日天l
2018-05-20
成功授权后怎么自动触发login()方法
bindGetUserInfo() 写在methods , 里面根本触发不了
<button wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</button>写回答
2回答
-
getuserinfo 是事件名,和 tap 之类的一样,原生小程序通过 bind 修饰符来绑定事件,所以写成 bindgetuserinfo,vue 中使用的是 @ 修饰符,所以要写成 @getuserinfo
012018-05-22 -
fengyunzhu
2018-05-21
使用@getuserinfo='bindGetUserInfo'
00
相似问题