智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/7e/7efe654a456095bcd96ad5f3ac9...

15 lines
436 B

module.exports = function parsePages(manifest, pages) {
const entryPagePath = pages[0].path
const router = {
entry: entryPagePath.substr(0, entryPagePath.lastIndexOf('/')),
pages: {}
}
pages.forEach(page => {
const lastIndex = page.path.lastIndexOf('/')
const key = page.path.substr(0, lastIndex)
router.pages[key] = {
component: page.path.substr(lastIndex + 1)
}
})
manifest.router = router
}