会员详情页的跳转携带参数方式改为params

(cherry picked from commit d1bb736973)
This commit is contained in:
绮梦 2023-08-23 13:12:05 +08:00 committed by shizhong
parent a845a420b5
commit 2804d199c0
3 changed files with 3 additions and 5 deletions

View File

@ -434,7 +434,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
meta: { hidden: true },
children: [
{
path: 'user/detail',
path: 'user/detail/:member_id',
name: 'MemberUserDetail',
meta: {
title: '会员详情',

View File

@ -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

View File

@ -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 } })
}
/** 初始化 **/