const routes = [
{ path: '/',component: strategyIndex,
children: [
{ path: 'strategy/:id', component: strategyList },
{ path:'/details/:catid',component: strategyDetails}
]
},
{
path:'*',
redirect:'/'
}
]
那你把它抽取出来放到第一层路由不就好了