index.wxml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!--index.wxml-->
  2. <view class="container">
  3. <!-- 标题 -->
  4. <view class="menu">
  5. <scroll-view scroll-x="true" class="top-nav" scroll-with-animation="true" scroll-left="{{left}}" >
  6. <block wx:for="{{motto}}" wx:for-item="item" wx:key="index" wx:for-index="itemIdx">
  7. <view bindtap="navItemTap" class="top-btn {{navBtnSelectIdx == itemIdx ? 'top-hoverd-btn' : ''}}" data-index="{{itemIdx}}">
  8. {{item}}
  9. <view class="striping {{navBtnSelectIdx == itemIdx ? 'top-hoverd-striping' : ''}}"></view>
  10. </view>
  11. </block>
  12. </scroll-view>
  13. </view>
  14. <!-- 内容 -->
  15. <view class="content">
  16. <scroll-view scroll-y="true" bindscroll="lower" scroll-with-animation="true" enable-back-to-top="true">
  17. <!-- 我的 -->
  18. <view class="my {{navBtnSelectIdx == 0 ? '' : 'none'}}">
  19. <!-- 个人信息 -->
  20. <view class='message'>
  21. <view class='user'>
  22. <view class='head'>
  23. <image class="userinfo-avatar" src="{{data.users.headImgUrl}}" background-size="cover"></image>
  24. <view class='left'>
  25. <view class="name">
  26. {{data.users.wechatName}}
  27. <text class='LV'>LV.{{data.level}}</text>
  28. </view>
  29. <view class="student">
  30. 学号:
  31. <text>{{data.users.eid}}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view class='grade'>{{grade}}</view>
  36. </view>
  37. <view class='personal'>
  38. <view class="particulars">
  39. <text>登录天数</text>
  40. <text>{{data.users.loginDay}}</text>
  41. </view>
  42. <view class="particulars">
  43. <text>总时长</text>
  44. <text>{{time}}</text>
  45. </view>
  46. <view class="particulars">
  47. <text>当前排名</text>
  48. <text>{{data.scoreRank}}</text>
  49. </view>
  50. <view class="particulars">
  51. <text>超过用户</text>
  52. <text>{{data.proportion}}%</text>
  53. </view>
  54. </view>
  55. </view>
  56. <!-- 勋章 -->
  57. <view class="medal">
  58. <view class="title">
  59. <text>我的勋章</text>
  60. <text class="{{data.metalsList.length > 0 ? 'none' : ''}}">本周还没获得</text>
  61. </view>
  62. <view class="img">
  63. <view wx:for="{{data.metalsList}}" wx:key="{{item.id}}" >
  64. <image src="{{item.img}}"></image>
  65. <text>{{item.name}}</text>
  66. </view>
  67. </view>
  68. </view>
  69. <!-- 课模板 -->
  70. <view>
  71. <curriculum studyLog="{{ data.studyLog }}"/>
  72. </view>
  73. <!-- <view class='questions'>
  74. <scroll-view>
  75. <text class="{{questionsPreviewing ? 'adsorb' : ''}}">答疑</text>
  76. <view>
  77. </view>
  78. </scroll-view>
  79. </view>
  80. <view class='share'>
  81. <text class="{{questionsShare ? 'adsorb' : ''}}">分享</text>
  82. <view></view>
  83. </view> -->
  84. </view>
  85. <!-- 本周推荐 -->
  86. <view class="recommend {{navBtnSelectIdx == 1 ? '' : 'none'}}">
  87. <recommend recommendData="{{recommendData}}"/>
  88. </view>
  89. <!-- 科学艺术 -->
  90. <view class="art {{navBtnSelectIdx == 7 ? '' : 'none'}}">
  91. <art />
  92. </view>
  93. </scroll-view>
  94. </view>
  95. </view>