Commit fe159e51 by 张立顺

配置

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