Commit 2fe80d79 by liwk

修改路由

1 parent e042464a
......@@ -2,20 +2,25 @@ const pages = {
customerGroup: [{
name: 'index',
}],
attractCustomer: [{
name: 'index',
meta: {
title: '渠道货吗'
}
}]
}
const redirect = 'customerGroup'
const redirect = ''
let routes = []
const keepAlives = []
Object.keys(pages).map(parent => {
pages[parent].map(val => {
const isIndex = parent == redirect && val.name == 'index'
let childrenPath = `${parent}/${val.name}`
let meta = val
let { meta } = val
const path = isIndex ?
'/' :
`/${val.name == 'index' ? parent : childrenPath}`
const name = val.name == 'index' ? parent : childrenPath.replace('/', '.')
delete meta.name
if (meta && meta.keepAlive) keepAlives.push(name)
let route = {
component: resolve => require([`views/${childrenPath}.vue`], resolve),
......
<template>
<div>
渠道活码
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
</style>
\ 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!