fix: 产品标准手机端路由
This commit is contained in:
+4
-1
@@ -41,7 +41,6 @@ import Contextmenu from 'vue-contextmenujs'
|
|||||||
// vant
|
// vant
|
||||||
import vant from 'vant'
|
import vant from 'vant'
|
||||||
import 'vant/lib/index.css'
|
import 'vant/lib/index.css'
|
||||||
//vant
|
|
||||||
|
|
||||||
import animate from 'animate.css'
|
import animate from 'animate.css'
|
||||||
import tool from './utils/tool'
|
import tool from './utils/tool'
|
||||||
@@ -63,6 +62,10 @@ router.beforeEach((to, from, next) => {
|
|||||||
if (isMobile()) {
|
if (isMobile()) {
|
||||||
if (fullPath.indexOf('phone') !== 0) {
|
if (fullPath.indexOf('phone') !== 0) {
|
||||||
let path = fullPath.replace(fullPath.charAt(0), fullPath.charAt(0).toUpperCase())
|
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
|
path = '/phone' + path
|
||||||
next({ path: path })
|
next({ path: path })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user