From 3f9032e92fdd383bfefc87a0bec9b242e1223851 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 09 六月 2026 17:08:44 +0800
Subject: [PATCH] 改bug

---
 app/App.vue |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/app/App.vue b/app/App.vue
index 2973d26..609b777 100644
--- a/app/App.vue
+++ b/app/App.vue
@@ -29,21 +29,28 @@
 		onLaunch: function() {
 			uni.$on('locationPermissionGranted', this.handleLocationPermissionGranted)
 			uni.$on('loginSuccessStartLocationPolling', this.handleLoginSuccessStartLocationPolling)
-			this.initTTS()
-			this.initJPush()
-			this.checkAppUpdate()
+			uni.$on('privacyAgreed', this.handlePrivacyAgreed)
+			// 妫�鏌ユ槸鍚﹀凡缁忓悓鎰忚繃闅愮鏀跨瓥锛屽鏋滄槸鍒欑洿鎺ュ垵濮嬪寲鏋佸厜鎺ㄩ��
+			console.log('login_privacy_policy_agreed', uni.getStorageSync('login_privacy_policy_agreed'))
+			if (uni.getStorageSync('login_privacy_policy_agreed')) {
+				// 鍒濆鍖栨瀬鍏夋帹閫�
+				this.initJPush()
+				// 鍒濆鍖栬闊虫挱鎶�
+				this.initTTS()
+				// 鑾峰彇鐗堟湰鍙�
+				this.checkAppUpdate()
+			}
 		},
 		onShow: function() {
 			console.log('App Show')
-			// this.checkAndStartLocationPolling()
 		},
 		onHide: function() {
 			console.log('App Hide')
-			// this.stopLocationPolling()
 		},
 		onUnload() {
 			uni.$off('locationPermissionGranted', this.handleLocationPermissionGranted)
 			uni.$off('loginSuccessStartLocationPolling', this.handleLoginSuccessStartLocationPolling)
+			uni.$off('privacyAgreed', this.handlePrivacyAgreed)
 			if (this.tts) {
 				try {
 					if (this.ttsPlatform === 'android') {
@@ -68,6 +75,10 @@
 				}
 				this.checkAndStartLocationPolling()
 			},
+			handlePrivacyAgreed() {
+				console.log('闅愮鏀跨瓥宸插悓鎰忥紝鍒濆鍖栨瀬鍏夋帹閫�')
+				this.initJPush()
+			},
 			handleLocationPermissionGranted() {
 				this.hasGrantedLocationPermission = true
 				if (!this.token || this.locationTimer) return

--
Gitblit v1.9.3