diff --git a/package.json b/package.json index 21831c49..f1385e7d 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "dompurify": "^2.0.12", "element-ui": "^2.13.2", "highlight.js": "^10.1.1", + "js-sha256": "^0.9.0", "marked": "^1.1.1", "simplemde": "^1.11.2", "vue": "^2.6.11", 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); diff --git a/src/components/problem/content.vue b/src/components/problem/content.vue index 617dc794..4b067cef 100644 --- a/src/components/problem/content.vue +++ b/src/components/problem/content.vue @@ -145,7 +145,6 @@ export default { 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 +152,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 03fa4214..f9c2abc7 100644 --- a/src/components/problem/edit.vue +++ b/src/components/problem/edit.vue @@ -134,13 +134,17 @@ 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.mdContent_sha256 = sha256(this.mdContent); + 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) { 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;" />