Commit ddfd31db authored by wuwangwolihui's avatar wuwangwolihui

路由跳转修改

parent 2a9d7b5d
......@@ -7,10 +7,10 @@
</div>
<div>
<div class="code flex">
<el-input v-model="input"></el-input>
<el-input v-model="input"></el-input>
<el-input v-model="input"></el-input>
<el-input v-model="input"></el-input>
<el-input v-model="input1"></el-input>
<el-input v-model="input2"></el-input>
<el-input v-model="input3"></el-input>
<el-input v-model="input4"></el-input>
</div>
<div class="errorCode">该邀请码无效,请输入正确的邀请码。</div>
</div>
......@@ -30,6 +30,14 @@
/* eslint-disable */
export default {
name: "Invitation",
data(){
return{
input1: null,
input2: null,
input3: null,
input4: null,
}
}
};
</script>
......
......@@ -7,39 +7,40 @@ import indexCamp from './index/camp'
Vue.use(VueRouter)
const routes = [{
path: '/',
meta: {
title: '招生简章'
const routes = [
{
path: '/',
meta: {
title: '招生简章'
},
component: () =>
import('v/index/recruit/Index.vue')
},
component: () =>
import('v/index/recruit/Index.vue')
},
{
path: '/login',
name: 'loginIndex',
meta: {
title: '登录'
{
path: '/login',
name: 'loginIndex',
meta: {
title: '登录'
},
component: () =>
import('v/index/login/Index.vue'),
children: [...indexLogin]
},
component: () =>
import('v/index/login/Index.vue'),
children: [...indexLogin]
},
{
path: '/cerificate',
name: 'cerificateIndex',
meta: {
title: '营地报名'
},
redirect: '/cerificate/signUp',
component: () =>
import('v/index/camp/Index.vue'),
children: [...indexCamp]
}
{
path: '/:cerificate',
name: 'cerificateIndex',
meta: {
title: '营地报名'
},
// redirect: '/cerificate/signUp',
component: () =>
import('v/index/camp/Index.vue'),
children: [...indexCamp]
}
]
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
......
......@@ -41,6 +41,17 @@ export default {
this.type = this.$route.params.type;
console.log(this.$route);
},
watch:{
'$route': {
handler(val) {
const that = this;
if(val.path.indexOf('signUp')!=-1){
that.type = val.params.type;
}
},
deep: true
}
}
};
</script>
......
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