index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <view class="content">
  3. <!-- <fxyk-navbar :isSearch="false" :isNeedReturn="false" title="个人中心"/> -->
  4. <view class="head">
  5. <view class="head-item">
  6. <u-image width="179rpx" height="179rpx" :fade="false" src="../../static/images/head.png"></u-image>
  7. <view class="text-center word-one">用户名</view>
  8. <view class="text-center word-two">所属部门</view>
  9. </view>
  10. </view>
  11. <u-cell-group style="margin-bottom:200rpx">
  12. <fxyk-cell leftSlot v-for="(item,index) in profile" :key="index" :leftImg="item.imgPath" :title="item.title" arrow :redDot="item.redDot ? true : false" @click.native="jump_path(item.path)"/>
  13. </u-cell-group>
  14. <fxyk-button content="退出登录" bgColor="#FF0011" @click.native="logout"/>
  15. </view>
  16. </template>
  17. <script>
  18. import { mapMutations } from 'vuex'
  19. export default {
  20. data() {
  21. return {
  22. value: '',
  23. profile: [
  24. {
  25. 'title': '修改密码',
  26. 'imgPath': '../../static/images/updatePassword.png',
  27. 'path': '/pages/user/updatePassword'
  28. },
  29. {
  30. 'title': '版本更新',
  31. 'imgPath': '../../static/images/version.png',
  32. // 小红点
  33. 'redDot': 11,
  34. 'path': '/pages/user/version'
  35. },
  36. {
  37. 'title': '关于我们',
  38. 'imgPath': '../../static/images/about.png',
  39. 'path': '/pages/user/aboutUs'
  40. }
  41. ]
  42. }
  43. },
  44. onLoad() {},
  45. computed: {
  46. titleStyle() {
  47. return {'font-size': '29rpx',
  48. 'font-family': 'SimSun',
  49. 'font-weight': '400',
  50. 'line-height': '40rpx',
  51. 'color': '#000000',
  52. 'margin-left': '29rpx'}
  53. }
  54. },
  55. methods: {
  56. ...mapMutations(['logout']),
  57. // 跳指定页
  58. jump_path(val) {
  59. uni.navigateTo({
  60. url: val
  61. })
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang='scss' scoped>
  67. page {
  68. width: 100%;
  69. height: 100%;
  70. }
  71. .content {
  72. width: 100%;
  73. height: 100%;
  74. /* background-color: $yk-bg-color; */
  75. min-height: 100vh;
  76. }
  77. .head {
  78. height: 350rpx;
  79. background-color: $yk-main-bg-color;
  80. position: relative;
  81. margin-bottom: 50rpx;
  82. .head-item {
  83. position: absolute;
  84. top: 20rpx;
  85. left: 50%;
  86. transform: translateX(-50%);
  87. .word-one {
  88. font-size: 33rpx;
  89. font-family: SimSun;
  90. font-weight: 400;
  91. line-height: 44rpx;
  92. color: #FFFFFF;
  93. margin-top: 20rpx;
  94. }
  95. .word-two {
  96. font-size: 29rpx;
  97. font-family: SimSun;
  98. font-weight: 400;
  99. line-height: 40rpx;
  100. color: #FFFFFF;
  101. margin-top: 10rpx;
  102. }
  103. }
  104. }
  105. </style>