Commit fe159e51 by 张立顺

配置

1 parent 542b5bdf
......@@ -6,6 +6,7 @@ import { IMG_URL } from '~/utils/constantData'
/**处理前置钩子逻辑 */
const routerBefore = next => {
// console.log("处理前置钩子逻辑");
// 配置图片全局路径
let page = wx.$router.getPageInstance()
page && (page.data.IMG_URL = IMG_URL)
......
import util from '../utils/util.js'
import {
getUserInfo
} from '~/utils/cache/userInfo'
import {
IMG_URL
} from '~/utils/constantData'
// import util from '../utils/util.js'
// import {
// getUserInfo
// } from '~/utils/cache/userInfo'
/**
* wx.onAppRoute钩子方法,
......@@ -34,9 +31,7 @@ export const generateRoutList = routerList => {
if (item.parent != '__plugin__') {
obj = {
...item,
isTab: __wxConfig.tabBar.list.some(({
pagePath
}) => item.url.includes(pagePath.replace('.html', '')))
isTab: __wxConfig.tabBar.list.some(({ pagePath }) => item.url.includes(pagePath.replace('.html', '')))
}
if (item.parent !== 'pages') {
let parentList = item.url.split(`/`)
......@@ -50,4 +45,4 @@ export const generateRoutList = routerList => {
}))
} catch (err) {}
return _routerList
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!