index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="mine-container" :style="{height: `${windowHeight}px`}">
  3. <!--顶部个人信息栏-->
  4. <view class="header-section">
  5. <view class="flex padding justify-between">
  6. <view class="flex">
  7. <image :src="avatar" class="cu-avatar xl round" mode="widthFix">
  8. </image>
  9. <view class="user-info">
  10. <view class="u_title text-bold">
  11. {{ name }}
  12. </view>
  13. <view class="sub_title">
  14. 系统管理员
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="content-section">
  21. <view class="menu-list">
  22. <view class="list-cell list-cell-arrow" @click="handleBuilding">
  23. <view class="menu-item-box">
  24. <view class="iconfont icon-setting menu-icon"></view>
  25. <view>企业管理</view>
  26. </view>
  27. </view>
  28. <view class="list-cell list-cell-arrow" @click="handleHelp">
  29. <view class="menu-item-box">
  30. <view class="iconfont icon-help menu-icon"></view>
  31. <view>帮助中心</view>
  32. </view>
  33. </view>
  34. <view class="list-cell list-cell-arrow" @click="handleAbout">
  35. <view class="menu-item-box">
  36. <view class="iconfont icon-aixin menu-icon"></view>
  37. <view>联系我们</view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import storage from '@/utils/storage'
  46. export default {
  47. data() {
  48. return {
  49. name: this.$store.state.user.name,
  50. version: getApp().globalData.config.appInfo.version
  51. }
  52. },
  53. computed: {
  54. avatar() {
  55. return this.$store.state.user.avatar
  56. },
  57. windowHeight() {
  58. return uni.getSystemInfoSync().windowHeight - 50
  59. }
  60. },
  61. methods: {
  62. handleToInfo() {
  63. this.$tab.navigateTo('/pages/mine/info/index')
  64. },
  65. handleToEditInfo() {
  66. this.$tab.navigateTo('/pages/mine/info/edit')
  67. },
  68. handleToSetting() {
  69. this.$tab.navigateTo('/pages/mine/setting/index')
  70. },
  71. handleToLogin() {
  72. this.$tab.reLaunch('/pages/login')
  73. },
  74. handleToAvatar() {
  75. this.$tab.navigateTo('/pages/mine/avatar/index')
  76. },
  77. handleLogout() {
  78. this.$modal.confirm('确定注销并退出系统吗?').then(() => {
  79. this.$store.dispatch('LogOut').then(() => {
  80. this.$tab.reLaunch('/pages/index')
  81. })
  82. })
  83. },
  84. handleHelp() {
  85. this.$tab.navigateTo('/pages/mine/help/index')
  86. },
  87. handleAbout() {
  88. this.$tab.navigateTo('/pages/mine/about/index')
  89. },
  90. handleJiaoLiuQun() {
  91. this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群')
  92. },
  93. handleBuilding() {
  94. this.$modal.showToast('移动端暂不支持该功能,请到PC端处理~')
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss">
  100. page {
  101. background-color: #f5f6f7;
  102. }
  103. .mine-container {
  104. width: 100%;
  105. height: 100%;
  106. .header-section {
  107. // padding: 15px 15px 45px 15px;
  108. background-color: white;
  109. // color: white;
  110. .login-tip {
  111. font-size: 18px;
  112. margin-left: 10px;
  113. }
  114. .cu-avatar {
  115. border: 2px solid #eaeaea;
  116. .icon {
  117. font-size: 40px;
  118. }
  119. }
  120. .user-info {
  121. margin-left: 15px;
  122. display: flex;
  123. .u_title {
  124. font-size: 18px;
  125. line-height: 30px;
  126. }
  127. .sub_title{
  128. font-size: 12px;
  129. height: 30px;
  130. // line-height: 30px;
  131. margin-left: 15px;
  132. background-color: #f5f6f7;
  133. padding: 5px 8px;
  134. border-radius: 20px;
  135. display: flex;
  136. justify-content: center;
  137. align-items: center;
  138. }
  139. }
  140. }
  141. .content-section {
  142. position: relative;
  143. // top: -50px;
  144. .mine-actions {
  145. margin: 15px 15px;
  146. padding: 20px 0px;
  147. border-radius: 8px;
  148. background-color: white;
  149. .action-item {
  150. .icon {
  151. font-size: 28px;
  152. }
  153. .text {
  154. display: block;
  155. font-size: 13px;
  156. margin: 8px 0px;
  157. }
  158. }
  159. }
  160. }
  161. }
  162. </style>