chenyao
2025-11-08 5aeb8c60920f72382b57c81b3789b127a941f46a
src/pages/user/index.vue
@@ -1,48 +1,48 @@
<!-- 我的 -->
<template>
  <view class="page-wrap">
  <view class="userBox">
     <view class="flex items-center pb-30rpx pl-30rpx pr-20rpx">
       <view class="mr-20rpx">
         <u-avatar :src="user.avatar" size="70" />
       </view>
       <view class="flex-1">
         <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
         <view class="departs">
           <image src="@/static/images/user/mobile.svg" alt="" />
           <span>{{user.deptName}}</span>
         </view>
       </view>
       <view class="rightLogo">
         <image src="@/static/images/user/logo2.png" alt="" />
       </view>
     </view>
     <view class="personalInformation">
       <div class="message">
         <div class="messagebox">个人信息</div>
         <div class="editInfo" @click="handelEdit(1)">点击编辑
           <image src="@/static/images/user/rightBtn.svg" alt="" />
         </div>
       </div>
       <div class="passwordBox">
         <div class="messagebox">修改密码</div>
         <div class="editInfo" @click="handelEdit(2)">点击编辑 <image src="@/static/images/user/rightBtn.svg" alt="" />
         </div>
       </div>
     </view>
    <view class="flex items-center pb-30rpx pl-30rpx pr-20rpx">
      <view class="mr-20rpx">
        <u-avatar :src="user.avatar" size="70" />
      </view>
      <view class="flex-1">
        <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
        <view class="departs">
          <img src="/src/static/images/user/mobile.svg" alt="" />
          <span>{{user.deptName}}</span>
        </view>
      </view>
      <view class="rightLogo">
        <img src="/src/static/images/user/logo2.png" alt="" />
      </view>
    </view>
    <view class="personalInformation">
      <div class="message">
        <div class="messagebox">个人信息</div>
        <div class="editInfo" @click="handelEdit(1)">点击编辑
          <img src="/src/static/images/user/rightBtn.svg" alt="" />
        </div>
      </div>
      <div class="passwordBox">
        <div class="messagebox">修改密码</div>
        <div class="editInfo" @click="handelEdit(2)">点击编辑 <img src="/src/static/images/user/rightBtn.svg" alt="" />
        </div>
      </div>
    </view>
    <view class="mt-20rpx">
      <div class="goOutStyle" @click="logOut">退出登录</div>
    </view>
    <div class="bottomLogo"><img src="/src/static/images/user/logo1.png" alt="" /></div>
     <view class="mt-20rpx">
       <div class="goOutStyle" @click="logOut">退出登录</div>
     </view>
     <div class="bottomLogo"><image src="@/static/images/user/logo1.png" alt="" /></div>
  </view>
  </view>
</template>
<script setup>
  import {
    getUserInfo,
    updateInfo,
    updatePassword
  } from '@/api/user/index.js';
  import {
    useClipboard
@@ -71,14 +71,14 @@
  function logOut() {
    userStore.setUserInfo(null)
    uni.redirectTo({
    uni.reLaunch({
      url: '/pages/login/index'
    })
  }
  function getDeviceRegion() {
    getDeviceRegionApi().then(res => {
      // console.log(res.data.data, '用户设备')
    })
  }
  const handelEdit = (val) => {
@@ -113,9 +113,10 @@
    width: 100%;
    height: 100%;
    padding-top: 88rpx;
  }
.userBox {
    padding-top: 88rpx;
}
  .userName {
    font-weight: 700;
    font-size: 36rpx;
@@ -127,6 +128,11 @@
    display: flex;
    align-items: center;
    margin-top: 22rpx;
    image {
      width: 28rpx;
      height: 28rpx;
    }
    span {
      font-family: "Source Han Sans CN";
@@ -141,7 +147,7 @@
    width: 200rpx;
    height: 80rpx;
    img {
    image {
      width: 100%;
      height: 100%;
    }
@@ -155,7 +161,7 @@
    margin: 0 auto;
    text-align: center;
    img {
    image {
      width: 128rpx;
      height: 52rpx;
    }
@@ -203,7 +209,7 @@
        display: flex;
        align-items: center;
        img {
        image {
          width: 28rpx;
          height: 28rpx;
        }
@@ -211,13 +217,13 @@
    }
    .message {
      background: url('/src/static/images/user/info.png') no-repeat center;
      background: url(@/static/images/user/info.png) no-repeat center;
      background-size: 100% 100%;
    }
    .passwordBox {
      background: url('/src/static/images/user/password.png') no-repeat center;
      background: url(@/static/images/user/password.png) no-repeat center;
      background-size: 100% 100%;
    }