mine.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <view>
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="mineBox">
  5. <view class="userInformation">
  6. <view class="userAvatar">
  7. <image :src="userAvatar ? userAvatar : '../../static/mine/Avatar_default.png'" mode="aspectFill"></image>
  8. </view>
  9. <view class="userInfo">
  10. <view class="infoTextone">
  11. <span>
  12. {{ username ? username : '未登录' }}
  13. </span>
  14. <span v-if="isManage" class="manage">管理员</span>
  15. </view>
  16. <view class="infoTexttwo">
  17. <span>个性签名</span>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="userOptionsBox">
  22. <view class="optionsItemBox">
  23. <view class="optionItem" @click="goToSub(1)">
  24. <view class="option_left">
  25. <span class="option_icon">
  26. <image src="../../static/mine/Subscribe.png" mode="aspectFill"></image>
  27. </span>
  28. <text class="option_text">我的订阅</text>
  29. </view>
  30. <view class="option_right">
  31. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  32. </view>
  33. </view>
  34. <view class="optionItem">
  35. <view class="option_left">
  36. <span class="option_icon">
  37. <image src="../../static/mine/Collect.png" mode="aspectFill"></image>
  38. </span>
  39. <text class="option_text">我的收藏</text>
  40. </view>
  41. <view class="option_right">
  42. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  43. </view>
  44. </view>
  45. <view class="optionItem">
  46. <view class="option_left">
  47. <span class="option_icon">
  48. <image src="../../static/mine/active.png" mode="aspectFill"></image>
  49. </span>
  50. <text class="option_text">我的活动</text>
  51. </view>
  52. <view class="option_right">
  53. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  54. </view>
  55. </view>
  56. <view class="optionItem">
  57. <view class="option_left">
  58. <span class="option_icon">
  59. <image src="../../static/mine/myClass.png" mode="aspectFill"></image>
  60. </span>
  61. <text class="option_text">我的教研室</text>
  62. </view>
  63. <view class="option_right">
  64. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="optionsItemBox">
  69. <view class="optionItem">
  70. <view class="option_left">
  71. <span class="option_icon">
  72. <image src="../../static/mine/help.png" mode="aspectFill"></image>
  73. </span>
  74. <text class="option_text">反馈帮助</text>
  75. </view>
  76. <view class="option_right">
  77. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  78. </view>
  79. </view>
  80. <view class="optionItem" @click="gotoLogin">
  81. <view class="option_left">
  82. <span class="option_icon">
  83. <image src="../../static/mine/setting.png" mode="aspectFill"></image>
  84. </span>
  85. <text class="option_text">我的设置</text>
  86. </view>
  87. <view class="option_right">
  88. <image src="../../static/mine/arrow-right.png" mode="aspectFill"></image>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. export default {
  98. data() {
  99. return {
  100. navBarData: {
  101. title: '我的',
  102. btn: 0
  103. },
  104. username: '情绪稳定的疯子',
  105. userAvatar: '../../static/mine/Avatar.png',
  106. isManage: true
  107. };
  108. },
  109. methods: {
  110. goToSub(i) {
  111. uni.navigateTo({
  112. // url: '/pages/mine/mineSubscribe?subType=' + i
  113. url: '/pages/mineSubscribe/mineSubscribe'
  114. });
  115. },
  116. gotoLogin(){
  117. uni.navigateTo({
  118. url:'/pages/login/login'
  119. })
  120. }
  121. },
  122. };
  123. </script>
  124. <style lang="scss" scoped>
  125. .mineBox {
  126. width: 100%;
  127. // 头像信息
  128. .userInformation {
  129. width: 100%;
  130. height: 100px;
  131. padding: 0 18px;
  132. background-color: white;
  133. display: flex;
  134. justify-content: flex-start;
  135. align-items: center;
  136. .userAvatar {
  137. flex: 1;
  138. height: 80%;
  139. display: flex;
  140. align-items: center;
  141. image {
  142. width: 65px;
  143. height: 65px;
  144. }
  145. }
  146. .userInfo {
  147. margin-left: 10px;
  148. flex: 4;
  149. height: 80%;
  150. display: flex;
  151. flex-direction: column;
  152. justify-content: space-evenly;
  153. .infoTextone {
  154. display: flex;
  155. align-items: center;
  156. span {
  157. &:first-child {
  158. color: #000;
  159. font-size: 40rpx;
  160. font-weight: 600;
  161. }
  162. &.manage {
  163. border: 1px #ffa338 solid;
  164. font-size: 11px;
  165. display: flex;
  166. white-space: nowrap;
  167. justify-content: center;
  168. align-items: center;
  169. padding: 2px 4px;
  170. border-radius: 3px;
  171. margin-right: 10rpx;
  172. color: #ffa338;
  173. margin-left: 5px;
  174. }
  175. }
  176. }
  177. .infoTexttwo {
  178. span {
  179. color: rgb(153, 153, 153);
  180. font-size: 26rpx;
  181. }
  182. }
  183. }
  184. }
  185. // 个人资料选项
  186. .userOptionsBox {
  187. width: 100%;
  188. margin-top: 10px;
  189. .optionsItemBox {
  190. background-color: #fff;
  191. width: 100%;
  192. margin-bottom: 10px;
  193. padding: 5px 23px;
  194. .optionItem {
  195. display: flex;
  196. justify-content: space-between;
  197. align-items: center;
  198. height: 81rpx;
  199. font-size: 28rpx;
  200. .option_left {
  201. display: flex;
  202. align-items: center;
  203. height: 40rpx;
  204. .option_icon {
  205. height: 100%;
  206. width: 40rpx;
  207. image {
  208. width: 100%;
  209. height: 100%;
  210. }
  211. }
  212. .option_text {
  213. margin-left: 10px;
  214. }
  215. }
  216. .option_right {
  217. height: 40rpx;
  218. image {
  219. height: 32rpx;
  220. width: 32rpx;
  221. }
  222. }
  223. }
  224. }
  225. }
  226. }
  227. </style>