mine.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <template>
  2. <view>
  3. <statusBar :item="navBarData"></statusBar>
  4. <view class="mineBox">
  5. <view class="userInformation" @click="gotoMineEdit">
  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" @click="gotoMineCollect">
  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" @click="gotoMineActive">
  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" @click="gotoMineClass">
  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="gotoMineEdit">
  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/mineSubscribe/mineSubscribe'
  113. });
  114. },
  115. gotoMineClass(){
  116. uni.navigateTo({
  117. url:'/pages/mineClass/mineClass'
  118. })
  119. },
  120. gotoMineCollect(){
  121. uni.navigateTo({
  122. url:'/pages/mineCollect/mineCollect'
  123. })
  124. },
  125. gotoMineEdit(){
  126. uni.navigateTo({
  127. url:'/pages/mineEdit/mineEdit'
  128. })
  129. },
  130. gotoMineEdit(){
  131. uni.navigateTo({
  132. url:'/pages/mineEdit/mineEdit'
  133. })
  134. },
  135. gotoMineActive(){
  136. uni.navigateTo({
  137. url:'/pages/mineActive/mineActive'
  138. })
  139. }
  140. },
  141. };
  142. </script>
  143. <style lang="scss" scoped>
  144. .mineBox {
  145. width: 100%;
  146. // 头像信息
  147. .userInformation {
  148. width: 100%;
  149. height: 100px;
  150. padding: 0 18px;
  151. background-color: white;
  152. display: flex;
  153. justify-content: flex-start;
  154. align-items: center;
  155. .userAvatar {
  156. flex: 1;
  157. height: 80%;
  158. display: flex;
  159. align-items: center;
  160. image {
  161. width: 65px;
  162. height: 65px;
  163. }
  164. }
  165. .userInfo {
  166. margin-left: 10px;
  167. flex: 4;
  168. height: 80%;
  169. display: flex;
  170. flex-direction: column;
  171. justify-content: space-evenly;
  172. .infoTextone {
  173. display: flex;
  174. align-items: center;
  175. span {
  176. &:first-child {
  177. color: #000;
  178. font-size: 40rpx;
  179. font-weight: 600;
  180. }
  181. &.manage {
  182. border: 1px #ffa338 solid;
  183. font-size: 11px;
  184. display: flex;
  185. white-space: nowrap;
  186. justify-content: center;
  187. align-items: center;
  188. padding: 2px 4px;
  189. border-radius: 3px;
  190. margin-right: 10rpx;
  191. color: #ffa338;
  192. margin-left: 5px;
  193. }
  194. }
  195. }
  196. .infoTexttwo {
  197. span {
  198. color: rgb(153, 153, 153);
  199. font-size: 26rpx;
  200. }
  201. }
  202. }
  203. }
  204. // 个人资料选项
  205. .userOptionsBox {
  206. width: 100%;
  207. margin-top: 10px;
  208. .optionsItemBox {
  209. background-color: #fff;
  210. width: 100%;
  211. margin-bottom: 10px;
  212. padding: 5px 23px;
  213. .optionItem {
  214. display: flex;
  215. justify-content: space-between;
  216. align-items: center;
  217. height: 81rpx;
  218. font-size: 28rpx;
  219. .option_left {
  220. display: flex;
  221. align-items: center;
  222. height: 40rpx;
  223. .option_icon {
  224. height: 100%;
  225. width: 40rpx;
  226. image {
  227. width: 100%;
  228. height: 100%;
  229. }
  230. }
  231. .option_text {
  232. margin-left: 10px;
  233. }
  234. }
  235. .option_right {
  236. height: 40rpx;
  237. image {
  238. height: 32rpx;
  239. width: 32rpx;
  240. }
  241. }
  242. }
  243. }
  244. }
  245. }
  246. </style>