diff --git a/src/main/java/com/yutou/tools/other/tools.java b/src/main/java/com/yutou/tools/other/tools.java new file mode 100644 index 0000000..47cd69a --- /dev/null +++ b/src/main/java/com/yutou/tools/other/tools.java @@ -0,0 +1,35 @@ +package com.yutou.tools.other; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; + +@Controller +public class tools { + + @ResponseBody + @RequestMapping(value = "tools/cookie.do",method = RequestMethod.POST) + public String cookieToJson(HttpServletRequest request){ + JSONObject json=new JSONObject(); + JSONArray array=new JSONArray(); + for (Cookie cookie : request.getCookies()) { + JSONObject item=new JSONObject(); + item.put("name",cookie.getName()); + item.put("value",cookie.getValue()); + item.put("domain",cookie.getDomain()); + item.put("path",cookie.getPath()); + item.put("maxAge",cookie.getMaxAge()); + item.put("secure",cookie.getSecure()); + item.put("isHttpOnly",cookie.isHttpOnly()); + array.add(item); + } + json.put("data",array); + return json.toJSONString(); + } +} diff --git a/web/html/body/nas.html b/web/html/body/nas.html index f0ac369..4513757 100644 --- a/web/html/body/nas.html +++ b/web/html/body/nas.html @@ -7,18 +7,38 @@ NAS + + +
+ +
+ 123 +
+ +
- - 11 + + \ No newline at end of file diff --git a/web/html/footer.html b/web/html/footer.html new file mode 100644 index 0000000..b2af80c --- /dev/null +++ b/web/html/footer.html @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/web/html/header.html b/web/html/header.html new file mode 100644 index 0000000..cb752f0 --- /dev/null +++ b/web/html/header.html @@ -0,0 +1,46 @@ + + + + + Title + + +
+ +
+ + + \ No newline at end of file diff --git a/web/index.html b/web/index.html index 78b2d34..988519b 100644 --- a/web/index.html +++ b/web/index.html @@ -5,62 +5,20 @@ 控制中心 - + - +
-
- -
- +
- -
- +
- + +