From a0cfd32836d360ebaa6147e50ea93cc1bafc163c Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Fri, 14 Aug 2020 14:09:41 +0800 Subject: [PATCH 1/4] change api Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/content.vue | 7 ++++++- src/components/problem/edit.vue | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index 617dc794..c76fed75 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -142,10 +142,10 @@ export default { .get(apiurl('/problem/' + String(this.$route.params.id))) .then(res => { let data = res.data.res; + console.log(data); this.title = data.title; this.pid = data.pid; this.allowHTML = data.allow_html; - this.description = data.description; this.memery = data.memory_limit / 1000; this.time = data.time_limit; this.hidden = !data.enabled; @@ -153,6 +153,11 @@ export default { this.tags = data.tags; this.render_tags(); this.problemLoading = false; + this.$axios + .get(apiurl('/problem/' + String(this.$route.params.id) + '/description')) + .then(detail => { + this.description = detail.data.res.description; + }); }) .catch(err => { if(err.request.status === 404) { diff --git a/src/components/problem/edit.vue b/src/components/problem/edit.vue index 37592ad9..09b9c4f4 100644 --- a/src/components/problem/edit.vue +++ b/src/components/problem/edit.vue @@ -131,12 +131,16 @@ export default { .then(res => { let data = res.data.res; this.title = data.title; - this.mdContent = data.description; this.memery = data.memory_limit / 1000; this.time = data.time_limit; this.disable = !data.enabled; this.html = data.allow_html; this.contentLoading = false; + this.$axios + .get(apiurl('/problem/' + String(this.$route.params.id) + '/description')) + .then(detail => { + this.mdContent = detail.data.res.description; + }); }) .catch(err => { if (err.request.status === 404) { From 5e2b4266184d03ed85b39e820b718d97588e85d4 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Fri, 14 Aug 2020 14:11:40 +0800 Subject: [PATCH 2/4] remove console log Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/content.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index c76fed75..4b067cef 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -142,7 +142,6 @@ export default { .get(apiurl('/problem/' + String(this.$route.params.id))) .then(res => { let data = res.data.res; - console.log(data); this.title = data.title; this.pid = data.pid; this.allowHTML = data.allow_html; From 5361d231b6d436d0cf06de1858165b3c12d23147 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Fri, 14 Aug 2020 14:22:39 +0800 Subject: [PATCH 3/4] remove console log Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/lib/AjaxTable.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/lib/AjaxTable.vue b/src/components/lib/AjaxTable.vue index c5153036..08cf3905 100644 --- a/src/components/lib/AjaxTable.vue +++ b/src/components/lib/AjaxTable.vue @@ -42,7 +42,6 @@ export default { watch: { limit() { this.onPageChange(this.pageId); - console.log(this.limit); }, costumData(new_val, old_val) { let json_new_val = JSON.stringify(new_val); From 946c62f0a272e9d453fd9576454a5bfb9429a40c Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Fri, 14 Aug 2020 14:27:30 +0800 Subject: [PATCH 4/4] improved style Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/list.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/problem/list.vue b/src/components/problem/list.vue index 83d51ac4..c7ac5d1b 100644 --- a/src/components/problem/list.vue +++ b/src/components/problem/list.vue @@ -42,7 +42,7 @@ v-model="showTags" active-color="#13ce66" inactive-color="#ff4949" - style="margin-top: 17px;" + style="margin-top: 18px;" />