From 2396350b531d575d93300b0fea66f059f1722cc7 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 23 Oct 2025 14:39:38 +0800
Subject: [PATCH] feat:我的

---
 src/pages/user/index.vue |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue
index 416f648..da779cd 100644
--- a/src/pages/user/index.vue
+++ b/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,

--
Gitblit v1.9.3