张含笑
2025-10-23 2396350b531d575d93300b0fea66f059f1722cc7
src/pages/user/index.vue
@@ -10,7 +10,7 @@
            <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
            <view class="departs">
               <img src="/src/static/images/user/mobile.svg" alt="" />
               <span>中图智飞(江西省)</span>
               <span>{{user.deptName}}</span>
            </view>
         </view>
         <view class="rightLogo">
@@ -38,6 +38,11 @@
<script setup>
   import {
      getUserInfo,
      updateInfo,
      updatePassword
   } from '@/api/user/index.js';
   import {
      useClipboard
   } from "@/hooks";
   import {
@@ -55,14 +60,11 @@
      getClipboardData
   } = useClipboard();
   const userStore = useUserStore();
   console.log('userStore', userStore.userInfo);
   // 复制
   const toCopy = async () => {
      await setClipboardData({
         data: "1234567890"
   const user = ref('')
   const getUserInfoData = () => {
      getUserInfo().then(res => {
          user.value = res.data.data;
      });
      const data = await getClipboardData();
   };
   function logOut() {
@@ -93,6 +95,7 @@
   // 登录鉴权,微信小程序端点击tabbar的底层逻辑不触发uni.switchTab,需要在页面onShow生命周期中校验权限
   onShow(async () => {
      getDeviceRegion()
      getUserInfoData()
      uni.setTabBarItem({
        index: 2, // Tab 的索引(从0开始)
        visible: false,