Commit fd369a29 authored by wuwangwolihui's avatar wuwangwolihui

营地2.0-整合修改

parent b1b0d2ca
......@@ -23,7 +23,6 @@
},
watch: {
'$route'(val) {
console.log(val.query.jxcode)
this.$store.commit('setActiveIndex', val.path)
}
}
......
......@@ -2,9 +2,9 @@
// var(--color) 用于引用
// 在页面样式的引用中,你将会看到
:root {
--color: #60194a;
--bk_pic: #60194a;
--logo: #60194a;
--color: #436EF3;
--bk_pic: #436EF3;
--logo: #436EF3;
--all_color: #3EACEF;
--all_color: #436EF3;
}
......@@ -7,7 +7,7 @@
<div class="contact_list">
<div class="contact_list_item">
<i class="el-icon-message"></i>
<span>联系邮箱</span>ydhdservice@163.com
<span>联系邮箱</span>service@campcenter.cn
</div>
<div class="contact_list_item">
<i class="el-icon-aim"></i>
......
<template>
<div class="Header">
<div class="Header" :class="type==1?'all-header':''">
<div class="H_content com-container">
<div class="image">
<img v-if="type==1" src="../assets/img/logo_base.png" alt=""/>
<img v-if="type==2" :src="system_logo" alt="" @click="toRecruit"/>
<img v-if="type==1" :src="all_logo" alt=""/>
<img v-if="type==2" :src="system_logo" alt=""/>
<img v-if="type==3" :src="system_logo?system_logo:all_logo" alt="" @click="toRecruit"/>
</div>
<div class="right">
<el-menu :default-active="$store.state.activeIndex" @select="handleSelect" class="el-menu-demo"
<el-menu :default-active="$store.state.activeIndex"
@select="handleSelect"
mode="horizontal">
<el-menu-item index="/home">首页</el-menu-item>
<el-menu-item index="/active">活动中心</el-menu-item>
</el-menu>
<el-button v-if="type==2" @click="toSignUp" class="sign-up">立即报名</el-button>
<div class="noLogin" v-if="!isLogin">
<span
:class="isHover ? '' : 'is-hover'"
......@@ -41,6 +44,7 @@
</template>
<script>
import {logout} from "r/index/login";
import logoImg from "../assets/img/logo_base.png";
export default {
name: "Header",
......@@ -54,6 +58,7 @@
isLogin: false,
phone: '',
system_logo: '',
all_logo: logoImg,
};
},
created() {
......@@ -66,6 +71,10 @@
// 导航栏操作
handleSelect(key, keyPath) {
this.$router.push(key);
let root = document.querySelector(":root");
root.style.setProperty("--color", "#436EF3");
let code = this.$store.state.indexIdentity;
window.localStorage.setItem("system_logo" + code, this.all_logo);
},
// 下拉菜单操作
handleCommand(command) {
......@@ -78,22 +87,32 @@
},
// 去个人中心
toCenter() {
this.$router.replace("/myInfo");
this.$router.replace("/myInfo/signUpList");
},
// 去注册
toRegister() {
if (this.type == 1) {
this.$router.push("/baseRegister");
} else if (this.type == 2) {
} else if (this.type == 2 || this.type == 3) {
let code = this.$store.state.indexIdentity;
this.$router.push("/register?code=" + code);
}
},
// 立即报名
toSignUp() {
let code = this.$store.state.indexIdentity;
let token = window.localStorage.getItem("index-token-all");
if (!token) {
this.$router.push("/login?code=" + code);
} else {
this.$router.push("/signUp/undefined?code=" + code);
}
},
// 去登录页
toLogin() {
if (this.type == 1) {
this.$router.push("/baseLogin");
} else if (this.type == 2) {
} else if (this.type == 2 || this.type == 3) {
let code = this.$store.state.indexIdentity;
this.$router.push("/login?code=" + code);
}
......@@ -111,7 +130,7 @@
}
// 清除本地缓存 除了特殊缓存
this.$store.commit('removeLocalStorage');
if (this.type == 2) {
if (this.type == 2 || this.type == 3) {
let code = this.$store.state.indexIdentity;
if (this.$store.state.human == 1) {
await this.$router.replace({
......@@ -142,7 +161,7 @@
watch: {
typeFu(val) {
this.type = val;
if (val == 2) {
if (val == 2 || val == 3) {
let code = this.$store.state.indexIdentity;
this.system_logo = localStorage.getItem("system_logo" + code) || "";
}
......@@ -169,6 +188,7 @@
.image img {
// width: 318px;
height: 62px;
cursor: pointer;
}
.right {
......@@ -191,18 +211,30 @@
&:hover {
font-weight: bold;
color: var(--all_color);
color: var(--color);
}
&.is-active {
font-weight: bold;
color: var(--all_color);
color: var(--color);
border-bottom-width: 3px;
border-bottom-color: var(--all_color);
border-bottom-color: var(--color);
}
}
}
.sign-up {
color: #666666;
border: 2px solid #aaaaaa;
background-color: transparent;
margin: 0 30px 0 0;
&:hover {
color: var(--color);
border: 2px solid var(--color);
}
}
.noLogin {
flex: 1;
......@@ -215,14 +247,10 @@
border-radius: 4px;
border: 2px solid transparent;
&:last-child {
margin-left: 10px;
}
&.is-hover {
cursor: pointer;
color: var(--all_color);
border-color: var(--all_color);
color: var(--color);
border-color: var(--color);
}
}
}
......@@ -262,5 +290,36 @@
}
}
}
&.all-header {
::v-deep .el-menu {
.el-menu-item {
&:hover {
color: var(--all_color) !important;
}
&.is-active {
color: var(--all_color) !important;
border-bottom-color: var(--all_color) !important;
}
}
}
.sign-up {
&:hover {
color: var(--all_color) !important;
border: 2px solid var(--all_color) !important;
}
}
.noLogin {
span {
&.is-hover {
color: var(--all_color) !important;
border-color: var(--all_color) !important;
}
}
}
}
}
</style>
......@@ -55,13 +55,12 @@
return this.$message.error(res.data.message);
}
this.activeList = res.data.data;
console.log(typeof (this.activeList))
})
},
toSignUp(code) {
console.log(code)
this.$store.commit('setIndexIdentity', code)
this.$router.push('/signUp/examInfo?code=' + code)
this.$router.push('/signUp/undefined?code=' + code)
}
},
watch: {
......
......@@ -74,7 +74,7 @@ export default {
},
toCenter() {
let code = this.$store.state.indexIdentity;
this.$router.replace("/signUp/examInfo?code=" + code);
this.$router.replace("/signUp/undefined?code=" + code);
},
toRegister() {
let code = this.$store.state.indexIdentity;
......
......@@ -71,7 +71,7 @@
}
},
created() {
this.getCams();
this.info = this.$store.state.info;
const code = this.$store.state.indexIdentity;
//是否开启多形式报名
this.is_multiform = this.$store.state.isMultiform;
......
......@@ -60,7 +60,6 @@ const reqList = []
* @param {string} errorMessage - 请求中断时需要显示的错误信息
*/
const stopRepeatRequest = function (reqList, url, cancel, errorMessage) {
console.log(reqList)
const errorMsg = errorMessage || ''
for (let i = 0; i < reqList.length; i++) {
if (reqList[i] === url) {
......@@ -127,7 +126,6 @@ export function request(config) {
return config
}
const token = localStorage.getItem('index-token-all');
console.log(token, store.state.isLogin)
if (token) {
config.headers.token = token;
} else {
......
......@@ -39,14 +39,15 @@ const routes = [
children: [...baseLogin]
},
{
path: '/myInfo',
path: '/myInfo/',
name: 'myInfoIndex',
meta: {
title: '个人中心'
},
redirect: '/myInfo/signUpList',
component: () => import('v/base/myInfo/index.vue'),
children: [{
path: '/signUpList',
path: 'signUpList',
name: 'signUpList',
component: () => import(/* webpackChunkName: "login" */ 'v/base/myInfo/signUp.vue'),
meta: {
......@@ -63,7 +64,6 @@ const routes = [
component: () => import('v/index/login/Index.vue'),
children: [...indexLogin]
},
{
path: '/Info',
name: 'Info',
......@@ -197,8 +197,8 @@ function checkCam(code, cb) {
}
router.beforeEach((to, from, next) => {
if (from.fullPath != '/') {
store.commit('setFullPath', from.fullPath);
if (from.fullPath != '/' && from.fullPath != '/baseLogin' && from.fullPath != '/baseRegister') {
store.commit('setPreviousPath', from.fullPath);
}
let toLogin = "/login",
toRegister = "/register",
......@@ -211,7 +211,7 @@ router.beforeEach((to, from, next) => {
toInfo = "/myInfo";
let code = false;
document.title = to.meta.title;
if (to.path == toBaseLogin || to.path == toBaseRegister || to.path == toBaseReset || to.path == toInfo || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
if (to.path == toBaseLogin || to.path == toBaseRegister || to.path == toBaseReset || to.path.indexOf(toInfo) != -1 || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
return next();
} else if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
code = to.params.code ? to.params.code : to.query.code;
......@@ -240,19 +240,17 @@ router.beforeEach((to, from, next) => {
if (!token) {
checkCam(code, (res) => {
if (res) {
// return next(toLogin);
return next("/" + code);
}
});
} else {
// if (to.path == '/signUp/undefined') {
// // 报名流程中转页,不调用getCam接口
// return next();
// }
checkCam(code, (res) => {
if (res) {
return next();
// if (token) {
// return next();
// } else {
// next("/" + code);
// }
}
});
}
......
......@@ -9,7 +9,7 @@ Vue.use(Vuex)
let state = {
// 上一页地址
fullPath: localStorage.getItem("index-fullPath") || "/",
previousPath: localStorage.getItem("index-previousPath") || "/",
// 数据
data: [],
indexIdentity: localStorage.getItem("index-identity") || "",
......
......@@ -29,9 +29,9 @@ export default {
state.activeIndex = key;
window.localStorage.setItem('index-active-path', key);
},
setFullPath(state, path) {
state.fullPath = path;
window.localStorage.setItem('index-fullPath', path);
setPreviousPath(state, path) {
state.previousPath = path;
window.localStorage.setItem('index-previousPath', path);
},
removeLocalStorage(state) {
for (let key in window.localStorage) {
......
......@@ -221,7 +221,7 @@
let allToken = window.localStorage.getItem('index-token-all');
if (allToken) {
this.$store.commit('setIndexIdentity', this.activeInfo.identity)
this.$router.push('/signUp/examInfo?code=' + this.activeInfo.identity);
this.$router.push('/signUp/undefined?code=' + this.activeInfo.identity);
} else {
this.$router.push('/baseLogin');
}
......
......@@ -286,9 +286,9 @@
this.$store.commit('login', res.data.token);
window.localStorage.setItem("index-phone-all", this.loginForm.phone);
window.localStorage.setItem("email", res.data.email);
let fullPath = this.$store.state.fullPath;
this.$router.push(fullPath);
this.$store.commit('setFullPath', '/');
let previousPath = this.$store.state.previousPath;
this.$router.push(previousPath);
this.$store.commit('setPreviousPath', '/');
});
});
},
......@@ -384,7 +384,7 @@
height: 20px;
font-size: 16px;
font-weight: 500;
color: var(--color);
color: var(--all_color);
line-height: 20px;
text-align: right;
}
......@@ -419,7 +419,7 @@
.code {
font-size: 14px;
font-weight: 600;
color: var(--color);
color: var(--all_color);
}
}
......@@ -449,7 +449,7 @@
border-bottom: 2px solid #d9d9d9;
&:focus {
border-bottom-color: var(--color);
border-bottom-color: var(--all_color);
}
}
......@@ -460,7 +460,7 @@
.el-button {
width: 100%;
height: 60px;
background: var(--color);
background: var(--all_color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......@@ -488,7 +488,7 @@
cursor: pointer;
&:hover {
color: var(--color);
color: var(--all_color);
text-decoration: underline;
}
}
......@@ -502,7 +502,7 @@
cursor: pointer;
&:hover {
color: var(--color);
color: var(--all_color);
text-decoration: underline;
}
}
......
......@@ -292,7 +292,7 @@
this.$store.commit('login', res.data.token);
window.localStorage.setItem("index-phone-all", this.registerForm.phone);
// 跳转到报名
this.$router.replace("/signUpList");
this.$router.replace("/myInfo/signUpList");
});
});
},
......@@ -355,14 +355,14 @@
height: 20px;
font-size: 22px;
font-weight: 500;
color: var(--color);
color: var(--all_color);
line-height: 20px;
}
// .line {
// width: 103px;
// height: 3px;
// background: var(--color);
// background: var(--all_color);
// border-radius: 2px;
// }
......@@ -391,7 +391,7 @@
.code {
font-size: 14px;
font-weight: 600;
color: var(--color);
color: var(--all_color);
}
}
......@@ -421,7 +421,7 @@
border-bottom: 2px solid #d9d9d9;
&:focus {
border-bottom-color: var(--color);
border-bottom-color: var(--all_color);
}
}
......@@ -432,7 +432,7 @@
.el-button {
width: 100%;
height: 60px;
background: var(--color);
background: var(--all_color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......@@ -460,7 +460,7 @@
cursor: pointer;
&:hover {
color: var(--color);
color: var(--all_color);
text-decoration: underline;
}
}
......
......@@ -352,7 +352,7 @@
height: 20px;
font-size: 22px;
font-weight: 500;
color: var(--color);
color: var(--all_color);
line-height: 20px;
text-align: center;
}
......@@ -360,7 +360,7 @@
// .line {
// width: 83px;
// height: 3px;
// background: var(--color);
// background: var(--all_color);
// border-radius: 2px;
// }
......@@ -389,7 +389,7 @@
.code {
font-size: 14px;
font-weight: 600;
color: var(--color);
color: var(--all_color);
}
}
......@@ -419,7 +419,7 @@
border-bottom: 2px solid #d9d9d9;
&:focus {
border-bottom-color: var(--color);
border-bottom-color: var(--all_color);
}
}
......@@ -430,7 +430,7 @@
.el-button {
width: 100%;
height: 60px;
background: var(--color);
background: var(--all_color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
......@@ -457,7 +457,7 @@
cursor: pointer;
&:hover {
color: var(--color);
color: var(--all_color);
text-decoration: underline;
}
}
......
<template>
<el-container>
<el-header height="104px">
<Header :typeFu="2"></Header>
<Header :typeFu="3"></Header>
<div class="bg-top"></div>
</el-header>
<el-container>
......@@ -82,10 +82,9 @@
},
methods: {
ToSignUp(index) {
console.log(index, 'index')
this.campindex_type = index;
if (this.campindex_type == 0) {
this.$router.push({path: '/signUpList'});
this.$router.push({path: '/myInfo/signUpList'});
}
},
onResize() {
......
<template>
<div class="camp-index">
<el-header height="104px">
<Header :typeFu="2"></Header>
<Header :typeFu="3"></Header>
<div class="bg-top">
<el-breadcrumb separator="/">
<el-breadcrumb-item
......
<template>
<el-container>
<el-header height="104px">
<Header :typeFu="2"></Header>
<Header :typeFu="3"></Header>
<div class="bg-top"></div>
</el-header>
<el-container>
......@@ -50,8 +50,7 @@
</template>
<div class="camp_right" ref="rightBox">
<SignUp @getStatus="getStatus" v-if="this.campindex_type == 0">
</SignUp>
<SignUp @getStatus="getStatus" v-if="this.campindex_type == 0"></SignUp>
<Homework v-if="this.campindex_type == 1"></Homework>
<Certificate v-if="this.campindex_type == 2"></Certificate>
<!-- <homeRefer v-if="this.homework_val == 3"> </homeRefer> -->
......@@ -139,7 +138,7 @@
},
watch: {},
created() {
this.getStatus();
// this.getStatus();
// this.torefer();
},
mounted() {
......@@ -156,19 +155,16 @@
// this.homework_val = val;
// },
getStatus(val) {
// console.log(val, "index_type");
this.index_status = val;
this.ToSignUp(this.campindex_type);
},
ToSignUp(index) {
// console.log(index,'index')
let code = this.$store.state.indexIdentity;
this.campindex_type = index;
if (this.campindex_type == 0) {
this.$router.push("/signUp/" + this.index_status + "?code=" + code);
this.homework_val == "";
// this.homework_val = "";
} else if (this.campindex_type == 1) {
console.log(this.$route);
this.$router.push("/homework?code=" + code);
} else if (this.campindex_type == 2) {
this.$router.push("/certificate?code=" + code);
......
......@@ -201,7 +201,6 @@
created() {
this.yingdiHref =
"http://ying.testgate.cn/b4ce2ee5068848e1a91ab7d5de34ba90";
// console.log(this.yingdiHref);
this.type = this.$route.params.type;
let camp_statement = window.localStorage.getItem(
"camp_statement" + this.$store.state.indexIdentity
......@@ -212,14 +211,12 @@
"1"
);
}
this.statuss();
// this.statuss();
this.signUpInit();
},
watch: {
$route: {
handler(val) {
// console.log(val, "routeval");
const that = this;
if (val.path.indexOf("signUp") != -1) {
that.type = val.params.type;
......@@ -249,7 +246,6 @@
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
console.log(res.data.status, "signBack.status");
this.signBackStatus = res.data.status;
this.signUpInit(this.signBackStatus);
this.$message.success(res.data.message);
......@@ -257,38 +253,25 @@
},
is_nextevent(val) {
this.isNexts = val;
// console.log(val, "isNexts");
// this.signUpInit( this.isNexts );
this.signUpInit(this.status_val);
},
// 点击下一步,触发父组件方法
statuss(val) {
// console.log(val, "statuss");
this.status_val = val;
this.signUpInit(this.status_val);
},
// status=4,跳到审核页面;status=3时,根据doubt_check做判断
signUpInit(status_val) {
// console.log(111111);
// console.log(status_val, "11111");
// console.log(isNexts, "2222");
signUpInit({}).then((res) => {
// console.log(res, "signUpInit");
if (res.data.code != 200) {
// if (res.data.code == 400001) {
// this.status = 6;
// this.type = "success";
// }
return this.$message.error(res.data.message);
}
this.status = res.data.status;
// console.log(this.status, "11111");
// 点击下一步传值给status,更新
if (status_val != null) {
this.status = status_val;
} else {
this.status = res.data.status;
// console.log(this.status, "11111");
}
// doubt_code,doubt_info,doubt_check。0为不填写,1为填写
if (this.status == 0) {
......@@ -304,7 +287,6 @@
this.status = 1;
}
} else if (this.status == 2) {
// console.log(this.doubt_info, "doubt_info");
// 是否填写个人资料
if (this.doubt_info == 0) {
this.type = "check";
......@@ -325,18 +307,13 @@
} else if (this.status == 4) {
this.type = "check";
this.status = 3;
// console.log(this.status, "this.status ");
// console.log(this.isNexts ,'this.isNexts ')
if (this.isNexts == 1) {
// console.log(11111);
if (res.data.examine_status == 1) {
console.log(333);
this.type = "pay";
this.status = 4;
} else if (res.data.examine_status == 2) {
this.type = "referInfo";
this.status = 2;
// return this.$message.error(res.data.examine_reason);
}
}
} else if (this.status == 5) {
......@@ -345,8 +322,6 @@
this.type = "success";
}
this.$emit("getStatus", this.type);
// this.getExamine = res.data.examine_status;
// console.log(res.data.examine_status, "res.data.examine_status");
this.invitation_code = res.data.invitation_code; //填写的邀请码回显需要
//订单支付金额
let code = this.$store.state.indexIdentity;
......@@ -380,18 +355,13 @@
const bank_Path = res.data.bank_info;
if (bank_Path != null) {
let arr = bank_Path.split(",");
// console.log(arr)
let fileList = [];
fileList = arr.map((item) => {
let obj = {
url: item,
};
return obj;
});
// console.log(fileList)
// console.log(JSON.stringify(fileList))
// let code = this.$store.state.indexIdentity;
window.localStorage.setItem("bank_info" + window.localStorage.getItem("index-phone-all") + code,
JSON.stringify(fileList)
); //上传的图片
......@@ -407,8 +377,6 @@
});
},
},
};
</script>
......
......@@ -307,7 +307,7 @@
window.localStorage.setItem("system_color" + code,
res.data.cam.system_color
);
this.$router.replace("/signUp/examInfo?code=" + code);
this.$router.replace("/signUp/undefined?code=" + code);
});
});
},
......
......@@ -310,10 +310,8 @@
window.localStorage.setItem("system_color" + code,
res.data.cam.system_color
);
// 跳转到报名
this.$router.replace("/signUp/examInfo?code=" + code);
this.$router.replace("/signUp/undefined?code=" + code);
});
});
},
......
......@@ -81,7 +81,7 @@
if (!window.localStorage.getItem("index-token-all")) {
this.$router.push("/login?code=" + code);
} else {
this.$router.push("/signUp/examInfo?code=" + code);
this.$router.push("/signUp/undefined?code=" + code);
}
},
// 锚点跳转方法
......
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