fix: 产品标准手机端路由

This commit is contained in:
zyn
2024-01-08 09:55:46 +08:00
parent c0d2789b53
commit 8b8a915124
+4 -1
View File
@@ -41,7 +41,6 @@ import Contextmenu from 'vue-contextmenujs'
// vant
import vant from 'vant'
import 'vant/lib/index.css'
//vant
import animate from 'animate.css'
import tool from './utils/tool'
@@ -63,6 +62,10 @@ router.beforeEach((to, from, next) => {
if (isMobile()) {
if (fullPath.indexOf('phone') !== 0) {
let path = fullPath.replace(fullPath.charAt(0), fullPath.charAt(0).toUpperCase())
if (path.indexOf('BussLibraryProduct/') !== -1) {
// 产品标准流程-pc端重构,pc端路由改变而手机端路由未改变,此处让手机端跳转到正确路由
path = path.replace('BussLibraryProduct/', 'BussLibraryProduct')
}
path = '/phone' + path
next({ path: path })
}