diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue
index 8e6a5135..82520802 100644
--- a/src/components/problem/content.vue
+++ b/src/components/problem/content.vue
@@ -10,7 +10,8 @@
Fold
-
+
@@ -19,45 +20,50 @@
+
+
+ Information
+ Name
+ {{title}}
+ PID
+ #{{pid}}
+
+
+ Limitation
+ Time
+ {{time}} MS
+ Memery
+ {{memery}} MB
+
+
@@ -72,26 +78,30 @@ export default {
data() {
return {
description: null,
- title: null,
+ title: '-',
pid: this.$route.params.id,
allowHTML: false,
- isWider: false
+ isWider: false,
+ enable: true,
+ hidden: false,
+ time: '-',
+ memery: '-'
};
},
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;
+ 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;
})
.catch(err => {
if(err.request.status === 404) {
@@ -117,6 +127,19 @@ export default {
diff --git a/src/components/problem/list.vue b/src/components/problem/list.vue
index 254ad4e2..fdffc8f9 100644
--- a/src/components/problem/list.vue
+++ b/src/components/problem/list.vue
@@ -42,7 +42,16 @@ export default {
} else {
color += 'color-regular-text';
}
- x.title = ({ x.title });
+ if (!x.enabled) {
+ x.title = (
+
+ Hidden
+ { x.title }
+
+ );
+ } else {
+ x.title = ({ x.title });
+ }
x.score = ({x.score >= 0 ? x.score : '-'}
);
return x;
}
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 {