From 40ef8d96ae3696aded2c14c3c80f93af39bd1169 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期四, 09 十二月 2021 17:41:43 +0800
Subject: [PATCH] add sysInitApi

---
 sysInitApi.go |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/sysInitApi.go b/sysInitApi.go
new file mode 100644
index 0000000..3a514a6
--- /dev/null
+++ b/sysInitApi.go
@@ -0,0 +1,28 @@
+package bhomedbapi
+
+import (
+	"encoding/json"
+)
+
+type SysInitApi struct {
+
+}
+
+//鑾峰彇鏈嶅姟鍣ㄦ湰鏈洪厤缃俊鎭�
+func (api SysInitApi) GetRegInfo() (bool,interface{}){
+	url := DATA_URL_PREFIX + "/sysinit/getRegInfo"
+	netNode := getNetNode(url2Topic(Topic_System_Service, url))
+	client := NewClient(WithNodes(netNode))
+
+	body, err := client.DoGetRequest(url, 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
+}
\ No newline at end of file

--
Gitblit v1.8.0