index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="content">
  3. <view class="user-info">
  4. <view class="user-data">
  5. <view class="user-name">{{userData.nickName}}</view>
  6. <view class="user-phone">{{userData.phone}}</view>
  7. </view>
  8. <view class="user-img">
  9. <u-avatar :src="userData.headImage" size="160"></u-avatar>
  10. </view>
  11. </view>
  12. <view class="user-handle" v-for="(item, index) in handleList" :key="index" @click="goToHandle(item)">
  13. <view class="handle-icon">
  14. <u-image :src="item.icon" mode="aspectFit" width="28px" height="28px"></u-image>
  15. </view>
  16. <view class="handle-label">{{item.label}}</view>
  17. <view class="handle-arrow">
  18. <u-icon name="arrow-right" color="#cccccc" size="32"></u-icon>
  19. </view>
  20. </view>
  21. <u-top-tips ref="uTips"></u-top-tips>
  22. </view>
  23. </template>
  24. <script>
  25. const NET = require('@/utils/request')
  26. const API = require('@/config/api')
  27. export default {
  28. data() {
  29. return {
  30. userData: {
  31. headImage: '',
  32. userId: '',
  33. nickName: '',
  34. userName: '',
  35. phone: '',
  36. },
  37. handleList: [{
  38. label: '我的评价',
  39. path: 'evaluateList',
  40. icon: API.getServerImg + 'pingjia.png'
  41. },
  42. {
  43. label: '补课记录',
  44. path: 'extraLessonsList',
  45. icon: API.getServerImg + 'dingdanguanli.png'
  46. },
  47. {
  48. label: '请假记录',
  49. path: 'leaveLessonsList',
  50. icon: API.getServerImg + 'qingjia.png'
  51. },
  52. {
  53. label: '续费率/签到率排行',
  54. path: 'ratioRank',
  55. icon: API.getServerImg + 'paihang.png'
  56. },
  57. {
  58. label: '续费提醒',
  59. path: 'renewList',
  60. icon: API.getServerImg + 'xufeitixing.png'
  61. },
  62. {
  63. label: '签到提醒',
  64. path: 'signList',
  65. icon: API.getServerImg + 'xiaoxi.png'
  66. },
  67. ]
  68. }
  69. },
  70. onLoad() {
  71. if (uni.getStorageSync('userData')) {
  72. this.userData = uni.getStorageSync('userData')
  73. }
  74. },
  75. methods: {
  76. // 跳转我的各列表界面
  77. goToHandle(site) {
  78. uni.navigateTo({
  79. url: '/pagesMain/' + site.path
  80. });
  81. },
  82. }
  83. }
  84. </script>
  85. <style lang='scss'>
  86. @import "@/static/css/themes.scss";
  87. .content {
  88. width: 100%;
  89. height: 100vh;
  90. float: left;
  91. .user-info {
  92. width: 100%;
  93. height: 110px;
  94. margin-bottom: 20px;
  95. float: left;
  96. background-color: $mainColor;
  97. .user-data {
  98. width: calc(100% - 110px);
  99. height: 110px;
  100. padding: 15px 0 15px 15px;
  101. float: left;
  102. .user-name {
  103. width: 100%;
  104. float: left;
  105. font-size: 24px;
  106. color: #FFFFFF;
  107. line-height: 30px;
  108. margin: 10px 0;
  109. white-space: nowrap;
  110. overflow: hidden;
  111. text-overflow: ellipsis;
  112. }
  113. .user-phone {
  114. width: 100%;
  115. color: #FFFFFF;
  116. line-height: 20px;
  117. float: left;
  118. white-space: nowrap;
  119. overflow: hidden;
  120. text-overflow: ellipsis;
  121. }
  122. }
  123. .user-img {
  124. width: 110px;
  125. height: 110px;
  126. padding: 15px;
  127. float: left;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. }
  132. }
  133. .user-handle {
  134. width: 100vw;
  135. height: 40px;
  136. float: left;
  137. padding: 0 15px;
  138. margin-bottom: 10px;
  139. display: flex;
  140. align-items: center;
  141. .handle-icon {
  142. width: 40px;
  143. height: 40px;
  144. text-align: center;
  145. line-height: 40px;
  146. display: flex;
  147. align-items: center;
  148. }
  149. .handle-label {
  150. height: 40px;
  151. flex: 1;
  152. margin-left: 10px;
  153. line-height: 40px;
  154. font-size: 15px;
  155. }
  156. .handle-arrow {
  157. line-height: 40px;
  158. }
  159. }
  160. }
  161. </style>