user.wxml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!--为使用者-我的页面-->
  2. <view class="user-card">
  3. <image class="user-avatar" src="{{hasUserInfo ? userInfo.avatar : '/images/user/user.png'}}" bindtap="previewAvatar">
  4. </image>
  5. <view wx:if="{{hasUserInfo}}" class="user-nickname primary-text">{{userInfo.name}}</view>
  6. <view wx:else class="user-nickname">
  7. <myButton type="primary" bindtap="getUserProfile">微信登录</myButton>
  8. </view>
  9. <view wx:if="{{hasUserInfo}}">
  10. <view wx:if="{{!pubInfo.length}}" class="pub-name secondary-text">尚未加入任何社团组织</view>
  11. <view class="pub-name secondary-text" wx:for="{{pubInfo}}" wx:for-item="item" wx:key="pub_id">
  12. {{item.publisher.name}}</view>
  13. </view>
  14. </view>
  15. <view class="mid" wx:if="{{hasUserInfo}}">
  16. <view class="btn" bindtap="myFavorite">
  17. <image class="btn-icon" mode="aspectFit" src="/images/user/like.png"></image>
  18. <view class="btn-text primary-text">我的收藏</view>
  19. </view>
  20. <view class="btn" bindtap="myFollow">
  21. <image class="btn-icon" mode="aspectFit" src="/images/user/follow.png"></image>
  22. <view class="btn-text primary-text">我的关注</view>
  23. </view>
  24. <view class="btn" bindtap="myQuestion">
  25. <image class="btn-icon" mode="aspectFit" src="/images/user/question.png"></image>
  26. <view class="btn-text primary-text">我的提问</view>
  27. </view>
  28. <view class="bottom-bar">
  29. <view class="btn" bindtap="setting">
  30. <image class="btn-icon" mode="aspectFit" src="/images/user/setting.png"></image>
  31. <view>设置</view>
  32. </view>
  33. <view class="btn" bindtap="aboutUs">
  34. <image class="btn-icon" mode="aspectFit" src="/images/user/about.png"></image>
  35. <view>关于</view>
  36. </view>
  37. <button class="btn" open-type="feedback">
  38. <image class="btn-icon" mode="aspectFit" src="/images/user/feedback.png"></image>
  39. <view>反馈</view>
  40. </button>
  41. </view>
  42. </view>
  43. <view wx:if="{{hasUserInfo}}">
  44. <view wx:if="{{pubInfo.length === 0}}" class="publisher primary-background-color" bindtap="publisherLogin">
  45. <text class="white-text-color">社团\n组织\n入驻</text>
  46. </view>
  47. <view wx:else class="publisher primary-background-color" bindtap="publisherPage">
  48. <text class="white-text-color">社团\n组织\n管理</text>
  49. </view>
  50. </view>