From 11a04ff41abe8e84925249c7118e7b47150fb0ff Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 05 三月 2021 11:22:15 +0800
Subject: [PATCH] 判断数据类型

---
 cameraRuleApi.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/cameraRuleApi.go b/cameraRuleApi.go
index f219df5..1a1d39c 100644
--- a/cameraRuleApi.go
+++ b/cameraRuleApi.go
@@ -254,7 +254,10 @@
 	if !res.Success {
 		return false
 	}
-	return res.Data.(bool)
+	if v,ok := res.Data.(bool);ok {
+		return v
+	}
+	return false
 }
 
 

--
Gitblit v1.8.0