关于open-type=“getuserinfo”时按钮怎么绑定事件?
发布于 6 年前 作者 gliu 10782 次浏览 来自 问答

怎么才能在open-type=“getuserinfo”时绑定按钮事件?

源代码:

已经有一个bind事件了,难不成还要再来一个bind事件

<button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getuserinfo">点击登录</button>
2 回复
<button bindtap="按钮事件" wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo">点击登录</button>

你的需求是什么?没太懂,点击按钮事件回调?bindgetuserinfo 不就是用户点击按钮吗?

回到顶部