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 @@
- 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
diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue
index edb53d7e..1ec62343 100644
--- a/src/components/problem/content.vue
+++ b/src/components/problem/content.vue
@@ -25,12 +25,12 @@
Submit
- Statistics
+ Statistics
Submissions
Statistics
- Discuss
+ Discuss
Discussions
Solutions
diff --git a/src/components/user/content.vue b/src/components/user/content.vue
index fe53eaf9..7614e8e6 100644
--- a/src/components/user/content.vue
+++ b/src/components/user/content.vue
@@ -7,19 +7,19 @@
- User Name
+ User Name
{{username}}
- Email
+ Email
{{email}}
- Sloved
+ Sloved
{{solved}} Problems
- Introduction
+ Introduction
diff --git a/src/components/user/login.vue b/src/components/user/login.vue
index 13cf0aff..94a73ede 100644
--- a/src/components/user/login.vue
+++ b/src/components/user/login.vue
@@ -2,10 +2,12 @@
-
+ Username
+
-
+ Password
+
@@ -100,4 +102,7 @@ export default {
From 4f69fb6a690bdb46266c2d09ceaf13403f962b11 Mon Sep 17 00:00:00 2001
From: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com>
Date: Tue, 28 Jul 2020 21:03:40 +0800
Subject: [PATCH 6/7] add limitaion of problems and add hidden tag
Signed-off-by: zhangtianli2006 <49156174+zhangtianli2006@users.noreply.github.com>
---
src/assets/css/basic.css | 2 +-
src/components/problem/content.vue | 39 ++++++++++++++++++++++++------
src/components/problem/list.vue | 11 ++++++++-
3 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/src/assets/css/basic.css b/src/assets/css/basic.css
index 5ae6f4c8..95752f2f 100644
--- a/src/assets/css/basic.css
+++ b/src/assets/css/basic.css
@@ -151,5 +151,5 @@ body {
}
* {
- border-radius: 0 !important;
+ border-radius: 0px !important;
}
diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue
index 1ec62343..a874f0ad 100644
--- a/src/components/problem/content.vue
+++ b/src/components/problem/content.vue
@@ -10,7 +10,8 @@
Fold
-
+
@@ -53,9 +54,14 @@
Name
{{title}}
PID
-
#. {{pid}}
-
Enabled
-
{{enable}}
+
#{{pid}}
+
+
+ Limitation
+ Time
+ {{time}} MS
+ Memery
+ {{memery}} MB
@@ -76,7 +82,10 @@ export default {
pid: this.$route.params.id,
allowHTML: false,
isWider: false,
- enable: true
+ enable: true,
+ hidden: false,
+ time: 1000,
+ memery: 128
};
},
methods: {
@@ -85,11 +94,14 @@ 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.enable = data.enabled;
+ this.memery = data.memory_limit / 1000;
+ this.time = data.time_limit;
+ this.hidden = !data.enabled;
})
.catch(err => {
if(err.request.status === 404) {
@@ -115,6 +127,19 @@ export default {