From cc610ef597a4b600b4c48c80026f3a99be171f3b Mon Sep 17 00:00:00 2001
From: yuanhao <yuanhao_2024>
Date: 星期一, 19 五月 2025 18:03:48 +0800
Subject: [PATCH] fix: scss跟背景图

---
 policy/components/mine.vue |   38 ++++++++++++++++++++++++++++++--------
 1 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/policy/components/mine.vue b/policy/components/mine.vue
index 3f95cd8..da1dd99 100644
--- a/policy/components/mine.vue
+++ b/policy/components/mine.vue
@@ -6,12 +6,12 @@
 				<image src="/static/policy/header.png" mode="widthFix"></image>
 				<view class="user-info">
 					<view class="user-name">
-						<view class="inckname">鍒樺皬闆�</view>
+						<view class="inckname">{{userInfo.data.nickName}}</view>
 						<view class="direc"></view>
 						<view class="dept-per">鎵ф硶浜哄憳</view>
 					</view>
-					<view class="dept-name">
-						鐜繚灞�--绗竴閮ㄩ棬
+					<view class="dept-name u-line-1">
+						{{userInfo.data.dept.deptName}}
 					</view>
 				</view>
 			</view>
@@ -19,18 +19,19 @@
 		<view class="main-box">
 			<view class="show-phone-number">
 				<text class="label">鑱旂郴鐢佃瘽</text>
-				<text>168****4164</text>
+				<text v-if="userInfo.data.phonenumber">{{userInfo.data.phonenumber.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}}</text>
+				<text v-else>鏆傛棤鎵嬫満鍙�</text>
 			</view>
 			<view class="show-phone-number" @click="goChangePhone">
 				<view class="set-flex">
 					<!-- <u-icon name="phone" size="22"></u-icon> -->
 					<image src="/static/policy/phone.png" mode="widthFix"></image>
-					<text class="change" >淇敼鎵嬫満鍙�</text>
+					<text class="change">淇敼鎵嬫満鍙�</text>
 				</view>
 				<u-icon name="arrow-right"></u-icon>
 			</view>
 		</view>
-		<view class="logout">
+		<view class="logout" @click="logOut">
 			閫�鍑虹櫥褰�
 		</view>
 	</view>
@@ -38,6 +39,12 @@
 
 <script>
 	export default {
+		props: {
+			userInfo: {
+				type: Object,
+				default: () => ({})
+			},
+		},
 		data(){
 			return {
 				src: '/static/policy/header.png'
@@ -46,7 +53,21 @@
 		methods: {
 			goChangePhone() {
 				uni.navigateTo({
-					url: '/policy/changePhone/changePhone'
+					url: `/policy/changePhone/changePhone?code=${this.userInfo.data.userType}`
+				})
+			},
+			logOut() {
+				uni.showModal({
+					title: '鎻愮ず',
+					content: '纭閫�鍑虹櫥褰曪紵',
+					success: res => {
+						if(res.confirm) {
+							uni.clearStorageSync()
+							uni.redirectTo({
+								url: '/pages/index/index'
+							})
+						}
+					}
 				})
 			}
 		}
@@ -75,6 +96,7 @@
 				.user-info{
 					margin-left: 24rpx;
 					color: white;
+					width: calc(100% - 108rpx);
 					.user-name{
 						display: flex;
 						justify-content: flex-start;
@@ -138,7 +160,7 @@
 			width: calc(100% - 64rpx);
 			left: 32rpx;
 			position: fixed;
-			bottom: 180rpx;
+			bottom: 220rpx;
 		}
 		.inckname{
 			font-size: 36rpx;

--
Gitblit v1.9.1