Commit 97a5735d authored by 杨梦雪's avatar 杨梦雪

11

parent e6d876cd
...@@ -63,15 +63,15 @@ const routes = [{ ...@@ -63,15 +63,15 @@ const routes = [{
component: () => component: () =>
import('v/index/recruit/Index.vue') import('v/index/recruit/Index.vue')
}, },
{ // {
path: "/404", // path: "/404",
name: "notFound", // name: "notFound",
component: () => // component: () =>
import('v/index/notFound.vue'), // import('v/index/notFound.vue'),
}, { // }, {
path: "*", // 此处需特别注意置于最底部 // path: "*", // 此处需特别注意置于最底部
redirect: "/404" // redirect: "/404"
} // }
] ]
...@@ -160,7 +160,7 @@ function checkCam(code, cb) { ...@@ -160,7 +160,7 @@ function checkCam(code, cb) {
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// console.log(next, 'next') console.log(to, 'to')
let let
toLogin = "/login", toLogin = "/login",
toRegister = "/register", toRegister = "/register",
...@@ -191,6 +191,8 @@ router.beforeEach((to, from, next) => { ...@@ -191,6 +191,8 @@ router.beforeEach((to, from, next) => {
}); });
} else { } else {
code = to.params.code ? to.params.code : to.query.code; code = to.params.code ? to.params.code : to.query.code;
// console.log(code);
//return next();
let token = window.localStorage.getItem("index-token" + code); let token = window.localStorage.getItem("index-token" + code);
if (!token) { if (!token) {
checkCam(code, (res) => { checkCam(code, (res) => {
......
...@@ -7,22 +7,20 @@ export default [{ ...@@ -7,22 +7,20 @@ export default [{
} }
}, },
{ {
path: '/homework', path: 'homework',
name: 'index-homework', name: 'index-homework',
component: () => import('v/index/camp/Homework.vue'), component: () => import('v/index/camp/Homework.vue'),
meta: { meta: {
title: '营地作业' title: '营地作业'
}
},
{
path: '/homework/refer',
name: 'homework-refer',
component: () => import('v/index/camp/homework/refer.vue'),
meta: {
title: '提交作业'
}, },
children: [{
path: '/refer',
name: 'refer',
component: () => import('v/index/camp/homework/refer.vue'),
meta: {
title: '提交作业'
},
},
]
}, },
{ {
path: '/certificate', path: '/certificate',
......
export default [{ export default [{
path: '/personalInfo', path: '/personalInfo',
name: 'index-personalInfo', name: 'index-personalInfo',
component: () => import(/* webpackChunkName: "login" */ 'v/index/Info/personalInfo.vue'), component: () => import('v/index/Info/personalInfo.vue'),
meta: { meta: {
title: '个人资料' title: '个人资料'
} }
...@@ -9,11 +9,9 @@ export default [{ ...@@ -9,11 +9,9 @@ export default [{
{ {
path: '/password', path: '/password',
name: 'index-password', name: 'index-password',
component: () => import(/* webpackChunkName: "reset" */ 'v/index/Info/password.vue'), component: () => import('v/index/Info/password.vue'),
meta: { meta: {
title: '修改密码' title: '修改密码'
} }
}, },
]
]
\ No newline at end of file
...@@ -28,13 +28,7 @@ ...@@ -28,13 +28,7 @@
</div> </div>
<div class="camp_right" ref="rightBox"> <div class="camp_right" ref="rightBox">
<router-view <router-view @getStatus="getStatus" />
@getStatus="getStatus"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -47,9 +41,9 @@ ...@@ -47,9 +41,9 @@
import Cookie from "js-cookie"; import Cookie from "js-cookie";
import Header from "@/components/index/SignUp/Header.vue"; import Header from "@/components/index/SignUp/Header.vue";
import Footer from "@/components/index/Footer.vue"; import Footer from "@/components/index/Footer.vue";
import svg1 from '@/assets/img/signUp/icon.svg'; import svg1 from "@/assets/img/signUp/icon.svg";
import svg2 from '@/assets/img/signUp/icon-1.svg'; import svg2 from "@/assets/img/signUp/icon-1.svg";
import svg3 from '@/assets/img/signUp/icon-2.svg'; import svg3 from "@/assets/img/signUp/icon-2.svg";
export default { export default {
name: "campIndex", name: "campIndex",
...@@ -69,19 +63,19 @@ export default { ...@@ -69,19 +63,19 @@ export default {
id: "0", id: "0",
desc: "营地报名", desc: "营地报名",
icon: "icon-icon1", icon: "icon-icon1",
url: svg1 url: svg1,
}, },
{ {
id: "1", id: "1",
desc: "营地作业", desc: "营地作业",
icon: "icon-icon-1", icon: "icon-icon-1",
url: svg2 url: svg2,
}, },
{ {
id: "2", id: "2",
desc: "营地证书", desc: "营地证书",
icon: "icon-icon-2", icon: "icon-icon-2",
url: svg3 url: svg3,
}, },
], ],
......
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