From 2cd31915236257e325b49f2e86f6912512e1f7ce Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 02 十一月 2025 14:27:15 +0800
Subject: [PATCH] fix:app 用户登录,默认不勾选用户协议
---
app/pages/index.vue | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/app/pages/index.vue b/app/pages/index.vue
index ea9ae6d..72efa8a 100644
--- a/app/pages/index.vue
+++ b/app/pages/index.vue
@@ -196,6 +196,13 @@
}
},
onLoad() {
+ // 妫�鏌ョ敤鎴锋槸鍚﹀凡鐧诲綍
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.log('鐢ㄦ埛鏈櫥褰曪紝璺宠繃鍔犺浇鏁版嵁')
+ return
+ }
+
// 鍔犺浇鐢ㄦ埛缁戝畾杞﹁締淇℃伅
this.loadUserVehicle()
// 鍔犺浇姝e湪杩愯鐨勪换鍔�
@@ -204,6 +211,13 @@
this.loadUnreadMessageCount()
},
onShow() {
+ // 妫�鏌ョ敤鎴锋槸鍚﹀凡鐧诲綍
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.log('鐢ㄦ埛鏈櫥褰曪紝璺宠繃鍔犺浇鏁版嵁')
+ return
+ }
+
// 姣忔鏄剧ず椤甸潰鏃跺埛鏂颁换鍔″垪琛ㄣ�佺粦瀹氳溅杈嗗拰娑堟伅鏁伴噺
this.loadUserVehicle()
this.loadRunningTasks()
@@ -246,6 +260,13 @@
// 鍔犺浇鏈娑堟伅鏁伴噺
loadUnreadMessageCount() {
+ // 妫�鏌ョ敤鎴锋槸鍚﹀凡鐧诲綍
+ const userId = this.currentUser.userId
+ if (!userId) {
+ console.log('鐢ㄦ埛鏈櫥褰曪紝璺宠繃鑾峰彇鏈娑堟伅鏁伴噺')
+ return
+ }
+
getUnreadCount().then(response => {
if (response.code === 200) {
this.unreadMessageCount = response.data || 0
--
Gitblit v1.9.1