diff --git a/hoj-vue/src/i18n/oj/en-US.js b/hoj-vue/src/i18n/oj/en-US.js index ed2e8a5e..80961c4c 100644 --- a/hoj-vue/src/i18n/oj/en-US.js +++ b/hoj-vue/src/i18n/oj/en-US.js @@ -245,6 +245,7 @@ export const m = { OI_Ranklist: 'OI Ranklist', // /views/oj/discussion/discussionList.vue + Go_to_problem:"Go to Problem", Release_Time:'Release Time', Likes:'Likes', Views:'Views', diff --git a/hoj-vue/src/i18n/oj/zh-CN.js b/hoj-vue/src/i18n/oj/zh-CN.js index 536f9134..5085b9c9 100644 --- a/hoj-vue/src/i18n/oj/zh-CN.js +++ b/hoj-vue/src/i18n/oj/zh-CN.js @@ -247,6 +247,7 @@ export const m = { OI_Ranklist: 'OI 排行榜', // /views/oj/discussion/discussionList.vue + Go_to_problem:'前往原题', Release_Time:'发布时间', Likes:'点赞', Views:'浏览', diff --git a/hoj-vue/src/views/oj/discussion/discussion.vue b/hoj-vue/src/views/oj/discussion/discussion.vue index e0727bbf..efbe7b5a 100644 --- a/hoj-vue/src/views/oj/discussion/discussion.vue +++ b/hoj-vue/src/views/oj/discussion/discussion.vue @@ -4,6 +4,14 @@

{{ discussion.title }} + {{ $t('m.Go_to_problem') }}

@@ -262,6 +270,13 @@ export default { }); }, + toProblem(pid) { + this.$router.push({ + name: 'ProblemDetails', + params: { problemID: pid }, + }); + }, + toLikeDiscussion(did, toLike) { if (!this.isAuthenticated) { myMessage.warning(this.$i18n.t('m.Please_login_first')); diff --git a/hoj-vue/src/views/oj/discussion/discussionList.vue b/hoj-vue/src/views/oj/discussion/discussionList.vue index 0006f01a..45e5ecbc 100644 --- a/hoj-vue/src/views/oj/discussion/discussionList.vue +++ b/hoj-vue/src/views/oj/discussion/discussionList.vue @@ -61,12 +61,25 @@ > - -

- {{ discussion.title }} -

-
- +

+ {{ + discussion.title + }} + {{ $t('m.Go_to_problem') }} +