diff --git a/public/index.html b/public/index.html index 1dbdca6..b2bf050 100644 --- a/public/index.html +++ b/public/index.html @@ -29,6 +29,8 @@
+ + ", action); - state.list = action.payload; + const rawData = action.payload; + const list = []; + Object.entries(rawData).forEach(([key, value]) => { + const n = [key, value]; + list.push({ + id: key, + title: n[0], + content: n[1], + }); + }); + state.list = list; }, }, }); diff --git a/src/utils/index.js b/src/utils/index.js index 428270f..54c5617 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -106,7 +106,8 @@ class XClient { const newUser = uuidv4(); new XClient( { - url: "ws://10.70.180.10:8081/xc-screen/websocket/xc001" + newUser, + // url: "ws://10.70.180.10:8081/xc-screen/websocket/xc001" + newUser, + url: "ws://127.0.0.1:9800/alarm?user=" + newUser, name: "DCS_DATA", // "ws://m306416y13.yicp.fun:35441/xc-screen/websocket/xc001", // "ws://192.168.1.114:8081/xc-screen/websocket/xc001",