Commit 1730429d authored by ‘yangmengxue’'s avatar ‘yangmengxue’

营地不生效

parent 15d12764
......@@ -149,6 +149,10 @@ function checkCam(code, cb) {
return false;
}
getCam(code).then((res) => {
console.log(res)
if (res.data.code == "50018") {
return
}
let root = document.querySelector(":root");
root.style.setProperty("--color", res.data.system_color);
root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
......@@ -198,8 +202,8 @@ function checkCam(code, cb) {
store.state.open_certificate = res.data.open_certificate;
store.state.finish_certificate_address = res.data.finish_certificate_address;
}
//是否隐藏填写邮寄地址
if (res.data.is_post != null) {
//是否隐藏填写邮寄地址
if (res.data.is_post != null) {
store.state.isPost = res.data.is_post;
}
// 缴费截止时间
......@@ -208,6 +212,7 @@ function checkCam(code, cb) {
}
cb && cb(true);
}).catch(() => {
cb && cb(false);
})
}
......@@ -239,6 +244,7 @@ router.beforeEach((to, from, next) => {
} else if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
code = to.params.code ? to.params.code : to.query.code;
checkCam(code, (res) => {
console.log(res, '11')
if (res) {
let token = window.localStorage.getItem("index-token-all");
//检查登陆情况
......@@ -253,6 +259,7 @@ router.beforeEach((to, from, next) => {
} else if (to.name == "recruit") {
code = to.params.code;
checkCam(code, (res) => {
console.log(res)
if (res) {
return next();
}
......
......@@ -31,6 +31,7 @@ let state = {
finish_certificate_address:null,
isPost:0,//是否隐藏填写邮寄地址
registrationEnd:null,//缴费截止时间
};
export default new Vuex.Store({
......
......@@ -2,7 +2,7 @@
<div>
<div>当前页面不存在,请检查网址是否正确</div>
<div>
<router-link to="/">返回报名首页 </router-link>
<!-- <router-link to="/">返回报名首页 </router-link> -->
</div>
</div>
</template>
......
......@@ -64,7 +64,7 @@ export default {
},
created() {
this.info = this.$store.state.info;
console.log(this.info);
// console.log(this.info);
setTimeout(() => {
this.anchorList = this.getAnchor(this.info.student_recruitment_brochure);
}, 1000);
......
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