123456789101112131415 |
- <!--index.wxml-->
- <view class="container">
- <view class="userinfo">
- <!-- 点了之后就会调用wx.getUserInfo, 随后调用bindGetUserInfo -->
- <button wx:if="{{!hasUserInfo && canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo"> 点击登录 </button>
- <!-- <button wx:if="{{true}}" bindtap='login'> 点击登录 </button> -->
- <block wx:else>
- <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
- <text class="userinfo-nickname">{{userInfo.nickName}}</text>
- </block>
- </view>
- <view class="usermotto">
- <text class="user-motto">{{motto}}</text>
- </view>
- </view>
|