Commit f6cbcf54 authored by 冷玲鹏's avatar 冷玲鹏

父组件+路由修改

parent 2b5a235f
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>liulanqi_logo.png"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <script type="text/javascript" src="http://49.232.167.247:20016/web-apps/apps/api/documents/api.js"></script> --> <!-- <script type="text/javascript" src="http://49.232.167.247:20016/web-apps/apps/api/documents/api.js"></script> -->
<!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_2011217_f70ptj9y4oc.css">--> <!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_2011217_f70ptj9y4oc.css">-->
<title><%= webpackConfig.name %></title> <title>融创软通</title>
</head> </head>
<body> <body>
<noscript> <noscript>
......
This diff is collapsed.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<router-link to="/Index"> <router-link to="/Index">
<img <img
class="img-class" class="img-class"
src="../../assets/homepage/logo1.png" src="../../assets/icons/logo1.png"
@click="logoClick"> @click="logoClick">
</router-link> </router-link>
</el-menu-item> </el-menu-item>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div class="header-dropdown"> <div class="header-dropdown">
<img <img
class="header-dropdown-img" class="header-dropdown-img"
src="@/assets/icons/logo1.svg" src="../../assets/icons/logo1.png"
> >
<!-- 按钮触发下拉菜单 --> <!-- 按钮触发下拉菜单 -->
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<div @click="logoClick"> <div @click="logoClick">
<img <img
class="bottom_info_img" class="bottom_info_img"
src="@/assets/icons/logo2.svg" src="../../assets/icons/logo2.png"
@click="handleSelect('0')" @click="handleSelect('0')"
> >
</div> </div>
......
...@@ -3,17 +3,17 @@ import Router from 'vue-router' ...@@ -3,17 +3,17 @@ import Router from 'vue-router'
import Framework from '@/components/Framework' import Framework from '@/components/Framework'
import Index from '@/components/Index' import Index from '@/components/Index'
Vue.use(Router) Vue.use(Router)
export const constantRoutes = [ /*/!*export const constantRoutes = [
{ {
path: '/', path: '/',
redirect: '/index', redirect: '/index',
hidden: true hidden: true
}, },
/* { /!* {
path: '/login', path: '/login',
component: (resolve) => require(['@/views/login/login.vue'], resolve), component: (resolve) => require(['@/views/login/login.vue'], resolve),
hidden: true hidden: true
},*/ },*!/
{ {
path: '/', path: '/',
component: Framework, component: Framework,
...@@ -51,34 +51,94 @@ export const constantRoutes = [ ...@@ -51,34 +51,94 @@ export const constantRoutes = [
// 默认子路由(首页) // 默认子路由(首页)
] ]
} }
/* { /!* {
path: '/404', path: '/404',
component: () => import('@/views/404'), component: () => import('@/views/404'),
hidden: true hidden: true
}*/ }*!/
] ]*!/
/** /!**
* 有权限的路由 * 有权限的路由
* 需要动态判断权限并通过 addRoutes 动态添加的页面。 * 需要动态判断权限并通过 addRoutes 动态添加的页面。
*/ *!/
export const asyncRoutes = [ export const asyncRoutes = [
// 404 page must be placed at the end !!! // 404 page must be placed at the end !!!
{ path: '*', redirect: '/404', hidden: true } { path: '*', redirect: '/404', hidden: true }
] ]
const createRouter = () => new Router({ /!*const createRouter = () => new Router({
// mode: 'history', // require service support // mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes
}) })*!/
const router = createRouter() /!*const router = createRouter()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() { export function resetRouter() {
const newRouter = createRouter() const newRouter = createRouter()
router.matcher = newRouter.matcher // reset router router.matcher = newRouter.matcher // reset router
} }*!/*/
export default new Router({
/* mode:'histroy',*/
routes: [
// {
// path: '/',
// name: 'frameworkIndex',
// component: frameworkIndex
// },
{
path: '/',
component: Framework,
children: [
// 重定向到默认子路由 (首页)
{
path: '',
redirect: 'index' // 访问 '/' 时重定向到 '/index'
},
// 默认子路由(首页)
{
path: 'index',
name: 'Index',
component: Index
},
// 业务服务
{
path: 'businessServices',
name: 'BusinessServices',
component: () => import('@/components/BusinessServices') // 懒加载 BusinessServices 组件
},
// 产教融合
{
path: 'edutainment',
name: 'Edutainment',
component: () => import('@/components/Edutainment') // 懒加载 Edutainment 组件
},
// 加入我们
{
path: 'joinUs',
name: 'JoinUs',
component: () => import('@/components/JoinUs') // 懒加载 JoinUs 组件
},
export default router // 关于我们
{
path: "About",
name: "About",
component: () => import('@/components/About') // 懒加载 About 组件
}
]
}
],
scrollBehavior(to, from, savedPosition) {
// 如果是返回上次保存的滚动位置,直接返回
if (savedPosition) {
return savedPosition;
} else {
// 否则始终滚动到页面顶部
return { x: 0, y: 0 };
}
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment