Authored by yyq

fix topic

@@ -164,8 +164,6 @@ export default { @@ -164,8 +164,6 @@ export default {
164 name: 'topic', 164 name: 'topic',
165 params: { 165 params: {
166 topicId, 166 topicId,
167 - },  
168 - query: {  
169 topicName 167 topicName
170 } 168 }
171 }); 169 });
@@ -43,8 +43,6 @@ export default { @@ -43,8 +43,6 @@ export default {
43 name: 'topic', 43 name: 'topic',
44 params: { 44 params: {
45 topicId, 45 topicId,
46 - },  
47 - query: {  
48 topicName 46 topicName
49 } 47 }
50 }); 48 });
@@ -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