动态参数

路由动态参数

设置路由

1
2
3
4
5
{
path: '/faceDetail/:token?/:refresh?',
name: 'faceDetail',
component: () => import('@/views/FaceDetail/Index.vue'),
},

跳转路由

1
/faceDetail/abc/123`:`token` 值为 `abc`,`refresh` 值为 `123