From 38130802e3fd55080f518f4128ef20ddfdd907c3 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 10 九月 2024 17:11:14 +0800
Subject: [PATCH] -

---
 src/pages/enterprise/index.vue |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/pages/enterprise/index.vue b/src/pages/enterprise/index.vue
index 4631e03..bfb1dc9 100644
--- a/src/pages/enterprise/index.vue
+++ b/src/pages/enterprise/index.vue
@@ -1,8 +1,8 @@
 <template>
 	<view class="">
-		<view class="content chuany-flex chuany-align-end chuany-justify-center">
-			<up-avatar src="/static/avatar.jpg" shape="circle" size='80'></up-avatar>
-		</view>
+		<!-- <view class="content chuany-flex chuany-align-end chuany-justify-center">
+			<up-avatar :src="avatarUrlImg" shape="circle" size='80'></up-avatar>
+		</view> -->
 		<fui-list :topBorder='false'>
 			<fui-list-cell arrow :bottomBorder='false' :padding="['20rpx', '32rpx', '20rpx', '32rpx']">
 				<view class="fui-list__item">
@@ -43,7 +43,7 @@
 		$db
 	} = getCurrentInstance().appContext.config.globalProperties
 	onShow(() => {
-		let data = JSON.parse($db.get('userInfo')).userCompany
+		let data = $db.get('userInfo') ? JSON.parse($db.get('userInfo')).userCompany : null
 		if (data) {
 			enterpriseInfo.businessLicense = data.businessLicense
 			enterpriseInfo.suppliername = data.suppliername //浼佷笟鍚嶇О
@@ -56,6 +56,13 @@
 			enterpriseInfo.resume = data.resume
 		}
 	})
+
+	let avatarUrlImg = ref('')
+	onLoad(() => {
+		// getUser()
+		let obj = $db.get('userInfo') ? JSON.parse($db.get('userInfo')) : {}
+		avatarUrlImg = obj.avatar
+	})
 	const enterpriseInfo = reactive({
 		id: 0, //鐢ㄦ埛鍏徃Id
 		businessLicense: '', //钀ヤ笟鎵х収璺緞

--
Gitblit v1.9.1