From 9c3961f513cb548c129dd911c1eb92ec21bb703c Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 18 Mar 2024 15:01:38 +0800
Subject: [PATCH] fix: 分享详情页打开未登录跳转

---
 pages/actionChange/secondLevelData/index.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pages/actionChange/secondLevelData/index.vue b/pages/actionChange/secondLevelData/index.vue
index 6a6f97d..8691f9f 100644
--- a/pages/actionChange/secondLevelData/index.vue
+++ b/pages/actionChange/secondLevelData/index.vue
@@ -126,7 +126,7 @@
 				alarmLevel: null,
 				aqi: 0,
 				baseUrl: '',
-				windDir: 'null',
+				windDir: '',
 				windDeg: 180,
 				wsData2: null,
 				// ���������������
@@ -150,7 +150,7 @@
 		},
 		computed: {
 			windDirData() {
-				if (this.wsData2) {
+				if (this.wsData2 && this.windDir) {
 					return `${this.windDir} (${this.wsData2.a01008})`
 				} else {
 					return ''
@@ -166,7 +166,9 @@
 		},
 		onUnload() {
 			let that = this
-			this.socketTask.close()
+			if (this.socketTask) {
+				this.socketTask.close()
+			}
 			that.isLoading = false
 			that.timer = ''
 		},

--
Gitblit v1.8.0