lusa 5 年之前
父節點
當前提交
fcfb02722e
共有 2 個文件被更改,包括 8 次插入6 次删除
  1. 4 4
      app/goahead-5.1.0/src/route.txt
  2. 4 2
      app/goahead-5.1.0/src/web_interface/src/dashboard.c

+ 4 - 4
app/goahead-5.1.0/src/route.txt

@@ -42,10 +42,10 @@ route uri=/action/login methods=POST handler=action redirect=200@/index.html red
 route uri=/action/logout methods=GET|POST handler=action redirect=200@/login.html
 route uri=/auth/form/ auth=form handler=continue abilities=manage redirect=401@/login.html
 
-route uri=/action/getCardInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
-route uri=/action/getCPUInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
-route uri=/action/deviceinfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
-route uri=/auth/getDeviceInfoBak auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+#route uri=/action/getCardInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+#route uri=/action/getCPUInfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+#route uri=/action/deviceinfo auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
+#route uri=/auth/getDeviceInfoBak auth=digest handler=continue methods=GET|POST abilities=manage redirect=401@/login.html
 
 route uri=/action/person methods=GET|POST handler=action 
 

+ 4 - 2
app/goahead-5.1.0/src/web_interface/src/dashboard.c

@@ -96,8 +96,10 @@ void getDeviceInfo(Webs *wp){
     cJSON_AddItemToObject(root, "data", data);//根节点下添加
     cJSON_AddItemToObject(root, "msg", cJSON_CreateString(""));
     cJSON_AddItemToObject(root, "code", cJSON_CreateString("200"));
-    cJSON_AddStringToObject(data, "BuildTime", BuildTime);
-    cJSON_AddStringToObject(data, "FwVersion", FwVersion);
+    cJSON_AddStringToObject(data, "buildTime", BuildTime);
+    cJSON_AddStringToObject(data, "fwVersion", FwVersion);
+    cJSON_AddStringToObject(data, "macAddr", BuildTime);
+    cJSON_AddStringToObject(data, "ipAddr", FwVersion);
 
     pStr = cJSON_Print(root);