张含笑
2025-10-23 839acd1fe3dec49c00f89522aceda084987b2dfd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!-- 个人资料 -->
<template>
  <view class="infoBox"> 
  <div class="avatarBox">
      <u-avatar :src="userInfo.avatar" size="114" mode="aspectFill" />
  </div>
 
   </view>
   <viewclass="detailBox">
         111
   </view>
</template>
 
<script setup>
    import { getUserInfo, updateInfo, updatePassword } from '@/api/user/index.js';
 
    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>