【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
4.0 KiB

4 months ago
4 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
4 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 months ago
2 months ago
4 months ago
4 months ago
4 months ago
  1. <template>
  2. <div class="center">
  3. <!-- 用户信息 -->
  4. <div class="user-info">
  5. <div class="user-box">
  6. <div class="user-img">
  7. <image :src="userInfo.headImage" mode="widthFix"></image>
  8. </div>
  9. <div class="base">
  10. <div class="user-name" v-if="userInfo.auth">{{ userInfo.auth.name }}</div>
  11. <!-- <div class="user-project">高新区项目一队项目1</div> -->
  12. <view class="user-project" v-if="userInfo.team">{{ userInfo.team.name }}</view>
  13. </div>
  14. </div>
  15. <image class="user-bg"
  16. src="/static/image/center/1.png" mode="widthFix">
  17. </image>
  18. </div>
  19. <!-- 菜单 -->
  20. <div class="menus">
  21. <uv-cell-group :border="false">
  22. <uv-cell @click="clickMenu(1)" title="打卡记录" isLink arrow-direction="right" center>
  23. <template v-slot:icon>
  24. <image style="width: 30rpx;"
  25. src="/static/image/center/2.png"
  26. mode="widthFix"></image>
  27. </template>
  28. </uv-cell>
  29. <uv-cell @click="clickMenu(2)" icon="setting-fill" isLink arrow-direction="right" title="实名认证" center>
  30. <template v-slot:icon>
  31. <image style="width: 30rpx;"
  32. src="/static/image/center/2.png"
  33. mode="widthFix"></image>
  34. </template>
  35. </uv-cell>
  36. <uv-cell @click="$store.commit('logout')" icon="setting-fill" isLink arrow-direction="right"
  37. title="退出登录" center>
  38. <template v-slot:icon>
  39. <image style="width: 30rpx;"
  40. src="/static/image/center/3.png"
  41. mode="widthFix"></image>
  42. </template>
  43. </uv-cell>
  44. <uv-cell @click="clickMenu" icon="integral-fill" title="版本" value="版本1.0" center>
  45. <template v-slot:icon>
  46. <image style="width: 30rpx;"
  47. src="/static/image/center/4.png"
  48. mode="widthFix"></image>
  49. </template>
  50. </uv-cell>
  51. <uv-cell @click="setting"
  52. v-if="userInfo.adminFlag"
  53. icon="integral-fill" title="项目管理" isLink center>
  54. <template v-slot:icon>
  55. <image style="width: 30rpx;"
  56. src="/static/image/center/4.png"
  57. mode="widthFix"></image>
  58. </template>
  59. </uv-cell>
  60. </uv-cell-group>
  61. </div>
  62. <tabbar :select="1"></tabbar>
  63. </div>
  64. </template>
  65. <script>
  66. import tabbar from '../../components/base/tabbar.vue'
  67. import {
  68. mapState
  69. } from 'vuex'
  70. export default {
  71. name: "Center",
  72. components: {
  73. tabbar
  74. },
  75. data() {
  76. return {
  77. }
  78. },
  79. onShow() {
  80. this.$store.commit('getUserInfo')
  81. },
  82. computed: {
  83. ...mapState(['teamList', 'userInfo']),
  84. },
  85. methods: {
  86. clickMenu(index) {
  87. if (index == 1) {
  88. uni.navigateTo({
  89. url: "/pages/subPack/record/record"
  90. })
  91. } else if (index == 2) {
  92. uni.navigateTo({
  93. url: "/pages/subPack/autonym/autonym"
  94. })
  95. }
  96. },
  97. setting(){
  98. // 美国纽约 42.6511674, -73.754968
  99. // uni.chooseLocation({
  100. // latitude: 73.754968,
  101. // longitude: 42.6511674,
  102. // success(res) {
  103. // uni.showModal({
  104. // title: JSON.stringify(res)
  105. // })
  106. // }
  107. // })
  108. uni.navigateTo({
  109. url: '/pages/subPack/projectManage/projectManage'
  110. })
  111. },
  112. }
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. .center {
  117. // 用户信息
  118. .user-info {
  119. display: flex;
  120. align-items: center;
  121. position: relative;
  122. height: 325rpx;
  123. overflow: hidden;
  124. padding-top: var(--status-bar-height);
  125. .user-box {
  126. display: flex;
  127. width: 90%;
  128. position: absolute;
  129. left: 50%;
  130. transform: translateX(-50%);
  131. z-index: 10;
  132. color: white;
  133. .user-img {
  134. width: 130rpx;
  135. height: 130rpx;
  136. overflow: hidden;
  137. image {
  138. width: 100%;
  139. }
  140. }
  141. .base {
  142. width: calc(100% - 150rpx);
  143. display: flex;
  144. flex-direction: column;
  145. justify-content: space-around;
  146. box-sizing: border-box;
  147. padding: 10rpx 0rpx 10rpx 10rpx;
  148. .user-name {
  149. font-size: 36rpx;
  150. }
  151. .user-project {
  152. font-size: 30rpx;
  153. }
  154. }
  155. }
  156. .user-bg {
  157. width: 750rpx;
  158. position: absolute;
  159. left: 0;
  160. top: 0;
  161. }
  162. }
  163. // 菜单
  164. .menus {
  165. width: 90%;
  166. margin: 0rpx auto;
  167. }
  168. }
  169. </style>