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

营地不生效

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