From e7385995bb0ee6faf50cd6f986d485f5fa9bf787 Mon Sep 17 00:00:00 2001 From: zhangtianli2006 Date: Wed, 25 Nov 2020 13:10:50 +0800 Subject: [PATCH] [fix] normal user status resubmit --- src/components/status/content.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/status/content.vue b/src/components/status/content.vue index 65774780..c7b24893 100644 --- a/src/components/status/content.vue +++ b/src/components/status/content.vue @@ -18,9 +18,7 @@ - Resubmit + Resubmit Back @@ -113,6 +111,8 @@ export default { buttonLoading: false, smallScreen: screen.width < 700, langTable: sfconfig.langTable, + is_mine: false, + can_edit: false }; }, methods: { @@ -126,6 +126,14 @@ export default { this.time = data.time; this.code = data.code; this.lang_num = String(data.lang); + + if (data.owner == String(this.$store.state.user.userid)) { + this.is_mine = true; + } + if (this.$store.state.user.isStaff || this.is_mine) { + this.can_edit = true; + } + this.$axios .get(apiurl('/problem/' + String(this.pid))) .then((title) => {