fix page router

master
张 元山 2 weeks ago
parent e2fe4bb053
commit 6fd43d29db

@ -10,7 +10,7 @@ const goBack = () => {
const route = useRoute(); const route = useRoute();
watch(route, () => { watch(route, () => {
if (route.path.includes('title-forward/upload-id-card')) { if (route.path.includes('page-forward/upload-id-card')) {
switch (route.params.active) { switch (route.params.active) {
case '0': case '0':
route.meta.title = '上传身份证照片' route.meta.title = '上传身份证照片'

@ -12,8 +12,8 @@ const routes = [
component: () => import('@/views/logon/index.vue') component: () => import('@/views/logon/index.vue')
}, },
{ {
path: '/title-forward', path: '/page-forward',
name: 'title-forward', name: 'page-forward',
component: () => import('@/views/title-forward/index.vue'), component: () => import('@/views/title-forward/index.vue'),
children: [ children: [
{ {

@ -66,9 +66,9 @@ const isSignUp = async () => {
if (res.status === 0) { if (res.status === 0) {
if (res.data.isExist) { if (res.data.isExist) {
submitReturnData.value = res.data.data submitReturnData.value = res.data.data
router.push(`/title-forward/reg-details`) router.push(`/page-forward/reg-details`)
} else { } else {
router.push(`/title-forward/upload-id-card/${0}`) router.push(`/page-forward/upload-id-card/${0}`)
} }
} }
} }

@ -40,7 +40,7 @@ const saveInfo = async () => {
}); });
btnStatus.value = 0 btnStatus.value = 0
if (submitReturnData.value.phoneNum !== temSubmitReturnData.value.phoneNum) { if (submitReturnData.value.phoneNum !== temSubmitReturnData.value.phoneNum) {
router.replace('/title-forward/logon') router.replace('/page-forward/logon')
} }
temSubmitReturnData.value = submitReturnData.value temSubmitReturnData.value = submitReturnData.value
} }
@ -163,7 +163,7 @@ const goRouter = () => {
idCardInfo.value.expirationDate = submitReturnData.value.idCardEndDate idCardInfo.value.expirationDate = submitReturnData.value.idCardEndDate
iDCardImage.value.front = submitReturnData.value.idCardPhoto iDCardImage.value.front = submitReturnData.value.idCardPhoto
iDCardImage.value.back = submitReturnData.value.idCardBackPhoto iDCardImage.value.back = submitReturnData.value.idCardBackPhoto
router.push(`/title-forward/replace-id-card`) router.push(`/page-forward/replace-id-card`)
} }
</script> </script>
<template> <template>

@ -4,7 +4,7 @@ import storage from '@/utils/storage.js';
import { ref, onBeforeMount } from "vue"; import { ref, onBeforeMount } from "vue";
onBeforeMount(() => { onBeforeMount(() => {
storage.setItem('top-title', '登录') storage.setItem('top-title', '登录')
router.push('/title-forward/logon') router.push('/page-forward/logon')
}) })
const router = useRouter(); const router = useRouter();
const goRouter = () => { const goRouter = () => {

@ -90,7 +90,7 @@ const stepsClick = async (item) => {
return return
} }
active.value = 1 active.value = 1
router.replace(`/title-forward/upload-id-card/${1}`) router.replace(`/page-forward/upload-id-card/${1}`)
break break
case 1: case 1:
if (item.type === 'next') { if (item.type === 'next') {
@ -116,10 +116,10 @@ const stepsClick = async (item) => {
return return
} }
active.value = 2 active.value = 2
router.replace(`/title-forward/upload-id-card/${2}`) router.replace(`/page-forward/upload-id-card/${2}`)
} else if (item.type === 'back') { } else if (item.type === 'back') {
active.value = 0 active.value = 0
router.replace(`/title-forward/upload-id-card/${0}`) router.replace(`/page-forward/upload-id-card/${0}`)
} }
break break
case 2: case 2:
@ -134,15 +134,15 @@ const stepsClick = async (item) => {
} }
submitClick() submitClick()
active.value = 3 active.value = 3
router.replace(`/title-forward/upload-id-card/${3}`) router.replace(`/page-forward/upload-id-card/${3}`)
} else if (item.type === 'back') { } else if (item.type === 'back') {
active.value = 1 active.value = 1
router.replace(`/title-forward/upload-id-card/${1}`) router.replace(`/page-forward/upload-id-card/${1}`)
} }
break break
case 3: case 3:
if (item.type === 'finish') { if (item.type === 'finish') {
router.push('/title-forward/reg-details') router.push('/page-forward/reg-details')
} }
break break
} }

Loading…
Cancel
Save