From f31bb5f8b95f9ba4ba9ec8b9b8193a648a8fb264 Mon Sep 17 00:00:00 2001 From: lll Date: Thu, 9 Nov 2023 11:25:36 +0800 Subject: [PATCH] 11 --- src/App.vue | 78 +++--- src/api/user.js | 13 +- src/components/ChiClonewifi.vue | 385 ++++++++++++++++++--------- src/components/IpConfiguration.vue | 97 +++++-- src/components/PortConfiguration.vue | 66 ++++- src/components/Wireles.vue | 20 +- src/components/netConfiguration.vue | 75 ++++-- src/views/Index.vue | 32 ++- 8 files changed, 524 insertions(+), 242 deletions(-) diff --git a/src/App.vue b/src/App.vue index e5cf40d..52c688a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,48 +25,48 @@ export default { }; }, created() { - this.queryallanswer(); + // this.queryallanswer(); }, methods: { // 请求正确答案 - async queryallanswer() { - let { data } = await queryallanswer(); - console.log(JSON.parse(JSON.stringify(data.data))); - let arr = []; - arr = data.data; - arr.forEach((item) => { - if (item.mark == "DB-IotLite_yx") { - this.DB_IotLite_yx = JSON.parse(item.answer); - } - if (item.mark == "CHGYWG_yx") { - this.CHGYWG_yx = JSON.parse(item.answer); - } - if (item.mark == "CHGYWG_wx") { - this.CHGYWG_wx = JSON.parse(item.answer); - } - if (item.mark == "DB_IotLite_wx") { - this.DB_IotLite_wx = JSON.parse(item.answer); - } - if (item.mark == "CKFWQ_yx") { - this.CKFWQ_yx = JSON.parse(item.answer); - } - if (item.mark == "CKFWQ_wx") { - this.CKFWQ_wx = JSON.parse(item.answer); - } - if (item.mark == "GYWZ_yx") { - this.GYWZ_yx = JSON.parse(item.answer); - } - if (item.mark == "GYWZ_wx") { - this.GYWZ_wx = JSON.parse(item.answer); - } - if (item.mark == "YDPZYM_wgpz") { - this.YDPZYM_wgpz = JSON.parse(item.answer); - } - if (item.mark == "YDPZYM_wgwh") { - this.YDPZYM_wgwh = JSON.parse(item.answer); - } - }); - }, + // async queryallanswer() { + // let { data } = await queryallanswer(); + // console.log(JSON.parse(JSON.stringify(data.data))); + // let arr = []; + // arr = data.data; + // arr.forEach((item) => { + // if (item.mark == "DB-IotLite_yx") { + // this.DB_IotLite_yx = JSON.parse(item.answer); + // } + // if (item.mark == "CHGYWG_yx") { + // this.CHGYWG_yx = JSON.parse(item.answer); + // } + // if (item.mark == "CHGYWG_wx") { + // this.CHGYWG_wx = JSON.parse(item.answer); + // } + // if (item.mark == "DB_IotLite_wx") { + // this.DB_IotLite_wx = JSON.parse(item.answer); + // } + // if (item.mark == "CKFWQ_yx") { + // this.CKFWQ_yx = JSON.parse(item.answer); + // } + // if (item.mark == "CKFWQ_wx") { + // this.CKFWQ_wx = JSON.parse(item.answer); + // } + // if (item.mark == "GYWZ_yx") { + // this.GYWZ_yx = JSON.parse(item.answer); + // } + // if (item.mark == "GYWZ_wx") { + // this.GYWZ_wx = JSON.parse(item.answer); + // } + // if (item.mark == "YDPZYM_wgpz") { + // this.YDPZYM_wgpz = JSON.parse(item.answer); + // } + // if (item.mark == "YDPZYM_wgwh") { + // this.YDPZYM_wgwh = JSON.parse(item.answer); + // } + // }); + // }, // console.log(arr); // let obj = { // cjdpz_beilv: "2", diff --git a/src/api/user.js b/src/api/user.js index 0a5f254..e2ec0b3 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -8,10 +8,15 @@ export const SaveUserAnswer = (data) => { {} ); }; -export const GetUserAnswer = (data) => { +// export const GetUserAnswer = (data) => { +// return axios.get( +// `/wangguan?action=querycache&mark=${data.mark}&user_id=${data.user_id}` +// ); +// }; + +//最新拿缓存请求接口 +export let GetUserAnswer = (data) => { return axios.get( - `/wangguan?action=querycache&mark=${data.mark}&user_id=${data.user_id}` + `/wangguan?action=queryanswercache&mark=${data.mark}&user_id=${data.user_id}` ); }; - -//网关配置 diff --git a/src/components/ChiClonewifi.vue b/src/components/ChiClonewifi.vue index 09438a9..90c839d 100644 --- a/src/components/ChiClonewifi.vue +++ b/src/components/ChiClonewifi.vue @@ -5,16 +5,26 @@
- +
-

标准 MQTT

+

标准 MQTT

- + @@ -24,22 +34,42 @@ - + - + . - + . - + . - + @@ -47,31 +77,62 @@ - - + + - - + + - - + +
2-60000
- - + + @@ -97,9 +158,22 @@ - - - + + + @@ -148,16 +222,24 @@ @@ -168,8 +250,14 @@
- + 保 存 @@ -179,7 +267,7 @@
- + - + - \ No newline at end of file diff --git a/src/components/IpConfiguration.vue b/src/components/IpConfiguration.vue index 054d58a..d3a6369 100644 --- a/src/components/IpConfiguration.vue +++ b/src/components/IpConfiguration.vue @@ -1,12 +1,22 @@