Skip to content

Commit 181ed6c

Browse files
authored
Merge pull request #90 from segment-oj/change-api-url-ztl
change api
2 parents 57e79fe + 946c62f commit 181ed6c

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dompurify": "^2.0.12",
1616
"element-ui": "^2.13.2",
1717
"highlight.js": "^10.1.1",
18+
"js-sha256": "^0.9.0",
1819
"marked": "^1.1.1",
1920
"simplemde": "^1.11.2",
2021
"vue": "^2.6.11",

src/components/lib/AjaxTable.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export default {
4242
watch: {
4343
limit() {
4444
this.onPageChange(this.pageId);
45-
console.log(this.limit);
4645
},
4746
costumData(new_val, old_val) {
4847
let json_new_val = JSON.stringify(new_val);

src/components/problem/content.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,18 @@ export default {
145145
this.title = data.title;
146146
this.pid = data.pid;
147147
this.allowHTML = data.allow_html;
148-
this.description = data.description;
149148
this.memery = data.memory_limit / 1000;
150149
this.time = data.time_limit;
151150
this.hidden = !data.enabled;
152151
this.timeAdd = timeFormat(data.date_added);
153152
this.tags = data.tags;
154153
this.render_tags();
155154
this.problemLoading = false;
155+
this.$axios
156+
.get(apiurl('/problem/' + String(this.$route.params.id) + '/description'))
157+
.then(detail => {
158+
this.description = detail.data.res.description;
159+
});
156160
})
157161
.catch(err => {
158162
if(err.request.status === 404) {

src/components/problem/edit.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,17 @@ export default {
134134
.then(res => {
135135
let data = res.data.res;
136136
this.title = data.title;
137-
this.mdContent = data.description;
138137
this.memery = data.memory_limit / 1000;
139138
this.time = data.time_limit;
140139
this.disable = !data.enabled;
141140
this.html = data.allow_html;
142141
this.contentLoading = false;
143142
this.mdContent_sha256 = sha256(this.mdContent);
143+
this.$axios
144+
.get(apiurl('/problem/' + String(this.$route.params.id) + '/description'))
145+
.then(detail => {
146+
this.mdContent = detail.data.res.description;
147+
});
144148
})
145149
.catch(err => {
146150
if (err.request.status === 404) {

src/components/problem/list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
v-model="showTags"
4343
active-color="#13ce66"
4444
inactive-color="#ff4949"
45-
style="margin-top: 17px;"
45+
style="margin-top: 18px;"
4646
/>
4747
</el-col>
4848
</el-row>

0 commit comments

Comments
 (0)