Commit 25798f71 by 尹亚亭

two thirds of index and router go

parent 71cc8204
...@@ -5,6 +5,11 @@ import Home from '../views/Home.vue' ...@@ -5,6 +5,11 @@ import Home from '../views/Home.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
const routes = [ const routes = [
// 重定向
{
path: "/",
redirect: "/home"
},
{ {
path: '/home', path: '/home',
name: 'home', name: 'home',
...@@ -13,21 +18,15 @@ const routes = [ ...@@ -13,21 +18,15 @@ const routes = [
children: [ children: [
{ {
path: 'index', path: 'index',
// component: () => import("@/views/pages/childone.vue")
component: () => import("@/views/pages/home/HomeTab.vue") component: () => import("@/views/pages/home/HomeTab.vue")
}, },
{ {
path: 'profile', path: 'profile',
component: () => import("@/views/pages/childtwo.vue") component: () => import("@/views/pages/profile/Profile.vue")
} },
] ]
}, },
// 重定向
{
path: "/",
redirect: "/home"
},
{ {
path: '/detail', path: '/detail',
name: 'detail', name: 'detail',
...@@ -35,6 +34,17 @@ const routes = [ ...@@ -35,6 +34,17 @@ const routes = [
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/pages/detail/Detail.vue') component: () => import(/* webpackChunkName: "about" */ '../views/pages/detail/Detail.vue')
},
{
path: '/otherreg',
name: 'otherreg',
component: () => import("@/views/pages/otherreg/Otherreg.vue")
},
////
{
path: '/selfreg',
name: 'selfreg',
component: () => import('../views/pages/selfreg/Selfreg.vue')
} }
] ]
......
<template>
<div>
<h1>profile 我的</h1>
<h3>
<router-link to="/detail">点击跳转呀</router-link>
</h3>
</div>
</template>
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
}, },
methods: { methods: {
onClickLeft() { onClickLeft() {
this.$router.push("/home"); this.$router.go(-1);
}, },
onClickRight() { onClickRight() {
Toast("按钮"); Toast("按钮");
......
...@@ -18,6 +18,76 @@ ...@@ -18,6 +18,76 @@
<li> <li>
<h3>自助注册</h3> <h3>自助注册</h3>
<h4>适合熟知商标注册流程的企业用户</h4> <h4>适合熟知商标注册流程的企业用户</h4>
<div class="line"></div>
<div class="desc">
<p>
<strong></strong>
<span>自己检索商标,准备官方所需注册材料</span>
</p>
<!-- 模拟写死的数据 -->
<p>
<strong></strong>
<span>提交迅速,及时反馈</span>
</p>
<p>
<strong></strong>
<span>全程跟踪,掌握申请进度</span>
</p>
</div>
<div class="price">
<i>¥300</i>
<b>/ 类</b>
</div>
<div class="button" @click="goToSelfReg">立即办理</div>
</li>
<!-- 模拟写死的数据 -->
<li>
<h3>专家辅助</h3>
<h4>适合熟知商标注册流程的企业用户</h4>
<div class="line"></div>
<div class="desc">
<p>
<strong></strong>
<span>自己检索商标,准备官方所需注册材料</span>
</p>
<p>
<strong></strong>
<span>提交迅速,及时反馈</span>
</p>
<p>
<strong></strong>
<span>全程跟踪,掌握申请进度</span>
</p>
</div>
<div class="price">
<i>¥680</i>
<b>/ 类</b>
</div>
<div class="button" @click="goToOtherreg">立即办理</div>
</li>
<li>
<h3>专家辅助</h3>
<h4>适合熟知商标注册流程的企业用户</h4>
<div class="line"></div>
<div class="desc">
<p>
<strong></strong>
<span>自己检索商标,准备官方所需注册材料</span>
</p>
<p>
<strong></strong>
<span>提交迅速,及时反馈</span>
</p>
<p>
<strong></strong>
<span>全程跟踪,掌握申请进度</span>
</p>
</div>
<div class="price">
<i>¥1380</i>
<b>/ 类</b>
</div>
<div class="button" @click="goToOtherreg">立即办理</div>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -29,6 +99,14 @@ export default { ...@@ -29,6 +99,14 @@ export default {
methods: { methods: {
onClickLeft() { onClickLeft() {
alert("go -1"); alert("go -1");
},
// 点击进入自主提报页面
goToSelfReg() {
this.$router.push("/selfreg");
},
// 点击进入产品详情页,另外两种的商标注册的方式
goToOtherreg() {
this.$router.push("/otherreg");
} }
} }
}; };
...@@ -36,6 +114,7 @@ export default { ...@@ -36,6 +114,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.home-tab { .home-tab {
background: #fbf8fb;
.banner { .banner {
height: 188px; height: 188px;
img { img {
...@@ -84,19 +163,79 @@ export default { ...@@ -84,19 +163,79 @@ export default {
li { li {
display: inline-block; display: inline-block;
width: 349px; width: 349px;
height: 292px; height: 300px;
background: #578; border-top: #454246 5px solid;
background: #fff;
margin-bottom: 16px;
h3 { h3 {
color: #333333; color: #333333;
font-size: 19px; font-size: 19px;
width: 83px;
line-height: 27px; line-height: 27px;
margin: 21px 0 6px 18px; margin: 21px 0 6px 18px;
} }
h4 { h4 {
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
width: 270px;
line-height: 20px; line-height: 20px;
margin: 0 0 px 18px; margin: 0 0 18px 20px;
}
.line {
width: 309px;
height: 1px;
background: #f3f0f3;
margin: 0 auto;
}
.desc {
width: 309px;
margin: 0 auto;
p {
strong {
display: inline-block;
width: 11px;
height: 8px;
background: url("../../../assets/images/home/rightmark.png")
no-repeat;
background-size: 100% 100%;
border: none;
}
span {
display: inline-block;
line-height: 19px;
width: 270px;
color: #333333;
font-size: 13px;
padding-left: 6px;
margin: 8px 0;
}
}
}
.price {
width: 190px;
line-height: 28px;
margin: 12px 0 15px 21px;
color: #ff4f0c;
i {
font-size: 20px;
display: inline-block;
font-weight: 700px;
}
b {
font-size: 13px;
display: inline-block;
font-weight: 600px;
margin-left: 6px;
}
}
.button {
width: 309px;
line-height: 35px;
margin: 0 auto;
background: #3194fb;
color: #fff;
font-size: 13px;
text-align: center;
} }
} }
} }
......
<template>
<div>
<van-nav-bar title="产品购买页" left-arrow @click-left="onClickLeft" />
</div>
</template>
<script>
export default {
methods: {
onClickLeft() {
this.$router.go(-1);
}
}
};
</script>
<style lang="scss" scoped>
</style>
<template> <template>
<div> <div>
<h1>index 首页</h1> <h1>profile 我的 页面</h1>
<h3> <h3>
<router-link to="/detail">点击跳转呀</router-link> <router-link to="/detail">点击跳转呀</router-link>
</h3> </h3>
</div> </div>
</template> </template>
<template>
<div>
<van-nav-bar title="填写注册信息" left-text="关闭" left-arrow @click-left="onClickLeft" />
</div>
</template>
<script>
export default {
methods: {
onClickLeft() {
this.$router.go(-1);
}
}
};
</script>
<style lang="scss" scoped>
</style>
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