index.wxml 1.4 KB

123456789101112131415161718192021222324252627282930
  1. <view class="user-center-card px-4">
  2. <view class="user-center-card__header" bind:tap="gotoUserEditPage">
  3. <block wx:if="{{userInfo.nickName === '请登录'}}">
  4. <view class="d-flex flex-1" bindtap="toLogin">
  5. <view class="d-flex flex-1">
  6. <t-avatar t-class="avatar" mode="aspectFill" class="user-center-card__header__avatar" image="{{userInfo.avatarUrl || defaultAvatarUrl}}" />
  7. <view>
  8. <view class="user-center-card__header__name">请登录</view>
  9. <view class="user-center-card__header__phone">点击此处登录</view>
  10. </view>
  11. </view>
  12. </view>
  13. </block>
  14. <block wx:else>
  15. <view class="d-flex flex-1">
  16. <view class="d-flex flex-1">
  17. <t-avatar t-class="avatar" mode="aspectFill" class="user-center-card__header__avatar" image="{{userInfo.avatarUrl || defaultAvatarUrl}}" />
  18. <view>
  19. <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view>
  20. <view class="user-center-card__header__phone">{{userInfo.phoneNumber}}</view>
  21. </view>
  22. </view>
  23. <t-button t-class="editbtn" theme="light" size="small" icon="setting" variant="text" aria-label="设置" bindtap="toSetting"/>
  24. </view>
  25. </block>
  26. </view>
  27. <view class="mb-4">
  28. <t-image src="/assets/mine/vip.jpg" mode="widthFix" t-class="w-100" />
  29. </view>
  30. </view>