mine.vue 6.4 KB

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