mine.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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!=='' ? 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!=='' ? username : '未登录' }}</text>
  12. <span v-if="isManage!==''" 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: ''
  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. console.log(this.$store.state.user.openid,11111);
  141. this.isManage =this.$store.state.user.openid;
  142. console.log(this.isManage=="");
  143. }
  144. };
  145. </script>
  146. <style lang="scss" scoped>
  147. .mineBox {
  148. width: 100%;
  149. // 头像信息
  150. .userInformation {
  151. width: 100%;
  152. height: 100px;
  153. padding: 0 18px;
  154. background-color: white;
  155. display: flex;
  156. justify-content: flex-start;
  157. align-items: center;
  158. .userAvatar {
  159. flex: 1;
  160. // height: 80%;
  161. display: flex;
  162. align-items: center;
  163. image {
  164. width: 128rpx;
  165. height: 128rpx;
  166. }
  167. }
  168. .userInfo {
  169. margin-left: 10px;
  170. flex: 4;
  171. height: 80%;
  172. display: flex;
  173. flex-direction: column;
  174. justify-content: space-evenly;
  175. .infoTextone {
  176. display: flex;
  177. align-items: center;
  178. span {
  179. &:first-child {
  180. color: #000;
  181. // font-size: 40rpx;
  182. font-weight: 600;
  183. }
  184. &.manage {
  185. border: 1px #ffa338 solid;
  186. // font-size: 11px;
  187. display: flex;
  188. white-space: nowrap;
  189. justify-content: center;
  190. align-items: center;
  191. padding: 2px 4px;
  192. border-radius: 3px;
  193. margin-right: 10rpx;
  194. color: #ffa338;
  195. margin-left: 5px;
  196. }
  197. }
  198. }
  199. .infoTexttwo {
  200. span {
  201. color: rgb(153, 153, 153);
  202. // font-size: 26rpx;
  203. }
  204. }
  205. }
  206. }
  207. // 个人资料选项
  208. .userOptionsBox {
  209. width: 100%;
  210. margin-top: 10px;
  211. .optionsItemBox {
  212. background-color: #fff;
  213. width: 100%;
  214. margin-bottom: 10px;
  215. padding: 5px 23px;
  216. .optionItem {
  217. display: flex;
  218. justify-content: space-between;
  219. align-items: center;
  220. height: 81rpx;
  221. // font-size: 28rpx;
  222. .option_left {
  223. display: flex;
  224. align-items: center;
  225. height: 40rpx;
  226. .option_icon {
  227. height: 100%;
  228. width: 40rpx;
  229. image {
  230. width: 100%;
  231. height: 100%;
  232. }
  233. }
  234. .option_text {
  235. margin-left: 10px;
  236. color:rgba(0, 0, 0, 0.8);
  237. }
  238. }
  239. .option_right {
  240. height: 40rpx;
  241. image {
  242. height: 34rpx;
  243. width: 30rpx;
  244. }
  245. }
  246. }
  247. }
  248. }
  249. }
  250. </style>