Showing
5 changed files
with
5 additions
and
9 deletions
@@ -55,8 +55,8 @@ export default [{ | @@ -55,8 +55,8 @@ export default [{ | ||
55 | keepAlive: true | 55 | keepAlive: true |
56 | } | 56 | } |
57 | }, { | 57 | }, { |
58 | - path: '/topic/:topicId', | ||
59 | - alias: '/topic/:topicId', | 58 | + path: '/topic/:topicId/:topicName', |
59 | + alias: '/topic/:topicId/:topicName', | ||
60 | name: 'topic', | 60 | name: 'topic', |
61 | component: () => import(/* webpackChunkName: "topic" */ './topic'), | 61 | component: () => import(/* webpackChunkName: "topic" */ './topic'), |
62 | meta: { | 62 | meta: { |
@@ -85,7 +85,7 @@ export default { | @@ -85,7 +85,7 @@ export default { | ||
85 | }; | 85 | }; |
86 | }, | 86 | }, |
87 | created() { | 87 | created() { |
88 | - this.topicName = this.$route.query.topicName; | 88 | + this.topicName = this.$route.params.topicName; |
89 | }, | 89 | }, |
90 | activated() { | 90 | activated() { |
91 | if (this.scrollTop && this.yoho.direction === 'back') { | 91 | if (this.scrollTop && this.yoho.direction === 'back') { |
@@ -94,7 +94,7 @@ export default { | @@ -94,7 +94,7 @@ export default { | ||
94 | 94 | ||
95 | if (+this.$route.params.topicId !== this.topicId) { | 95 | if (+this.$route.params.topicId !== this.topicId) { |
96 | this.topicId = +this.$route.params.topicId; | 96 | this.topicId = +this.$route.params.topicId; |
97 | - this.topicName = this.$route.query.topicName; | 97 | + this.topicName = this.$route.params.topicName; |
98 | this.reload = true; | 98 | this.reload = true; |
99 | this.init(); | 99 | this.init(); |
100 | } | 100 | } |
@@ -282,7 +282,7 @@ export default { | @@ -282,7 +282,7 @@ export default { | ||
282 | return result; | 282 | return result; |
283 | }, | 283 | }, |
284 | async fetchTopicSimpleInfo({ commit, state }, {topicId}) { | 284 | async fetchTopicSimpleInfo({ commit, state }, {topicId}) { |
285 | - if (state.fetchTopicInfo || get(state.topicInfo, 'topicId') === topicId) { | 285 | + if (state.fetchTopicInfo) { |
286 | return Promise.resolve({}); | 286 | return Promise.resolve({}); |
287 | } | 287 | } |
288 | 288 |
-
Please register or login to post a comment