<!-- index.wxml -->
<view class="container">
  <view class="userinfo">
    <block wx:if="{{!userInfo.nickName}}">
      <button bindtap="getUserProfile">获取头像昵称</button>
    </block>
    <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 class="counter">
    <button bindtap="decrement">-1</button><text class="user-motto">{{count}}</text><button bindtap="increment">+1</button>
  </view>
  <view class="btns">
    <button bindtap="gotoGamePage">去游戏页面</button>
    <button bindtap="gotoOtherPage">去其他页面</button>
  </view>
  <view class="footer">
    <image src="./github-logo.png" />
    <text user-select="true">https://github.com/Tencent/westore</text>
  </view>
</view>