会员详情页的跳转携带参数方式改为params
This commit is contained in:
parent
451458eb1e
commit
d1bb736973
@ -434,7 +434,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
||||
meta: { hidden: true },
|
||||
children: [
|
||||
{
|
||||
path: 'user/detail',
|
||||
path: 'user/detail/:member_id',
|
||||
name: 'MemberUserDetail',
|
||||
meta: {
|
||||
title: '会员详情',
|
||||
|
@ -200,9 +200,7 @@ const openForm = (type: string, id?: number) => {
|
||||
/** 初始化 */
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
// TODO @梦:改成 id 路径参数,而不是 query
|
||||
// TODO @梦:会员列表,把【详情】按钮加上哈
|
||||
const member_id = route.query.member_id as number
|
||||
const member_id = route.params.member_id as number
|
||||
onMounted(() => {
|
||||
if (!member_id) {
|
||||
// TODO
|
||||
|
@ -183,7 +183,7 @@ const resetQuery = () => {
|
||||
|
||||
const { push } = useRouter()
|
||||
const goMemberDetail = (id: number) => {
|
||||
push({ path: 'user/detail', query: { member_id: id } })
|
||||
push({ name: 'MemberUserDetail', params: { member_id: id } })
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
|
Loading…
Reference in New Issue
Block a user