From af30ec278c4f7c69ad07abf38d4efbaa21de23d0 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 12 一月 2021 18:09:43 +0800
Subject: [PATCH] 添加CameraAreaDel

---
 cameraApi.go |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/cameraApi.go b/cameraApi.go
index cdd02b7..d55d176 100644
--- a/cameraApi.go
+++ b/cameraApi.go
@@ -132,6 +132,26 @@
     return res.Success
 }
 
+func (api CameraApi) CameraAreaDel(cameraId string, areaId string) (bool,interface{}) {
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/camera/cameraAreaDel"
+	client := NewClient()
+	paramBody := map[string]interface{} {
+		"cameraId": cameraId,
+		"areaId": areaId,
+	}
+	body, err := client.DoPostRequest(url, CONTENT_TYPE_FORM, paramBody, nil,nil)
+	if err !=nil {
+		return false,nil
+	}
+
+	var res Result
+	if err = json.Unmarshal(body, &res);err != nil {
+		return false,nil
+	}
+
+	return res.Success, res.Data
+}
+
 func (api CameraApi) FindAll() (cameras []protomsg.Camera) {
 	url := api.getBasicUrl() + DATA_URL_PREFIX + "/camera/showAll"
 	client := NewClient()

--
Gitblit v1.8.0