现在获取用户信息必须点两次按钮才能确定吗??
<view class="userBaseinfo"> <button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 获取头像昵称 </button> <block wx:else> <image class="userBaseinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image> <text class="userBaseinfo-nickname">{{userInfo.nickName}}</text> </block> </view> <view class="usermotto"> <text class="user-motto">{{motto}}</text></view> |
官方的案例是这样写的。。可是这样写,我要点2次按钮啊,第一次是代码里的button,第二次是弹窗的接受和拒绝按钮。。。这不是很多余吗?为什么不能直接显示是否授权的弹窗呢??
我进一个页面,要先点这个按钮
然后还的点一次这个???可以直接显示这个弹窗么。。
