From fce3f6e5a9a111da84391d860e951a4f3ad5a58d Mon Sep 17 00:00:00 2001 From: lll Date: Thu, 9 Nov 2023 20:14:50 +0800 Subject: [PATCH] 1 --- src/api/user.js | 2 +- src/components/ChiWireld.vue | 37 +++++++++++++++++++++++++++++------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/api/user.js b/src/api/user.js index e9f63f0..ed84339 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -8,7 +8,7 @@ export const SaveUserAnswer = (data) => { ); }; export const GetUserAnswer = (data) => { - axios.get( + return axios.get( `/wangguan?action=querycache&mark=${data.mark}&user_id=${data.user_id}` ); }; diff --git a/src/components/ChiWireld.vue b/src/components/ChiWireld.vue index 5591013..53ac1fc 100644 --- a/src/components/ChiWireld.vue +++ b/src/components/ChiWireld.vue @@ -11,11 +11,25 @@
- + - - + + @@ -23,7 +37,11 @@ - + @@ -69,7 +87,11 @@ - + @@ -185,7 +207,7 @@ export default { let that = this; window.getParameter = that.getParameter; }, - mounted() { }, + mounted() {}, methods: { getParameter(data) { @@ -262,8 +284,9 @@ export default { }); this.loading = false; console.log(data); - if (data.data && data.state) { + if (data.data !== null && data.state) { var obj = JSON.parse(data.data.mark_value); + console.log(obj); this.formData.ippz_wllx = obj.ippz_wllx; this.ippz_ip1 = obj.ippz_ip.split(".")[0]; this.ippz_ip2 = obj.ippz_ip.split(".")[1];