添加跳转问题件详情页动态路由

This commit is contained in:
mengxiaolong
2020-08-03 10:41:10 +08:00
parent 886f9024b5
commit 887232da08
3 changed files with 4 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ export default [
} }
}, },
{ {
path: '/questions/detail', path: '/questions/detail/:id/:type',
name: 'QuestionsDetail', name: 'QuestionsDetail',
component: g('QuestionsDetail'), component: g('QuestionsDetail'),
meta: { meta: {

View File

@@ -234,13 +234,13 @@ export default {
}, },
async getQuestionDetail() { async getQuestionDetail() {
const rs = await getQuestionDetail({ const rs = await getQuestionDetail({
id: this.$route.query.id id: this.$route.params.id
}) })
console.log(rs) console.log(rs)
} }
}, },
async created() { async created() {
this.issueType = this.$route.query.type this.issueType = this.$route.params.type
this.getBankList() this.getBankList()
this.getQuestionDetail() this.getQuestionDetail()
}, },

View File

@@ -139,7 +139,7 @@ export default {
url: `${window.location.origin}/#/questions/detail` url: `${window.location.origin}/#/questions/detail`
}, },
routerInfo: { routerInfo: {
path: `/questions/detail?id=${item.id}&type=${item.businessType}` path: `/questions/detail/${item.id}/${item.businessType}`
} }
}) })
}, },