index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="content">
  3. <!-- 用户信息部分 -->
  4. <view class="user-info">
  5. <image :src="headImg" class="avatar"></image>
  6. <view class="info-detail">
  7. <view>
  8. <text>{{ userInfo.name}}</text>
  9. </view>
  10. <text>ID: {{ userInfo.id }}</text>
  11. <view>
  12. <text>{{ userInfo.department}} | {{ userInfo.position }}</text>
  13. </view>
  14. </view>
  15. <button @click="navigateTo('personal_message/personal_message')">查看资料</button>
  16. </view>
  17. <!-- 功能按钮区 -->
  18. <view class="function-list">
  19. <view class="function-item" @click="handleButtonClick1">
  20. <image :src="messageEdit" class="icon"></image>
  21. <text class="title">编辑资料</text>
  22. <text class="desc">></text>
  23. </view>
  24. <view class="function-item" @click="handleButtonClick2">
  25. <image :src="waitWork" class="icon"></image>
  26. <text class="title">待办事项</text>
  27. <text class="desc">></text>
  28. </view>
  29. <view class="function-item" @click="handleButtonClick3">
  30. <image :src="checkIn" class="icon"></image>
  31. <text class="title">我的考勤</text>
  32. <text class="desc">></text>
  33. </view>
  34. <view class="function-item" @click="handleButtonClick4">
  35. <image :src="setting" class="icon"></image>
  36. <text class="title">应用设置</text>
  37. <text class="desc">></text>
  38. </view>
  39. </view>
  40. <!-- <view class="function_btns">
  41. <button type="primary" @click="schedule">
  42. <uni-icons type="contact" size="30"></uni-icons>
  43. 待办事项</button>
  44. <button type="primary" @click="clockingIn" style="background-color: cornflowerblue;">我的考勤</button>
  45. <button type="default" @click="modifyPassword">密码修改</button>
  46. <button type="warn" @click="logout">退出登录</button>
  47. </view> -->
  48. </view>
  49. </template>
  50. <script setup>
  51. import {
  52. ref,
  53. reactive,
  54. onMounted
  55. } from 'vue';
  56. import headImg from "/static/images/mine/headImg.jpg"
  57. import setting from "/static/images/mine/setting.png"
  58. import checkIn from "/static/images/mine/checkIn.png"
  59. import waitWork from "/static/images/mine/waitWork.png"
  60. import messageEdit from "/static/images/mine/edit.png"
  61. // onMounted()=>{
  62. // console.log(functionBtns)
  63. // }
  64. const userInfo = ref({
  65. id: '123',
  66. name: '张三',
  67. department: '研发部',
  68. position: '软件开发工程师'
  69. });
  70. // function modifyPassword() {
  71. // navigateTo('edit/edit')
  72. // };
  73. // function logout() {
  74. // console.log('点击了退出登录');
  75. // };
  76. import $tab from "@/plugins/tab.js"
  77. function handleButtonClick1() {
  78. $tab.navigateTo('edit/edit')
  79. };
  80. function handleButtonClick4() {
  81. $tab.navigateTo('setting/setting')
  82. };
  83. </script>
  84. <style lang="scss" scoped>
  85. .content {
  86. display: flex;
  87. flex-direction: column;
  88. }
  89. .user-info {
  90. display: flex;
  91. align-items: center;
  92. padding: 20rpx;
  93. border-bottom: 1rpx solid #ddd;
  94. }
  95. .avatar {
  96. width: 120rpx;
  97. height: 120rpx;
  98. margin-right: 20rpx;
  99. border-radius: 50%;
  100. }
  101. .info-detail {
  102. flex-grow: 1;
  103. }
  104. .function-list {
  105. margin-bottom: 60rpx;
  106. }
  107. .function-item {
  108. display: flex;
  109. align-items: center;
  110. justify-content: space-between;
  111. padding: 20rpx;
  112. background-color: #f5f5f5;
  113. border-radius: 10rpx;
  114. margin-bottom: 20rpx;
  115. border-bottom:1px solid gainsboro;
  116. }
  117. .icon {
  118. width: 50rpx;
  119. height: 50rpx;
  120. margin-right: 20rpx;
  121. }
  122. .title {
  123. flex-grow: 1;
  124. font-size: 32rpx;
  125. }
  126. .desc {
  127. color: #999;
  128. margin-right: 20rpx;
  129. }
  130. </style>