From 964faa1077a89713910063c39ebe08fac4e4c56e Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期四, 24 七月 2025 17:44:18 +0800
Subject: [PATCH] 企业维修适配修改

---
 pages/user/people.vue |   68 +++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/pages/user/people.vue b/pages/user/people.vue
index 896a5bd..17c1530 100644
--- a/pages/user/people.vue
+++ b/pages/user/people.vue
@@ -2,16 +2,21 @@
 	<view>
 		<scroll-view scroll-y class="page">
 			  <!-- 澶撮儴logo-->
-		  <view class="UCenter-bg">
-		    <image :src="personalList.avatar" class="png round animation-slide-right margin-bottom-sm" mode="scaleToFill" :style="[{animationDelay: '0.1s'}]"></image>
-		    <image src="https://static.jeecg.com/upload/test/wave_1595818053612.gif" mode="scaleToFill" class="gif-wave"></image>
-		  </view>
+		 <view class="UCenter-bg">
+		 	<image src="/static/avatar_boy.png" class="png round animation-slide-right margin-bottom-sm"
+		 		mode="scaleToFill" :style="[{animationDelay: '0.1s'}]"></image>
+		 	<image src="https://static.jeecg.com/upload/test/wave_1595818053612.gif" mode="scaleToFill"
+		 		class="gif-wave"></image>
+		 </view>
 		  <view class="padding flex text-center text-grey bg-white shadow-warp">
 		    <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
 		      <view class="text-xl text-orange">{{personalList.username}}</view>
 			  <view class="margin-top-sm"><text class="cuIcon-people"></text> 鐢ㄦ埛</view>
 		    </view>
-		    
+		    <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]">
+		      <view class="text-xl text-blue">{{personalList.workNo?personalList.workNo:'宸ュ彿'}}</view>
+		      <view class="margin-top-sm"><text class="cuIcon-activity"></text> 宸ュ彿</view>
+		    </view>
 		    <view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]">
 		      <view class="text-xl text-green">{{personalList.post?personalList.post:'鍛樺伐'}}</view>
 		      <view class="margin-top-sm"><text class="cuIcon-news"></text> 鑱屽姟</view>
@@ -19,7 +24,7 @@
 		  </view>
 		  <!-- 鍒楄〃list-->
 		  <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
-		    <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]">
+		    <!-- <view class="cu-item arrow animation-slide-bottom" :style="[{animationDelay: '0.1s'}]">
 		      <view class="content" >
 		        <text class="cuIcon-favorfill text-yellow"></text>
 		        <text class="text-grey">鏀惰棌</text>
@@ -42,7 +47,7 @@
 				    <text class="cuIcon-location text-cyan"></text>
 					<text class="text-grey">瀹氫綅</text>
 				</view>
-			</navigator>
+			</navigator> -->
 			<navigator class="cu-item arrow animation-slide-bottom" url="/pages/user/userdetail" :style="[{animationDelay: '0.6s'}]">
 			     <view class="content">
 				    <text class="cuIcon-settingsfill text-cyan"></text>
@@ -72,7 +77,8 @@
 				  avatar:'',
 				  realname:'',
 				  username:'',
-				  post:''
+				  post:'',
+				  workNo:''
 				},
 				  positionUrl:'/sys/position/list',
 				  departUrl:'/sys/user/userDepartList',
@@ -82,15 +88,21 @@
 				  id:''
 			};
 		},
-		watch: {
-			cur: {
-				immediate: true,
-				handler() {
-					console.log('watch',this.cur)
-				    this.userId=this.$store.getters.userid;
-					this.load()
-				},
-			},
+		// watch: {
+		// 	cur: {
+		// 		immediate: true,
+		// 		handler() {
+		// 			console.log('watch',this.cur)
+		// 		    this.userId=this.$store.getters.userid;
+		// 			this.load()
+		// 		},
+		// 	},
+		// },
+		
+		created() {
+		this.id=uni.getStorageSync("userId");
+		console.log(this.id);
+		this.load();
 		},
 		methods: {
 			scan(){
@@ -109,20 +121,18 @@
 				// #endif
 			},
 			load(){
-				if(!this.userId){
+				this.$http.get(this.userUrl,{params:{id:this.id}}).then(res=>{
 					
-					return;
-				}
-				this.$http.get(this.userUrl,{params:{id:this.userId}}).then(res=>{
-					console.log("res",res)
 					 if (res.data.success) {
-						let perArr = res.data.result
-				        let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png'
-						this.personalList.avatar =avatar
-						this.personalList.realname = perArr.realname
-						this.personalList.username = perArr.username
-						this.personalList.depart = perArr.departIds
-					    this.getpost(perArr.post)
+						console.log("res",res)
+						
+				        // let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png'
+						this.personalList.avatar =res.data.result.avatar
+						this.personalList.workNo =res.data.result.workNo
+						// this.personalList.realname = perArr.realname
+						this.personalList.username = res.data.result.realname
+						// this.personalList.depart = perArr.departIds
+							this.getpost(res.data.result.post)
 					}
 				}).catch(err => {
 					console.log(err);

--
Gitblit v1.9.3