xsh_1997 il y a 5 jours
Parent
commit
715149be13

+ 1 - 1
huimv-employment/app/.env.development

@@ -1,2 +1,2 @@
1 1
 # 开发环境 API 地址(微信小程序等直连;H5 浏览器开发自动走 /api 代理,见 vue.config.js)
2
-VUE_APP_BASE_API=https://img.ifarmcloud.com/deploymentApi/api/v1/mp
2
+VUE_APP_BASE_API=http://192.168.1.6:8081/api/v1/mp

+ 1 - 1
huimv-employment/app/common/config.js

@@ -1,5 +1,5 @@
1 1
 /** 小程序直连 API(体验版/开发版统一;有正式 HTTPS 域名后再改 env) */
2
-const MP_API = 'https://img.ifarmcloud.com/deploymentApi/api/v1/mp'
2
+const MP_API = 'http://192.168.1.6:8081/api/v1/mp'
3 3
 
4 4
 /** H5 开发走 devServer 代理,避免浏览器跨域 */
5 5
 const H5_DEV_PROXY_API = '/api/v1/mp'

+ 1 - 1
huimv-employment/app/common/fe.scss

@@ -1511,7 +1511,7 @@ page {
1511 1511
 
1512 1512
 .fe-sidebar {
1513 1513
 	position: fixed;
1514
-	top: $fe-h-page-bar;
1514
+	top: 0;
1515 1515
 	left: 0;
1516 1516
 	bottom: 0;
1517 1517
 	width: 0;

+ 15 - 11
huimv-employment/app/common/store.js

@@ -39,20 +39,23 @@ const store = {
39 39
 			this.state.user.avatarText = nickname.charAt(0)
40 40
 		}
41 41
 
42
+		// 每次登录先清登记态,避免沿用上一账号本地缓存;最终以 /getInfo 为准
42 43
 		if (role === 'worker') {
43
-			if (!this.state.worker) {
44
-				this.state.worker = defaultWorker()
45
-			}
44
+			this.state.worker = defaultWorker()
46 45
 			if (mobile) {
47 46
 				this.state.worker.phone = mobile
48 47
 			}
49 48
 			if (typeof newUser === 'boolean') {
50 49
 				this.state.worker.registered = !newUser
51 50
 			}
52
-		}
53
-
54
-		if (role === 'enterprise' && typeof newUser === 'boolean') {
55
-			this.state.enterprise.registered = !newUser
51
+		} else {
52
+			this.state.enterprise = {
53
+				...this.state.enterprise,
54
+				registered: false
55
+			}
56
+			if (typeof newUser === 'boolean') {
57
+				this.state.enterprise.registered = !newUser
58
+			}
56 59
 		}
57 60
 
58 61
 		this.persist()
@@ -176,14 +179,15 @@ const store = {
176 179
 
177 180
 	getLoginEntryUrl(role, needRegister) {
178 181
 		const r = role === 'worker' ? 'worker' : 'enterprise'
182
+		// 企业:登录即可进首页,未认证不拦,在「我的」展示游客态
183
+		if (r === 'enterprise') {
184
+			return this.getHomeUrl()
185
+		}
179 186
 		if (needRegister === true) {
180 187
 			return this.getRegisterUrl(r)
181 188
 		}
182 189
 		if (typeof needRegister !== 'boolean') {
183
-			const unregistered = r === 'worker'
184
-				? !this.isWorkerRegistered()
185
-				: !this.isEnterpriseRegistered()
186
-			if (unregistered) return this.getRegisterUrl(r)
190
+			if (!this.isWorkerRegistered()) return this.getRegisterUrl(r)
187 191
 		}
188 192
 		return this.getHomeUrl()
189 193
 	},

+ 18 - 13
huimv-employment/app/packageA/auth/login.vue

@@ -380,11 +380,9 @@ export default {
380 380
 		},
381 381
 		redirectAfterLogin(role, needRegister) {
382 382
 			if (this.redirectUrl) {
383
-				if (needRegister) {
384
-					const reg = role === 'worker'
385
-						? '/packageA/worker/register'
386
-						: '/packageA/enterprise/register'
387
-					uni.reLaunch({ url: this.appendRedirectQuery(reg) })
383
+				// 仅临时工未登记时强制去登记;企业可先逛后认证
384
+				if (needRegister && role === 'worker') {
385
+					uni.reLaunch({ url: this.appendRedirectQuery('/packageA/worker/register') })
388 386
 					return
389 387
 				}
390 388
 				uni.reLaunch({ url: this.redirectUrl })
@@ -405,25 +403,32 @@ export default {
405 403
 		},
406 404
 		async finishLoginAndRedirect(loginRes, mobile) {
407 405
 			const role = this.lockRole || (loginRes && loginRes.userType) || this.loginTab
408
-			const fallbackNeedRegister = !!(loginRes && loginRes.newUser)
406
+			const hasNewUserFlag = !!(loginRes && typeof loginRes.newUser === 'boolean')
407
+			const fallbackNeedRegister = hasNewUserFlag ? !!loginRes.newUser : true
409 408
 
410
-			store.login(role, {
409
+			const loginOptions = {
411 410
 				userId: loginRes && loginRes.userId,
412 411
 				mobileMask: loginRes && loginRes.mobileMask,
413 412
 				nickname: loginRes && loginRes.nickname,
414
-				mobile,
415
-				newUser: fallbackNeedRegister
416
-			})
413
+				mobile
414
+			}
415
+			if (hasNewUserFlag) {
416
+				loginOptions.newUser = loginRes.newUser
417
+			}
418
+			store.login(role, loginOptions)
417 419
 
418 420
 			let info = null
419 421
 			try {
420 422
 				info = await store.syncProfile({ showError: false })
421 423
 			} catch (e) {
422
-				// syncProfile 失败时沿用登录接口 newUser
424
+				// syncProfile 失败时按未登记处理
423 425
 			}
424 426
 
425 427
 			const finalRole = this.lockRole || this.resolveLoginRole(info, loginRes, this.loginTab)
426
-			const needRegister = info ? !info.registered : fallbackNeedRegister
428
+			// 企业不强制登记;临时工仍按 registered 跳转登记页
429
+			const needRegister = finalRole === 'enterprise'
430
+				? false
431
+				: (info ? !info.registered : fallbackNeedRegister)
427 432
 
428 433
 			showToast('登录成功')
429 434
 			this.redirectAfterLogin(finalRole, needRegister)
@@ -515,7 +520,7 @@ export default {
515 520
 		},
516 521
 		loginEnterprise() {
517 522
 			store.login('enterprise')
518
-			this.redirectAfterLogin('enterprise', !store.isEnterpriseRegistered())
523
+			this.redirectAfterLogin('enterprise', false)
519 524
 		},
520 525
 		loginWorker() {
521 526
 			store.login('worker')

+ 82 - 2
huimv-employment/app/packageA/chat/index.vue

@@ -1,11 +1,91 @@
1 1
 <template>
2
-	<view />
2
+	<view class="chat-root">
3
+		<view v-if="booting" class="chat-boot">
4
+			<view class="chat-boot__spinner" />
5
+			<text class="chat-boot__text">加载中...</text>
6
+		</view>
7
+		<EnterpriseHome v-else ref="enterpriseHome" :active="true" />
8
+	</view>
3 9
 </template>
4 10
 
5 11
 <script>
12
+import EnterpriseHome from '@/packageA/components/home/EnterpriseHome.vue'
13
+import store from '@/common/store.js'
14
+import { getToken } from '@/utils/request.js'
15
+
6 16
 export default {
17
+	components: { EnterpriseHome },
18
+	data() {
19
+		return {
20
+			booting: true
21
+		}
22
+	},
7 23
 	onLoad() {
8
-		uni.reLaunch({ url: '/packageA/home/index' })
24
+		this.bootstrap()
25
+	},
26
+	onShareAppMessage() {
27
+		const home = this.$refs.enterpriseHome
28
+		if (home && typeof home.getShareAppMessage === 'function') {
29
+			return home.getShareAppMessage()
30
+		}
31
+		return {
32
+			title: '用工邀请',
33
+			path: '/pages/worker/job-offer?scene=',
34
+			imageUrl: '/static/images/job.jpg'
35
+		}
36
+	},
37
+	methods: {
38
+		bootstrap() {
39
+			if (!getToken()) {
40
+				uni.reLaunch({ url: '/packageA/auth/login' })
41
+				return
42
+			}
43
+			const s = store.getState()
44
+			if (s.role === 'worker') {
45
+				uni.reLaunch({ url: '/packageA/home/index' })
46
+				return
47
+			}
48
+			this.booting = false
49
+		}
9 50
 	}
10 51
 }
11 52
 </script>
53
+
54
+<style lang="scss" scoped>
55
+.chat-root {
56
+	width: 100%;
57
+	height: 100vh;
58
+	overflow: hidden;
59
+	background: $fe-bg;
60
+}
61
+
62
+.chat-boot {
63
+	height: 100%;
64
+	display: flex;
65
+	flex-direction: column;
66
+	align-items: center;
67
+	justify-content: center;
68
+	gap: 24rpx;
69
+	background: $fe-surface;
70
+}
71
+
72
+.chat-boot__spinner {
73
+	width: 56rpx;
74
+	height: 56rpx;
75
+	border: 4rpx solid $fe-gray-200;
76
+	border-top-color: $fe-primary;
77
+	border-radius: 50%;
78
+	animation: chat-spin 0.8s linear infinite;
79
+}
80
+
81
+.chat-boot__text {
82
+	font-size: 28rpx;
83
+	color: $fe-gray-500;
84
+}
85
+
86
+@keyframes chat-spin {
87
+	to {
88
+		transform: rotate(360deg);
89
+	}
90
+}
91
+</style>

+ 28 - 11
huimv-employment/app/packageA/components/FeBottomNav.vue

@@ -1,11 +1,11 @@
1 1
 <template>
2 2
 	<view class="fe-bottom-nav">
3 3
 		<view
4
-			v-for="item in items"
4
+			v-for="(item, idx) in items"
5 5
 			:key="item.key"
6 6
 			class="fe-bottom-nav__item"
7 7
 			:class="{ 'fe-bottom-nav__item--active': current === item.key }"
8
-			@tap="go(item)"
8
+			@tap="goByIndex(idx)"
9 9
 		>
10 10
 			<text class="fe-bottom-nav__icon">{{ item.icon }}</text>
11 11
 			<text>{{ item.label }}</text>
@@ -14,22 +14,39 @@
14 14
 </template>
15 15
 
16 16
 <script>
17
+import store from '@/common/store.js'
18
+
19
+const ENTERPRISE_TABS = [
20
+	{ key: 'home', label: '首页', icon: '🏠', url: '/packageA/home/index' },
21
+	{ key: 'message', label: '信息', icon: '💬', url: '/packageA/enterprise/messages' },
22
+	{ key: 'mine', label: '我的', icon: '👤', url: '/packageA/enterprise/mine' }
23
+]
24
+
25
+const WORKER_TABS = [
26
+	{ key: 'home', label: '首页', icon: '🏠', url: '/packageA/home/index' },
27
+	{ key: 'mine', label: '我的', icon: '👤', url: '/packageA/worker/profile' }
28
+]
29
+
17 30
 export default {
18 31
 	name: 'FeBottomNav',
19 32
 	props: {
20
-		current: { type: String, default: 'home' }
33
+		current: { type: String, default: 'home' },
34
+		role: { type: String, default: '' }
21 35
 	},
22
-	data() {
23
-		return {
24
-			items: [
25
-				{ key: 'home', label: '首页', icon: '🏠', url: '/packageA/home/index' },
26
-				{ key: 'mine', label: '我的', icon: '👤', url: '/packageA/worker/profile' }
27
-			]
36
+	computed: {
37
+		resolvedRole() {
38
+			if (this.role === 'worker' || this.role === 'enterprise') return this.role
39
+			const s = store.getState()
40
+			return s.role === 'worker' ? 'worker' : 'enterprise'
41
+		},
42
+		items() {
43
+			return this.resolvedRole === 'worker' ? WORKER_TABS : ENTERPRISE_TABS
28 44
 		}
29 45
 	},
30 46
 	methods: {
31
-		go(item) {
32
-			if (item.key === this.current) return
47
+		goByIndex(idx) {
48
+			const item = this.items[idx]
49
+			if (!item || item.key === this.current) return
33 50
 			uni.reLaunch({ url: item.url })
34 51
 		}
35 52
 	}

+ 224 - 0
huimv-employment/app/packageA/components/chat/FeChatSideFab.vue

@@ -0,0 +1,224 @@
1
+<template>
2
+	<view class="chat-side-fab-root">
3
+		<view
4
+			class="chat-side-fab-wrap"
5
+			:class="{ 'chat-side-fab-wrap--open': expanded }"
6
+			:style="{ bottom: bottom + 'px' }"
7
+		>
8
+			<view class="chat-side-fab-menu" :class="{ 'chat-side-fab-menu--open': expanded }">
9
+				<view
10
+					class="chat-side-fab-item guide-target guide-target--sidebar"
11
+					@tap.stop="onMenuByIndex(0)"
12
+				>
13
+					<text class="chat-side-fab-item__icon">☰</text>
14
+					<text class="chat-side-fab-item__label">会话</text>
15
+				</view>
16
+				<view
17
+					class="chat-side-fab-item guide-target guide-target--new-chat"
18
+					@tap.stop="onMenuByIndex(1)"
19
+				>
20
+					<text class="chat-side-fab-item__icon">+</text>
21
+					<text class="chat-side-fab-item__label">新对话</text>
22
+				</view>
23
+				<view class="chat-side-fab-divider" />
24
+			</view>
25
+
26
+			<view
27
+				class="chat-side-fab-main"
28
+				:class="{ 'chat-side-fab-main--open': expanded }"
29
+				@touchstart="onTouchStart"
30
+				@touchmove.stop.prevent="onTouchMove"
31
+				@touchend="onTouchEnd"
32
+			>
33
+				<text class="chat-side-fab-main__icon">{{ expanded ? '×' : '✦' }}</text>
34
+			</view>
35
+		</view>
36
+	</view>
37
+</template>
38
+
39
+<script>
40
+export default {
41
+	name: 'FeChatSideFab',
42
+	data() {
43
+		return {
44
+			bottom: 0,
45
+			expanded: false,
46
+			dragging: false,
47
+			touchStartY: 0,
48
+			startBottom: 0,
49
+			moved: false
50
+		}
51
+	},
52
+	mounted() {
53
+		this.initPosition()
54
+	},
55
+	methods: {
56
+		initPosition() {
57
+			// 默认贴在右下角(紧贴底部操作栏上方)
58
+			this.bottom = this.getBounds().min
59
+		},
60
+		/** bottom 越大越靠上;min/max 为距屏幕底的距离 */
61
+		getBounds() {
62
+			const sys = uni.getSystemInfoSync()
63
+			const insetBottom = (sys.safeAreaInsets && sys.safeAreaInsets.bottom) || 0
64
+			const footerH = uni.upx2px(128 + 112) + insetBottom
65
+			const mainH = uni.upx2px(96)
66
+			const menuH = this.expanded ? uni.upx2px(220) : 0
67
+			const winH = sys.windowHeight || 600
68
+			return {
69
+				min: footerH + uni.upx2px(24),
70
+				max: winH - uni.upx2px(24) - mainH - menuH
71
+			}
72
+		},
73
+		clampBottom(value) {
74
+			const { min, max } = this.getBounds()
75
+			const lo = Math.min(min, max)
76
+			const hi = Math.max(min, max)
77
+			return Math.max(lo, Math.min(hi, value))
78
+		},
79
+		onTouchStart(e) {
80
+			this.dragging = true
81
+			this.moved = false
82
+			this.touchStartY = e.touches[0].clientY
83
+			this.startBottom = this.bottom
84
+		},
85
+		onTouchMove(e) {
86
+			if (!this.dragging) return
87
+			const dy = e.touches[0].clientY - this.touchStartY
88
+			if (Math.abs(dy) > 4) {
89
+				this.moved = true
90
+				if (this.expanded) this.expanded = false
91
+			}
92
+			// 手指上移 → bottom 增大
93
+			this.bottom = this.clampBottom(this.startBottom - dy)
94
+		},
95
+		onTouchEnd() {
96
+			this.dragging = false
97
+			this.bottom = this.clampBottom(this.bottom)
98
+			if (!this.moved) {
99
+				this.expanded = !this.expanded
100
+				this.$nextTick(() => {
101
+					this.bottom = this.clampBottom(this.bottom)
102
+				})
103
+			}
104
+		},
105
+		onMenuByIndex(idx) {
106
+			this.expanded = false
107
+			if (idx === 0) this.$emit('sessions')
108
+			else if (idx === 1) this.$emit('new-chat')
109
+		},
110
+		collapse() {
111
+			this.expanded = false
112
+		}
113
+	}
114
+}
115
+</script>
116
+
117
+<style lang="scss" scoped>
118
+.chat-side-fab-root {
119
+	position: relative;
120
+	z-index: 80;
121
+}
122
+
123
+.chat-side-fab-wrap {
124
+	position: fixed;
125
+	right: 16rpx;
126
+	z-index: 81;
127
+	width: 96rpx;
128
+	display: flex;
129
+	flex-direction: column;
130
+	align-items: center;
131
+	border-radius: 48rpx;
132
+	transition: background 0.18s ease, box-shadow 0.18s ease, padding 0.18s ease;
133
+}
134
+
135
+/* 展开:白底圆角柱包住菜单+主钮,看起来是一整块 */
136
+.chat-side-fab-wrap--open {
137
+	width: 96rpx;
138
+	padding: 12rpx 8rpx 8rpx;
139
+	background: #ffffff;
140
+	box-shadow: 0 12rpx 36rpx rgba(15, 23, 42, 0.16);
141
+	border: 1rpx solid $fe-border-light;
142
+}
143
+
144
+.chat-side-fab-menu {
145
+	width: 100%;
146
+	max-height: 0;
147
+	opacity: 0;
148
+	overflow: hidden;
149
+	transform: translateY(12rpx);
150
+	pointer-events: none;
151
+	transition: max-height 0.2s ease, opacity 0.18s ease, transform 0.18s ease;
152
+	display: flex;
153
+	flex-direction: column;
154
+	align-items: center;
155
+	gap: 8rpx;
156
+}
157
+
158
+.chat-side-fab-menu--open {
159
+	max-height: 280rpx;
160
+	opacity: 1;
161
+	transform: translateY(0);
162
+	pointer-events: auto;
163
+	margin-bottom: 8rpx;
164
+}
165
+
166
+.chat-side-fab-item {
167
+	width: 80rpx;
168
+	padding: 12rpx 0 10rpx;
169
+	border-radius: 20rpx;
170
+	background: $fe-primary-bg;
171
+	display: flex;
172
+	flex-direction: column;
173
+	align-items: center;
174
+	gap: 4rpx;
175
+}
176
+
177
+.chat-side-fab-item__icon {
178
+	font-size: 28rpx;
179
+	line-height: 1;
180
+	color: $fe-primary;
181
+	font-weight: 600;
182
+}
183
+
184
+.chat-side-fab-item__label {
185
+	font-size: 18rpx;
186
+	color: $fe-gray-600;
187
+	line-height: 1.2;
188
+}
189
+
190
+.chat-side-fab-divider {
191
+	width: 40rpx;
192
+	height: 2rpx;
193
+	margin-top: 4rpx;
194
+	background: $fe-border-light;
195
+	border-radius: 2rpx;
196
+}
197
+
198
+.chat-side-fab-main {
199
+	width: 96rpx;
200
+	height: 96rpx;
201
+	border-radius: 50%;
202
+	background: linear-gradient(135deg, $fe-primary, $fe-secondary);
203
+	color: #fff;
204
+	display: flex;
205
+	align-items: center;
206
+	justify-content: center;
207
+	box-shadow: 0 10rpx 28rpx rgba(124, 58, 237, 0.35);
208
+	flex-shrink: 0;
209
+}
210
+
211
+.chat-side-fab-main--open {
212
+	width: 80rpx;
213
+	height: 80rpx;
214
+	background: $fe-gray-100;
215
+	color: $fe-gray-500;
216
+	box-shadow: none;
217
+}
218
+
219
+.chat-side-fab-main__icon {
220
+	font-size: 40rpx;
221
+	line-height: 1;
222
+	font-weight: 500;
223
+}
224
+</style>

+ 25 - 105
huimv-employment/app/packageA/components/home/EnterpriseHome.vue

@@ -1,26 +1,11 @@
1 1
 <template>
2 2
 	<view class="chat-page">
3
-		<view class="chat-header">
4
-			<view class="chat-header__row">
5
-				<view class="fe-nav-btn guide-target guide-target--sidebar" @tap="openSidebar">
6
-					<text class="fe-nav-icon">☰</text>
7
-				</view>
8
-				<text class="chat-header__title">智能用工助手</text>
9
-				<view class="chat-header__actions">
10
-					<view class="fe-nav-btn guide-target guide-target--new-chat" @tap="newChat">
11
-						<text class="fe-nav-icon fe-nav-icon--plus">+</text>
12
-					</view>
13
-					<view class="fe-nav-btn guide-target guide-target--message" @tap="openDrawer('message')">
14
-						<text class="fe-nav-icon">🔔</text>
15
-						<view class="fe-nav-badge">2</view>
16
-					</view>
17
-					<view class="fe-nav-avatar guide-target guide-target--avatar" @tap="openDrawer('profile')">{{ user.avatarText }}</view>
18
-				</view>
19
-			</view>
20
-		</view>
21
-
22 3
 		<!-- Sidebar -->
23
-		<view class="fe-sidebar" :class="{ 'fe-sidebar--open': sidebarOpen }">
4
+		<view
5
+			class="fe-sidebar"
6
+			:class="{ 'fe-sidebar--open': sidebarOpen }"
7
+			:style="chatHeaderOffsetStyle"
8
+		>
24 9
 			<view class="sidebar-head">
25 10
 				<text class="sidebar-head__title">对话列表</text>
26 11
 				<view class="sidebar-head__add" @tap="newChat">+</view>
@@ -50,6 +35,7 @@
50 35
 		<!-- Chat Area -->
51 36
 		<scroll-view
52 37
 			class="chat-area"
38
+			:style="chatHeaderOffsetStyle"
53 39
 			scroll-y
54 40
 			:scroll-top="scrollTop"
55 41
 			:scroll-into-view="scrollIntoView"
@@ -239,6 +225,12 @@
239 225
 
240 226
 		<FeReportFloat :visible="showReportFloat" @open="openReportSheet" />
241 227
 
228
+		<FeChatSideFab
229
+			ref="chatSideFab"
230
+			@sessions="openSidebar"
231
+			@new-chat="newChat"
232
+		/>
233
+
242 234
 		<!-- Footer: Quick Actions + Input -->
243 235
 		<view class="chat-footer">
244 236
 			<view class="fe-quick-actions fe-quick-actions--dock guide-target guide-target--quick-bar">
@@ -402,6 +394,7 @@ import FeProgressSheet from '@/packageA/components/chat/FeProgressSheet.vue'
402 394
 import FeSettlementSheet from '@/packageA/components/chat/FeSettlementSheet.vue'
403 395
 import FeReportSheet from '@/packageA/components/chat/FeReportSheet.vue'
404 396
 import FeReportFloat from '@/packageA/components/chat/FeReportFloat.vue'
397
+import FeChatSideFab from '@/packageA/components/chat/FeChatSideFab.vue'
405 398
 import FeBatchQrModal from '@/packageA/components/chat/FeBatchQrModal.vue'
406 399
 import FeChatMarkdown from '@/packageA/components/chat/FeChatMarkdown.vue'
407 400
 import store from '@/common/store.js'
@@ -453,6 +446,7 @@ export default {
453 446
 		FeSettlementSheet,
454 447
 		FeReportSheet,
455 448
 		FeReportFloat,
449
+		FeChatSideFab,
456 450
 		FeBatchQrModal,
457 451
 		FeChatMarkdown
458 452
 	},
@@ -544,6 +538,10 @@ export default {
544 538
 		},
545 539
 		sheetElevated() {
546 540
 			return this.modal === 'qr' && this.activeSheet === 'progress'
541
+		},
542
+		chatHeaderOffsetStyle() {
543
+			// 使用微信原生导航栏时,fixed 区域从导航栏下方起算
544
+			return { top: '0px' }
547 545
 		}
548 546
 	},
549 547
 	onShow() {
@@ -1283,6 +1281,9 @@ export default {
1283 1281
 			}
1284 1282
 		},
1285 1283
 		openSidebar() {
1284
+			if (this.$refs.chatSideFab && typeof this.$refs.chatSideFab.collapse === 'function') {
1285
+				this.$refs.chatSideFab.collapse()
1286
+			}
1286 1287
 			if (this.sidebarOpen) {
1287 1288
 				this.sidebarOpen = false
1288 1289
 				return
@@ -1310,6 +1311,9 @@ export default {
1310 1311
 			this.activeSheet = ''
1311 1312
 			this.activeDrawer = ''
1312 1313
 			this.activeDraft = null
1314
+			if (this.$refs.chatSideFab && typeof this.$refs.chatSideFab.collapse === 'function') {
1315
+				this.$refs.chatSideFab.collapse()
1316
+			}
1313 1317
 		},
1314 1318
 		closeModal() {
1315 1319
 			this.modal = ''
@@ -1848,64 +1852,9 @@ export default {
1848 1852
 	background: $fe-bg;
1849 1853
 }
1850 1854
 
1851
-.chat-header {
1852
-	position: fixed;
1853
-	top: 0;
1854
-	left: 0;
1855
-	right: 0;
1856
-	z-index: 99;
1857
-	background: #ffffff;
1858
-	border-bottom: 1rpx solid $fe-border-light;
1859
-	box-sizing: border-box;
1860
-}
1861
-
1862
-.chat-header__row {
1863
-	height: $fe-h-page-bar;
1864
-	display: flex;
1865
-	flex-direction: row;
1866
-	align-items: center;
1867
-	flex-wrap: nowrap;
1868
-	padding: 0 24rpx;
1869
-	box-sizing: border-box;
1870
-}
1871
-
1872
-.chat-header__title {
1873
-	flex: 1;
1874
-	min-width: 0;
1875
-	margin: 0 12rpx;
1876
-	font-weight: 700;
1877
-	font-size: 34rpx;
1878
-	color: $fe-foreground;
1879
-	overflow: hidden;
1880
-	text-overflow: ellipsis;
1881
-	white-space: nowrap;
1882
-	line-height: $fe-h-page-bar;
1883
-}
1884
-
1885
-.chat-header__actions {
1886
-	display: flex;
1887
-	flex-direction: row;
1888
-	align-items: center;
1889
-	flex-wrap: nowrap;
1890
-	flex-shrink: 0;
1891
-	gap: 4rpx;
1892
-}
1893
-
1894
-.fe-nav-icon {
1895
-	font-size: 36rpx;
1896
-	line-height: 1;
1897
-	color: $fe-gray-500;
1898
-}
1899
-
1900
-.fe-nav-icon--plus {
1901
-	font-size: 44rpx;
1902
-	font-weight: 300;
1903
-	color: $fe-gray-600;
1904
-}
1905
-
1906 1855
 .chat-area {
1907 1856
 	position: fixed;
1908
-	top: $fe-h-page-bar;
1857
+	top: 0;
1909 1858
 	left: 0;
1910 1859
 	right: 0;
1911 1860
 	bottom: calc(#{$fe-h-input-bar} + #{$fe-h-quick-bar} + #{$fe-h-safe-bottom});
@@ -2069,35 +2018,6 @@ export default {
2069 2018
 	font-weight: 600;
2070 2019
 }
2071 2020
 
2072
-/* H5:避开浏览器/WebView 顶栏与安全区,避免头部被遮住 */
2073
-/* #ifdef H5 */
2074
-.chat-header {
2075
-	padding-top: constant(safe-area-inset-top);
2076
-	padding-top: env(safe-area-inset-top);
2077
-	z-index: 200;
2078
-}
2079
-
2080
-.chat-header__row {
2081
-	height: 96rpx;
2082
-	padding: 0 32rpx;
2083
-}
2084
-
2085
-.chat-header__title {
2086
-	font-size: 32rpx;
2087
-	line-height: 96rpx;
2088
-}
2089
-
2090
-.chat-area {
2091
-	top: calc(96rpx + constant(safe-area-inset-top));
2092
-	top: calc(96rpx + env(safe-area-inset-top));
2093
-}
2094
-
2095
-.fe-sidebar {
2096
-	top: calc(96rpx + constant(safe-area-inset-top));
2097
-	top: calc(96rpx + env(safe-area-inset-top));
2098
-}
2099
-/* #endif */
2100
-
2101 2021
 .fe-biz-card--qr {
2102 2022
 	border-left: 6rpx solid $fe-primary;
2103 2023
 }

+ 250 - 0
huimv-employment/app/packageA/components/home/EnterprisePortalHome.vue

@@ -0,0 +1,250 @@
1
+<template>
2
+	<view class="fe-page fe-page--tab portal">
3
+		<scroll-view scroll-y class="page-scroll" :show-scrollbar="false">
4
+			<view class="page-body">
5
+				<swiper
6
+					class="portal-banner"
7
+					circular
8
+					autoplay
9
+					:interval="4000"
10
+					:duration="400"
11
+					indicator-dots
12
+					indicator-color="rgba(255,255,255,0.45)"
13
+					indicator-active-color="#FFFFFF"
14
+				>
15
+					<swiper-item v-for="(item, idx) in banners" :key="idx">
16
+						<view class="portal-banner__card" :class="'portal-banner__card--' + item.tone">
17
+							<text class="portal-banner__title">{{ item.title }}</text>
18
+							<text class="portal-banner__desc">{{ item.desc }}</text>
19
+						</view>
20
+					</swiper-item>
21
+				</swiper>
22
+
23
+				<view class="portal-section">
24
+					<text class="portal-section__title">常用服务</text>
25
+					<view class="portal-menu">
26
+						<view
27
+							v-for="(item, idx) in menus"
28
+							:key="item.key"
29
+							class="portal-menu__item"
30
+							@tap="onMenuByIndex(idx)"
31
+						>
32
+							<view class="portal-menu__icon" :style="{ background: item.bg }">{{ item.icon }}</view>
33
+							<text class="portal-menu__label">{{ item.label }}</text>
34
+						</view>
35
+					</view>
36
+				</view>
37
+
38
+				<view class="portal-section">
39
+					<text class="portal-section__title">今日待办</text>
40
+					<view class="portal-todo" @tap="goMessages">
41
+						<view class="portal-todo__left">
42
+							<text class="portal-todo__title">消息与待办</text>
43
+							<text class="portal-todo__desc">有 {{ pendingCount }} 条待处理</text>
44
+						</view>
45
+						<text class="portal-todo__arrow">›</text>
46
+					</view>
47
+				</view>
48
+			</view>
49
+		</scroll-view>
50
+
51
+		<FeBottomNav current="home" role="enterprise" />
52
+	</view>
53
+</template>
54
+
55
+<script>
56
+import FeBottomNav from '@/packageA/components/FeBottomNav.vue'
57
+import { MESSAGES, showToast } from '@/common/chat-data.js'
58
+
59
+export default {
60
+	name: 'EnterprisePortalHome',
61
+	components: { FeBottomNav },
62
+	props: {
63
+		active: { type: Boolean, default: true }
64
+	},
65
+	data() {
66
+		return {
67
+			banners: [
68
+				{
69
+					tone: 'violet',
70
+					title: '智能用工,轻松管理',
71
+					desc: '对话生成用工方案,一键确认成本与合规'
72
+				},
73
+				{
74
+					tone: 'blue',
75
+					title: '扫码登记更高效',
76
+					desc: '工人扫码实名登记,进度实时可查'
77
+				},
78
+				{
79
+					tone: 'teal',
80
+					title: '结算透明可追溯',
81
+					desc: '方案、合同、发薪链路全程留痕'
82
+				}
83
+			],
84
+			menus: [
85
+				{ key: 'assistant', label: '智能用工助手', icon: '🤖', bg: '#EDE9FE', action: 'chat' },
86
+				{ key: 'cost', label: '成本测算', icon: '💰', bg: '#DBEAFE', action: 'toast' },
87
+				{ key: 'progress', label: '进度总览', icon: '📊', bg: '#D1FAE5', action: 'toast' },
88
+				{ key: 'orders', label: '历史订单', icon: '📋', bg: '#FEF3C7', action: 'toast' },
89
+				{ key: 'settle', label: '结算中心', icon: '💳', bg: '#FEE2E2', action: 'toast' },
90
+				{ key: 'contract', label: '合同归档', icon: '📄', bg: '#F3F4F6', action: 'toast' },
91
+				{ key: 'invite', label: '邀请协作', icon: '👥', bg: '#FCE7F3', action: 'toast' },
92
+				{ key: 'help', label: '帮助中心', icon: '💡', bg: '#E0E7FF', action: 'toast' }
93
+			]
94
+		}
95
+	},
96
+	computed: {
97
+		pendingCount() {
98
+			return (MESSAGES && MESSAGES.length) || 0
99
+		}
100
+	},
101
+	methods: {
102
+		onMenuByIndex(idx) {
103
+			const item = this.menus[idx]
104
+			if (!item) return
105
+			if (item.action === 'chat') {
106
+				uni.navigateTo({ url: '/packageA/chat/index' })
107
+				return
108
+			}
109
+			showToast(`${item.label}即将上线`)
110
+		},
111
+		goMessages() {
112
+			uni.reLaunch({ url: '/packageA/enterprise/messages' })
113
+		}
114
+	}
115
+}
116
+</script>
117
+
118
+<style lang="scss" scoped>
119
+.portal {
120
+	display: flex;
121
+	flex-direction: column;
122
+	height: 100%;
123
+	overflow: hidden;
124
+	background: $fe-bg;
125
+}
126
+
127
+.page-scroll {
128
+	flex: 1;
129
+	height: 0;
130
+}
131
+
132
+.page-body {
133
+	padding: 24rpx 32rpx calc(32rpx + 120rpx + #{$fe-h-safe-bottom});
134
+}
135
+
136
+.portal-banner {
137
+	height: 260rpx;
138
+	margin-bottom: 36rpx;
139
+}
140
+
141
+.portal-banner__card {
142
+	height: 260rpx;
143
+	border-radius: $fe-radius-lg;
144
+	padding: 40rpx 36rpx;
145
+	box-sizing: border-box;
146
+	display: flex;
147
+	flex-direction: column;
148
+	justify-content: flex-end;
149
+	gap: 12rpx;
150
+}
151
+
152
+.portal-banner__card--violet {
153
+	background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
154
+}
155
+
156
+.portal-banner__card--blue {
157
+	background: linear-gradient(135deg, #2563EB 0%, #0EA5E9 100%);
158
+}
159
+
160
+.portal-banner__card--teal {
161
+	background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
162
+}
163
+
164
+.portal-banner__title {
165
+	font-size: 34rpx;
166
+	font-weight: 700;
167
+	color: #fff;
168
+}
169
+
170
+.portal-banner__desc {
171
+	font-size: 24rpx;
172
+	color: rgba(255, 255, 255, 0.88);
173
+	line-height: 1.5;
174
+}
175
+
176
+.portal-section {
177
+	margin-bottom: 36rpx;
178
+}
179
+
180
+.portal-section__title {
181
+	display: block;
182
+	font-size: 28rpx;
183
+	font-weight: 700;
184
+	color: $fe-foreground;
185
+	margin-bottom: 20rpx;
186
+}
187
+
188
+.portal-menu {
189
+	display: flex;
190
+	flex-wrap: wrap;
191
+	background: $fe-surface;
192
+	border-radius: $fe-radius-lg;
193
+	padding: 16rpx 8rpx 8rpx;
194
+}
195
+
196
+.portal-menu__item {
197
+	width: 25%;
198
+	display: flex;
199
+	flex-direction: column;
200
+	align-items: center;
201
+	padding: 20rpx 8rpx 24rpx;
202
+	box-sizing: border-box;
203
+}
204
+
205
+.portal-menu__icon {
206
+	width: 88rpx;
207
+	height: 88rpx;
208
+	border-radius: 24rpx;
209
+	display: flex;
210
+	align-items: center;
211
+	justify-content: center;
212
+	font-size: 40rpx;
213
+	margin-bottom: 12rpx;
214
+}
215
+
216
+.portal-menu__label {
217
+	font-size: 22rpx;
218
+	color: $fe-gray-700;
219
+	text-align: center;
220
+	line-height: 1.3;
221
+}
222
+
223
+.portal-todo {
224
+	display: flex;
225
+	align-items: center;
226
+	justify-content: space-between;
227
+	background: $fe-surface;
228
+	border-radius: $fe-radius-lg;
229
+	padding: 28rpx 32rpx;
230
+}
231
+
232
+.portal-todo__title {
233
+	display: block;
234
+	font-size: 28rpx;
235
+	font-weight: 600;
236
+	color: $fe-foreground;
237
+}
238
+
239
+.portal-todo__desc {
240
+	display: block;
241
+	margin-top: 8rpx;
242
+	font-size: 24rpx;
243
+	color: $fe-muted;
244
+}
245
+
246
+.portal-todo__arrow {
247
+	font-size: 36rpx;
248
+	color: $fe-gray-400;
249
+}
250
+</style>

+ 1 - 1
huimv-employment/app/packageA/components/home/WorkerHome.vue

@@ -53,7 +53,7 @@
53 53
 			</view>
54 54
 		</scroll-view>
55 55
 
56
-		<FeBottomNav current="home" />
56
+		<FeBottomNav current="home" role="worker" />
57 57
 	</view>
58 58
 </template>
59 59
 

+ 127 - 0
huimv-employment/app/packageA/enterprise/messages.vue

@@ -0,0 +1,127 @@
1
+<template>
2
+	<view class="fe-page fe-page--tab msg-page">
3
+		<scroll-view scroll-y class="page-scroll" :show-scrollbar="false">
4
+			<view class="page-body">
5
+				<view v-if="!inbox.length" class="msg-empty">
6
+					<text class="msg-empty__text">暂无消息</text>
7
+				</view>
8
+				<view
9
+					v-for="(m, idx) in inbox"
10
+					:key="idx"
11
+					class="msg-card"
12
+					@tap="onItemByIndex(idx)"
13
+				>
14
+					<view class="msg-card__top">
15
+						<text class="fe-msg-type" :class="'fe-msg-type--' + m.type">
16
+							{{ m.type === 'pending' ? '待办' : '异常' }}
17
+						</text>
18
+						<text class="msg-card__time">{{ m.time }}</text>
19
+					</view>
20
+					<text class="msg-card__title">{{ m.title }}</text>
21
+					<text class="msg-card__desc">{{ m.desc }}</text>
22
+				</view>
23
+			</view>
24
+		</scroll-view>
25
+
26
+		<FeBottomNav current="message" role="enterprise" />
27
+	</view>
28
+</template>
29
+
30
+<script>
31
+import FeBottomNav from '@/packageA/components/FeBottomNav.vue'
32
+import store from '@/common/store.js'
33
+import { getToken } from '@/utils/request.js'
34
+import { MESSAGES, showToast } from '@/common/chat-data.js'
35
+
36
+export default {
37
+	components: { FeBottomNav },
38
+	data() {
39
+		return {
40
+			inbox: MESSAGES
41
+		}
42
+	},
43
+	onShow() {
44
+		this.ensureEnterpriseAccess()
45
+	},
46
+	methods: {
47
+		ensureEnterpriseAccess() {
48
+			if (!getToken()) {
49
+				uni.reLaunch({ url: '/packageA/auth/login' })
50
+				return
51
+			}
52
+			const s = store.getState()
53
+			if (s.role === 'worker') {
54
+				uni.reLaunch({ url: '/packageA/home/index' })
55
+			}
56
+		},
57
+		onItemByIndex(idx) {
58
+			const item = this.inbox[idx]
59
+			if (!item) return
60
+			showToast(item.title)
61
+		}
62
+	}
63
+}
64
+</script>
65
+
66
+<style lang="scss" scoped>
67
+.msg-page {
68
+	display: flex;
69
+	flex-direction: column;
70
+	height: 100vh;
71
+	overflow: hidden;
72
+	background: $fe-bg;
73
+}
74
+
75
+.page-scroll {
76
+	flex: 1;
77
+	height: 0;
78
+}
79
+
80
+.page-body {
81
+	padding: 24rpx 32rpx calc(32rpx + 120rpx + #{$fe-h-safe-bottom});
82
+}
83
+
84
+.msg-empty {
85
+	padding: 120rpx 0;
86
+	text-align: center;
87
+}
88
+
89
+.msg-empty__text {
90
+	font-size: 28rpx;
91
+	color: $fe-muted;
92
+}
93
+
94
+.msg-card {
95
+	background: $fe-surface;
96
+	border-radius: $fe-radius-lg;
97
+	padding: 28rpx 32rpx;
98
+	margin-bottom: 20rpx;
99
+}
100
+
101
+.msg-card__top {
102
+	display: flex;
103
+	justify-content: space-between;
104
+	align-items: center;
105
+	margin-bottom: 12rpx;
106
+}
107
+
108
+.msg-card__time {
109
+	font-size: 22rpx;
110
+	color: $fe-gray-400;
111
+}
112
+
113
+.msg-card__title {
114
+	display: block;
115
+	font-size: 28rpx;
116
+	font-weight: 600;
117
+	color: $fe-foreground;
118
+}
119
+
120
+.msg-card__desc {
121
+	display: block;
122
+	margin-top: 8rpx;
123
+	font-size: 24rpx;
124
+	color: $fe-muted;
125
+	line-height: 1.5;
126
+}
127
+</style>

+ 169 - 0
huimv-employment/app/packageA/enterprise/mine.vue

@@ -0,0 +1,169 @@
1
+<template>
2
+	<view class="fe-page fe-page--tab mine-page">
3
+		<scroll-view scroll-y class="page-scroll" :show-scrollbar="false">
4
+			<view class="page-body">
5
+				<view v-if="registered">
6
+					<EnterpriseHubPanel ref="hubPanel" show-logout @logout="logout" />
7
+				</view>
8
+				<view v-else class="guest-panel">
9
+					<view class="guest-card">
10
+						<view class="guest-card__avatar">游</view>
11
+						<text class="guest-card__name">游客</text>
12
+						<text class="guest-card__mobile">{{ mobileMask || '未绑定企业' }}</text>
13
+						<view class="guest-card__badge">未认证</view>
14
+						<text class="guest-card__tip">完成企业认证后,可使用全部企业能力</text>
15
+						<view class="fe-btn fe-btn--primary fe-btn--lg fe-btn--full guest-card__cta" @tap="goRegister">
16
+							去企业认证
17
+						</view>
18
+					</view>
19
+
20
+					<view class="fe-btn fe-btn--secondary fe-btn--lg fe-btn--full guest-logout" @tap="logout">
21
+						退出账号
22
+					</view>
23
+				</view>
24
+			</view>
25
+		</scroll-view>
26
+
27
+		<FeBottomNav current="mine" role="enterprise" />
28
+	</view>
29
+</template>
30
+
31
+<script>
32
+import FeBottomNav from '@/packageA/components/FeBottomNav.vue'
33
+import EnterpriseHubPanel from '@/packageA/components/EnterpriseHubPanel.vue'
34
+import store from '@/common/store.js'
35
+import { getToken } from '@/utils/request.js'
36
+
37
+export default {
38
+	components: { FeBottomNav, EnterpriseHubPanel },
39
+	data() {
40
+		return {
41
+			registered: false,
42
+			mobileMask: ''
43
+		}
44
+	},
45
+	onShow() {
46
+		if (!this.ensureEnterpriseAccess()) return
47
+		this.refreshGuestState()
48
+		if (!this.registered) return
49
+		this.$nextTick(() => {
50
+			const panel = this.$refs.hubPanel
51
+			if (panel) {
52
+				if (typeof panel.syncStore === 'function') panel.syncStore()
53
+				if (typeof panel.refreshPasswordStatus === 'function') panel.refreshPasswordStatus()
54
+			}
55
+		})
56
+	},
57
+	methods: {
58
+		ensureEnterpriseAccess() {
59
+			if (!getToken()) {
60
+				uni.reLaunch({ url: '/packageA/auth/login' })
61
+				return false
62
+			}
63
+			const s = store.getState()
64
+			if (s.role === 'worker') {
65
+				uni.reLaunch({ url: '/packageA/home/index' })
66
+				return false
67
+			}
68
+			return true
69
+		},
70
+		async refreshGuestState() {
71
+			try {
72
+				const info = await store.syncProfile({ showError: false })
73
+				this.registered = !!(info && info.registered)
74
+			} catch (e) {
75
+				this.registered = store.isEnterpriseRegistered()
76
+			}
77
+			const s = store.getState()
78
+			this.mobileMask = (s.user && s.user.mobile) || ''
79
+		},
80
+		goRegister() {
81
+			uni.navigateTo({ url: '/packageA/enterprise/register' })
82
+		},
83
+		logout() {
84
+			store.logout()
85
+			uni.reLaunch({ url: '/packageA/auth/login' })
86
+		}
87
+	}
88
+}
89
+</script>
90
+
91
+<style lang="scss" scoped>
92
+.mine-page {
93
+	display: flex;
94
+	flex-direction: column;
95
+	height: 100vh;
96
+	overflow: hidden;
97
+	background: $fe-bg;
98
+}
99
+
100
+.page-scroll {
101
+	flex: 1;
102
+	height: 0;
103
+}
104
+
105
+.page-body {
106
+	padding: 24rpx 32rpx calc(32rpx + 120rpx + #{$fe-h-safe-bottom});
107
+}
108
+
109
+.guest-card {
110
+	background: $fe-surface;
111
+	border-radius: $fe-radius-lg;
112
+	padding: 48rpx 40rpx 40rpx;
113
+	display: flex;
114
+	flex-direction: column;
115
+	align-items: center;
116
+	text-align: center;
117
+}
118
+
119
+.guest-card__avatar {
120
+	width: 120rpx;
121
+	height: 120rpx;
122
+	border-radius: 50%;
123
+	background: $fe-primary-bg;
124
+	color: $fe-primary;
125
+	font-size: 44rpx;
126
+	font-weight: 700;
127
+	display: flex;
128
+	align-items: center;
129
+	justify-content: center;
130
+	margin-bottom: 20rpx;
131
+}
132
+
133
+.guest-card__name {
134
+	font-size: 36rpx;
135
+	font-weight: 700;
136
+	color: $fe-foreground;
137
+}
138
+
139
+.guest-card__mobile {
140
+	margin-top: 8rpx;
141
+	font-size: 26rpx;
142
+	color: $fe-muted;
143
+}
144
+
145
+.guest-card__badge {
146
+	margin-top: 16rpx;
147
+	padding: 6rpx 20rpx;
148
+	border-radius: 9999rpx;
149
+	background: $fe-warning-light;
150
+	color: $fe-warning;
151
+	font-size: 22rpx;
152
+	font-weight: 600;
153
+}
154
+
155
+.guest-card__tip {
156
+	margin-top: 28rpx;
157
+	font-size: 26rpx;
158
+	color: $fe-muted;
159
+	line-height: 1.5;
160
+}
161
+
162
+.guest-card__cta {
163
+	margin-top: 36rpx;
164
+}
165
+
166
+.guest-logout {
167
+	margin-top: 24rpx;
168
+}
169
+</style>

+ 6 - 18
huimv-employment/app/packageA/home/index.vue

@@ -13,9 +13,8 @@
13 13
 					<view class="index-boot__spinner" />
14 14
 					<text class="index-boot__text">正在加载工作台...</text>
15 15
 				</view>
16
-				<EnterpriseHome
16
+				<EnterprisePortalHome
17 17
 					v-else-if="viewRole === 'enterprise'"
18
-					ref="enterpriseHome"
19 18
 					:active="true"
20 19
 				/>
21 20
 				<WorkerHome v-else :active="true" />
@@ -45,13 +44,13 @@
45 44
 </template>
46 45
 
47 46
 <script>
48
-import EnterpriseHome from '@/packageA/components/home/EnterpriseHome.vue'
47
+import EnterprisePortalHome from '@/packageA/components/home/EnterprisePortalHome.vue'
49 48
 import WorkerHome from '@/packageA/components/home/WorkerHome.vue'
50 49
 import store from '@/common/store.js'
51 50
 import { getToken } from '@/utils/request.js'
52 51
 
53 52
 export default {
54
-	components: { EnterpriseHome, WorkerHome },
53
+	components: { EnterprisePortalHome, WorkerHome },
55 54
 	data() {
56 55
 		return {
57 56
 			booting: true,
@@ -76,17 +75,6 @@ export default {
76 75
 		}
77 76
 		this.bootstrap()
78 77
 	},
79
-	onShareAppMessage() {
80
-		const home = this.$refs.enterpriseHome
81
-		if (home && typeof home.getShareAppMessage === 'function') {
82
-			return home.getShareAppMessage()
83
-		}
84
-		return {
85
-			title: '用工邀请',
86
-			path: '/pages/worker/job-offer?scene=',
87
-			imageUrl: '/static/images/job.jpg'
88
-		}
89
-	},
90 78
 	methods: {
91 79
 		goLogin() {
92 80
 			this.booting = true
@@ -132,16 +120,16 @@ export default {
132 120
 
133 121
 				this.viewRole = this.resolveViewRole(info)
134 122
 
135
-				if (!info || !info.registered) {
123
+				// 仅临时工未登记强制去登记;企业可先逛,未认证在「我的」展示游客
124
+				if ((!info || !info.registered) && this.viewRole === 'worker') {
136 125
 					this.needRegister = true
137
-					this.registerModalVisible = true
138 126
 					this.booting = false
127
+					uni.reLaunch({ url: '/packageA/worker/register' })
139 128
 					return
140 129
 				}
141 130
 
142 131
 				this.ready = true
143 132
 				this.booting = false
144
-				// 先稳定首页壳子,再挂载超大工作台组件(体验版冷启动更稳)
145 133
 				this.$nextTick(() => {
146 134
 					setTimeout(() => {
147 135
 						if (this.ready) this.homeMounted = true

+ 1 - 1
huimv-employment/app/packageA/worker/profile.vue

@@ -25,7 +25,7 @@
25 25
 			</view>
26 26
 		</scroll-view>
27 27
 
28
-		<FeBottomNav current="mine" />
28
+		<FeBottomNav current="mine" role="worker" />
29 29
 	</view>
30 30
 </template>
31 31
 

+ 18 - 10
huimv-employment/app/pages.json

@@ -26,11 +26,8 @@
26 26
 				{
27 27
 					"path": "home/index",
28 28
 					"style": {
29
-						"navigationBarTitleText": "",
30
-						"disableScroll": true,
31
-						"h5": {
32
-							"titleNView": false
33
-						}
29
+						"navigationBarTitleText": "首页",
30
+						"disableScroll": true
34 31
 					}
35 32
 				},
36 33
 				{
@@ -54,11 +51,8 @@
54 51
 				{
55 52
 					"path": "chat/index",
56 53
 					"style": {
57
-						"navigationBarTitleText": "",
58
-						"disableScroll": true,
59
-						"h5": {
60
-							"titleNView": false
61
-						}
54
+						"navigationBarTitleText": "智能用工助手",
55
+						"disableScroll": true
62 56
 					}
63 57
 				},
64 58
 				{
@@ -69,6 +63,20 @@
69 63
 						"disableScroll": true
70 64
 					}
71 65
 				},
66
+				{
67
+					"path": "enterprise/messages",
68
+					"style": {
69
+						"navigationBarTitleText": "信息",
70
+						"disableScroll": true
71
+					}
72
+				},
73
+				{
74
+					"path": "enterprise/mine",
75
+					"style": {
76
+						"navigationBarTitleText": "我的",
77
+						"disableScroll": true
78
+					}
79
+				},
72 80
 				{
73 81
 					"path": "worker/register",
74 82
 					"style": {

+ 4 - 16
huimv-employment/app/utils/home-guide.js

@@ -4,26 +4,14 @@ export const ENTERPRISE_HOME_GUIDE_KEY = 'fe_enterprise_home_guide_v1'
4 4
 const GUIDE_STEP_META = [
5 5
 	{
6 6
 		el: '.guide-target--sidebar',
7
-		title: '话列表',
8
-		desc: '点击左上角按钮,查看历史会话并在不同对话间切换。',
9
-		baseAlign: 'left'
7
+		title: '话列表',
8
+		desc: '点右侧悬浮钮展开后,可查看历史会话并切换对话。',
9
+		baseAlign: 'right'
10 10
 	},
11 11
 	{
12 12
 		el: '.guide-target--new-chat',
13 13
 		title: '新建会话',
14
-		desc: '点击「+」开启全新 AI 对话,发布用工需求从这里开始。',
15
-		baseAlign: 'right'
16
-	},
17
-	{
18
-		el: '.guide-target--message',
19
-		title: '消息待办',
20
-		desc: '查看待办事项、异常提醒和系统通知,重要事项不错过。',
21
-		baseAlign: 'right'
22
-	},
23
-	{
24
-		el: '.guide-target--avatar',
25
-		title: '个人中心',
26
-		desc: '进入企业管理中枢,查看企业信息、系统设置与帮助。',
14
+		desc: '点右侧悬浮钮展开后,可开启全新 AI 对话。',
27 15
 		baseAlign: 'right'
28 16
 	},
29 17
 	{

+ 2 - 1
huimv-employment/app/vue.config.js

@@ -79,7 +79,8 @@ module.exports = {
79 79
 		public: `${LAN_IP}:${DEV_PORT}`,
80 80
 		proxy: {
81 81
 			'/api': {
82
-				target: 'https://img.ifarmcloud.com/deploymentApi',
82
+				// target: 'https://img.ifarmcloud.com/deploymentApi',
83
+				target: 'http://192.168.1.6:8081',
83 84
 				changeOrigin: true,
84 85
 				secure: false
85 86
 			}