From 965e92b958ebc50dc7d475da9e198f135091f93f Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Wed, 22 Oct 2025 13:45:38 +0800
Subject: [PATCH] feat:我的
---
src/subPackages/userDetail/infos/index.vue | 68 ++++++++++++++++++++++++++++++++-
1 files changed, 65 insertions(+), 3 deletions(-)
diff --git a/src/subPackages/userDetail/infos/index.vue b/src/subPackages/userDetail/infos/index.vue
index c88ced3..8ada4dd 100644
--- a/src/subPackages/userDetail/infos/index.vue
+++ b/src/subPackages/userDetail/infos/index.vue
@@ -1,8 +1,70 @@
<!-- 个人资料 -->
<template>
- <view> 基础 </view>
+ <view class="infoBox">
+ <div class="avatarBox">
+ <u-avatar :src="userInfo.avatar" size="114" mode="aspectFill" />
+ </div>
+
+ </view>
+ <viewclass="detailBox">
+ 111
+ </view>
</template>
-<script setup></script>
+<script setup>
+ import { getUserInfo, updateInfo, updatePassword } from '@/api/user/index.js';
-<style lang="scss" scoped></style>
+ const userInfo = ref({
+ id: '',
+ avatar: '',
+ realName: '',
+ name: '',
+ phone: '',
+ email: '',
+ deptName: '',
+ });
+ const getUserInfoData = () => {
+ getUserInfo().then(res => {
+ const user = res.data.data;
+
+ userInfo.value = {
+ id: user.id,
+ avatar: user.avatar,
+ name: user.name,
+ realName: user.realName,
+ phone: user.phone,
+ email: user.email,
+ deptName: user.deptName,
+ };
+ console.log('用户信息',userInfo.value)
+ });
+ };
+ onShow(async () => {
+ getUserInfoData()
+ });
+</script>
+
+<style lang="scss" scoped>
+ .infoBox {
+ width: 100%;
+ height: 298px;
+ background: url('/src/static/images/user/userBg.svg') no-repeat center;
+ background-size: 100% 100%;
+ display: flex;
+ justify-content: center;
+
+ .avatarBox {
+ width: 114px;
+ height: 114px;
+ margin: 38px 0;
+
+ }
+
+ }
+ .detailBox {
+ width: 351px;
+ height: 215px;
+ background: #FFFFFF;
+ border-radius: 6px 6px 6px 6px;
+ }
+</style>
--
Gitblit v1.9.3