From 5d255cca0f892d7ee662193df785987d69b9285b Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Tue, 28 Jul 2020 17:10:14 +0800 Subject: [PATCH 1/7] fix api port problem Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/content.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index 8e6a5135..b1e0178a 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -81,13 +81,9 @@ export default { methods: { loadproblem() { this.$axios - .get(apiurl('/problem/content'), { - params: { - pid: this.$route.params.id - } - }) + .get(apiurl('/problem/' + String(this.$route.params.id))) .then(res => { - let data = res.data; + let data = res.data.res; this.title = data.title; this.pid = data.pid; this.allowHTML = data.allow_html; From 5adf84772a0205ccc6b49bcee466e5806ea2f3e4 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Tue, 28 Jul 2020 18:51:01 +0800 Subject: [PATCH 2/7] add back button in problem page Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/content.vue | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index b1e0178a..7f552b09 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -55,9 +55,21 @@ + Back +
+ +
Information
+ Name +
{{title}}
+ PID +
{{pid}}
+ Enabled +
{{enable}}
+
+
@@ -72,10 +84,11 @@ export default { data() { return { description: null, - title: null, + title: 'problem', pid: this.$route.params.id, allowHTML: false, - isWider: false + isWider: false, + enable: true }; }, methods: { @@ -88,6 +101,7 @@ export default { this.pid = data.pid; this.allowHTML = data.allow_html; this.description = data.description; + this.enable = data.enabled; }) .catch(err => { if(err.request.status === 404) { @@ -167,4 +181,16 @@ export default { #full-screen-button:hover { cursor: pointer; } + +#info { + margin-top: 30px; +} + +.divider { + margin: 15px 0; +} + +.tool-content { + color: #606266; +} From 45d9089c8a444bd8d5e3119e604bfcfa66e420a6 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Tue, 28 Jul 2020 19:11:11 +0800 Subject: [PATCH 3/7] add icon Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/problem/content.vue | 46 +++++++++++------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index 7f552b09..14a4f36f 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -19,40 +19,28 @@
-
Tool Bar
+
Tool Bar
- Submit + Submit - - - Submissions - - - Statistics - + + Submissions + Statistics - - - Discussions - - - Solutions - + + Discussions + Solutions - + Edit - - Delete - - - Settings - + Delete + Settings Back @@ -61,12 +49,12 @@
-
Information
- Name + Information + Name
{{title}}
- PID -
{{pid}}
- Enabled + PID +
#. {{pid}}
+ Enabled
{{enable}}
@@ -187,7 +175,7 @@ export default { } .divider { - margin: 15px 0; + margin: 20px 0; } .tool-content { From baf0e17e1a098b9ca7dcf46e62a2b3525ea16108 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Tue, 28 Jul 2020 19:20:01 +0800 Subject: [PATCH 4/7] add icon Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/assets/css/theme.css | 4 ++++ src/components/problem/content.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/assets/css/theme.css b/src/assets/css/theme.css index 5693f03d..3b27416d 100644 --- a/src/assets/css/theme.css +++ b/src/assets/css/theme.css @@ -69,3 +69,7 @@ a:hover { font-family: "Fira Code"; color: #cc6666; } + +.el-card { + color: #606266; +} diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index 14a4f36f..edb53d7e 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -49,7 +49,7 @@
- Information +
Information
Name
{{title}}
PID @@ -158,6 +158,7 @@ export default { } #tools { + width: 200px; padding: 20px; border: 1px solid #e4e7ed; } From 21a6acfe260c4ba3e903af90c5d526ae6e69b315 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> Date: Tue, 28 Jul 2020 19:39:31 +0800 Subject: [PATCH 5/7] add icon Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com> --- src/components/page/navbar.vue | 4 ++-- src/components/problem/content.vue | 4 ++-- src/components/user/content.vue | 8 ++++---- src/components/user/login.vue | 9 +++++++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/components/page/navbar.vue b/src/components/page/navbar.vue index d64afbfc..57049b2f 100644 --- a/src/components/page/navbar.vue +++ b/src/components/page/navbar.vue @@ -11,8 +11,8 @@ text-color="#fff" active-text-color="rgb(233, 233, 235)" > - Home - Problem List + Home + Problem List