From 8a51f57a360843b60450f4e4442a5d19d98b48d7 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Tue, 6 Dec 2022 22:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=93=8D=E4=BD=9C=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=BF=A1=E6=81=AF=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/auto_pt/status.html | 82 ++++++++++++++++------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/templates/auto_pt/status.html b/templates/auto_pt/status.html index 2a19e37..07949d7 100644 --- a/templates/auto_pt/status.html +++ b/templates/auto_pt/status.html @@ -336,28 +336,27 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + {% include 'admin/includes/js-part.html' %} @@ -432,13 +431,12 @@ {#let data = res.data#} {#console.log(typeof res.data.data)#} if (res.data.code === 0) { + this.getData() this.$message({ type: 'success', message: res.data.msg }); - this.getData() } else { - this.loading = false this.$message({ type: 'warning', message: res.data.msg @@ -456,27 +454,24 @@ axios.get( "{% url 'sign_in_api' %}" + `?id=${id}` ).then(res => { - console.log('获取数据列表成功', res.data) - {#let data = res.data#} - {#console.log(typeof res.data.data)#} + console.log('获取数据成功', res.data.msg) if (res.data.code === 0) { + this.getData() this.$message({ type: 'success', message: res.data.msg }); - this.getData() } else { - this.loading = false this.$message({ type: 'warning', - message: '获取数据列表失败!' + message: res.data.msg }); } }).catch(res => { - console.log('获取数据列表失败', res) + console.log('签到失败', res) this.$message({ type: 'warning', - message: '获取数据列表失败!' + res + message: '签到失败!' + res }); }) }, @@ -488,23 +483,22 @@ {#let data = res.data#} {#console.log(typeof res.data.data)#} if (res.data.code === 0) { + this.getData() this.$message({ type: 'success', message: res.data.msg }); - this.getData() } else { - this.loading = false this.$message({ type: 'warning', - message: '获取数据列表失败!' + message: res.data.msg }); } }).catch(res => { - console.log('获取数据列表失败', res) + console.log('更新数据失败', res) this.$message({ type: 'warning', - message: '获取数据列表失败!' + res + message: '更新数据失败!' + res }); }) }, @@ -512,18 +506,16 @@ axios.get( "{% url 'edit_site_api' %}" + '?id=' + id ).then(res => { - console.log('获取数据列表成功', res.data) + console.log('获取数据列表成功', res.data.data) {#let data = res.data#} {#console.log(typeof res.data.data)#} if (res.data.code === 0) { + this.getData() this.$message({ type: 'success', - message: res.data.msg + message: res.data.data.msg }); - this.getData() - } else { - this.loading = false this.$message({ type: 'warning', message: '获取数据列表失败!' @@ -550,7 +542,7 @@ {#this.setCard()#} this.setLine(res.data.data) } else { - this.loading = false + this.$message({ type: 'warning', message: res.data.msg @@ -1040,7 +1032,7 @@ setTimeout(() => { this.chart = this.$refs.seeding_charts.chart this.setChartOption(option) - }, 5) + }, 15) }, @@ -1057,7 +1049,7 @@ {#this.setCard()#} this.sortList() } else { - this.loading = false + this.$message({ type: 'warning', message: '获取数据列表失败!'