From 6d009f08368f93713c1ebeca6acde4163042faa4 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 23 Oct 2025 19:22:32 +0800
Subject: [PATCH] feat: 配置
---
src/pages/user/index.vue | 62 +++++++++++++++++++------------
1 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue
index b98003c..da779cd 100644
--- a/src/pages/user/index.vue
+++ b/src/pages/user/index.vue
@@ -1,7 +1,7 @@
<!-- 我的 -->
<template>
<view class="page-wrap">
- <u-navbar title="" placeholder left-icon="" right-icon="camera-fill" />
+
<view class="flex items-center pb-30rpx pl-30rpx pr-20rpx">
<view class="mr-20rpx">
<u-avatar :src="userStore?.userInfo?.avatar" size="70" />
@@ -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">
@@ -32,10 +32,16 @@
<view class="mt-20rpx">
<div class="goOutStyle" @click="logOut">退出登录</div>
</view>
+ <div class="bottomLogo"><img src="/src/static/images/user/logo1.svg" alt="" /></div>
</view>
</template>
<script setup>
+ import {
+ getUserInfo,
+ updateInfo,
+ updatePassword
+ } from '@/api/user/index.js';
import {
useClipboard
} from "@/hooks";
@@ -54,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() {
@@ -92,24 +95,28 @@
// 登录鉴权,微信小程序端点击tabbar的底层逻辑不触发uni.switchTab,需要在页面onShow生命周期中校验权限
onShow(async () => {
getDeviceRegion()
- // window.addEventListener('message', (event) => {
- // console.log('message')
- // })
- // setInterval(() => {
- // sWebViewRef.value.evalJs(`x_sun('${test.value}')`)
- // }, 2000)
+ getUserInfoData()
+ uni.setTabBarItem({
+ index: 2, // Tab 的索引(从0开始)
+ visible: false,
+ })
+ uni.setTabBarItem({
+ index: 3, // Tab
+ visible: true,
+ });
});
</script>
<style scoped lang="scss">
.page-wrap {
width: 100%;
- height: 298px;
- background: url('/src/static/images/user/userBg.svg') no-repeat center;
- background-size: 100% 100%;
+ height: 100%;
+ background: url('/src/static/images/user/allBg.svg') no-repeat center center;
+ background-size: cover;
+ padding-top: 44px;
}
.userName {
- font-family: Source Han Sans CN, Source Han Sans CN;
+ font-family: "Source Han Sans CN";
font-weight: 500;
font-size: 18px;
color: #000000;
@@ -122,7 +129,7 @@
margin-top: 11px;
span {
- font-family: Source Han Sans CN, Source Han Sans CN;
+ font-family: "Source Han Sans CN";
font-weight: 400;
font-size: 14px;
color: rgba(0, 0, 0, 0.6);
@@ -134,13 +141,20 @@
width: 100px;
height: 40px;
}
-
+ .bottomLogo {
+ position: absolute;
+ bottom: 25px;
+ left: 0;
+ right: 0;
+ margin: 0 auto;
+ text-align: center;
+ }
.goOutStyle {
width: 295px;
height: 38px;
background: #1D6FE9;
border-radius: 20px 20px 20px 20px;
- font-family: Source Han Sans CN, Source Han Sans CN;
+ font-family: "Source Han Sans CN";
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
@@ -161,7 +175,7 @@
height: 80px;
.messagebox{
padding: 10px 12px;
- font-family: Source Han Sans CN, Source Han Sans CN;
+ font-family: "Source Han Sans CN";
font-weight: 500;
font-size: 14px;
color: #000000;
@@ -169,7 +183,7 @@
.editInfo {
padding: 10px 12px;
color: rgba(0, 0, 0, 0.5);
- font-family: Source Han Sans CN, Source Han Sans CN;
+ font-family: "Source Han Sans CN";
font-weight: 400;
font-size: 12px;
display: flex;
--
Gitblit v1.9.3