标准 MQTT
+标准 MQTT
本页面涉及排错,请检查修改默认值
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 @@
本页面涉及排错,请检查修改默认值