修改代码首页跳转

master
lml 5 months ago
parent 3baf38ffea
commit f9f15129c1

@ -10,7 +10,7 @@
<div class="flx-align" style="width: 100%;"> <div class="flx-align" style="width: 100%;">
<!-- LOGO --> <!-- LOGO -->
<div> <div>
<a href="/home"> <a href="/newsHome">
<img style="width: 150px;" src="../../assets/images/home/logo_small.png" /> <img style="width: 150px;" src="../../assets/images/home/logo_small.png" />
</a> </a>
<!-- <button style="margin-top: 100px;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" <!-- <button style="margin-top: 100px;" class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
@ -22,7 +22,7 @@
<div class="collapse navbar-collapse" id="navbarCollapse"> <div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav navbar-center" id="mySidenav"> <ul class="navbar-nav navbar-center" id="mySidenav">
<li class="nav-item"> <li class="nav-item">
<router-link class="nav-link" to="/home">首页</router-link> <router-link class="nav-link" to="/newsHome">首页</router-link>
</li> </li>
<li class="nav-item" > <li class="nav-item" >
<router-link class="nav-link" to="/business">业务介绍</router-link> <router-link class="nav-link" to="/business">业务介绍</router-link>
@ -68,7 +68,7 @@
<div class="flx-align" style="width: 100%;"> <div class="flx-align" style="width: 100%;">
<!-- LOGO --> <!-- LOGO -->
<div> <div>
<a href="/home"> <a href="/newsHome">
<img style="width: 150px;" src="../../assets/images/home/logo_small_black.png" /> <img style="width: 150px;" src="../../assets/images/home/logo_small_black.png" />
</a> </a>
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse1" data-target="#navbarCollapse1" <!-- <button class="navbar-toggler" type="button" data-toggle="collapse1" data-target="#navbarCollapse1"
@ -80,7 +80,7 @@
<div class="collapse1 navbar-collapse" id="navbarCollapse1"> <div class="collapse1 navbar-collapse" id="navbarCollapse1">
<ul class="navbar-nav navbar-center" id="mySidenav1"> <ul class="navbar-nav navbar-center" id="mySidenav1">
<li class="nav-item"> <li class="nav-item">
<router-link class="nav-link" to="/home">首页</router-link> <router-link class="nav-link" to="/newsHome">首页</router-link>
</li> </li>
<li class="nav-item" > <li class="nav-item" >
<router-link class="nav-link" to="/business">业务介绍</router-link> <router-link class="nav-link" to="/business">业务介绍</router-link>
@ -153,13 +153,11 @@
watch: { watch: {
'$route'(to, from) { '$route'(to, from) {
// //
if(to.path ==='/home') { if(to.path ==='/newsHome') {
this.color = 'white'; this.color = 'white';
}else { }else {
this.color = 'black'; this.color = 'black';
} }
//
} }
} }
}; };

@ -150,10 +150,10 @@ const routes = [
name: 'Forgot Password page', name: 'Forgot Password page',
component: Forgotpassword component: Forgotpassword
}, },
// { {
// path: '*', // 捕获所有不匹配的路径 path: '*', // 捕获所有不匹配的路径
// redirect: '/newsHome' // 重定向到/home redirect: '/newsHome' // 重定向到/home
// } }
]; ];
const router = new VueRouter({ const router = new VueRouter({

Loading…
Cancel
Save