Commit e0bde720 authored by 杨梦雪's avatar 杨梦雪

修改

parent 77fd3690
......@@ -2,37 +2,38 @@
<div class="Header">
<div class="H_content com-container">
<div class="image">
<img src="../../assets/img/logo_base.png" alt=""/>
<img alt="" src="../../assets/img/logo_base.png"/>
</div>
<div class="right">
<el-menu :default-active="$store.state.activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-menu :default-active="$store.state.activeIndex" @select="handleSelect" class="el-menu-demo"
mode="horizontal">
<el-menu-item index="/home">首页</el-menu-item>
<el-menu-item index="/active">活动中心</el-menu-item>
</el-menu>
<div class="noLogin" v-if="!isLogin">
<span
@mouseenter="onMouserEnter(false)"
:class="isHover ? '' : 'is-hover'"
@click="toLogin"
@mouseenter="onMouserEnter(false)"
>登录 | 注册</span>
<!-- <span-->
<!-- @mouseenter="onMouserEnter(true)"-->
<!-- :class="isHover ? 'is-hover' : ''"-->
<!-- @click="toRegister"-->
<!-- > 注册</span>-->
<!-- <span-->
<!-- @mouseenter="onMouserEnter(true)"-->
<!-- :class="isHover ? 'is-hover' : ''"-->
<!-- @click="toRegister"-->
<!-- > 注册</span>-->
</div>
<div class="alreadyLogin" v-else>
<el-dropdown @command="handleCommand" trigger="click">
<div class="el-dropdown-link">
<img src="@/assets/img/default.svg" class="img_user"/>
<img class="img_user" src="@/assets/img/default.svg"/>
<span class="phone">{{ phone }}</span>
<i class="el-icon-arrow-down el-icon--right"></i>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="1" @click="toCenter">
<el-dropdown-item @click="toCenter" command="1">
<i class="el-icon-user"></i>个人中心
</el-dropdown-item>
<el-dropdown-item command="2" @click="logout">
<el-dropdown-item @click="logout" command="2">
<i class="el-icon-switch-button"></i>退出
</el-dropdown-item>
</el-dropdown-menu>
......@@ -78,7 +79,7 @@
},
// 去注册
toRegister() {
this.$router.push("/baseRegister" );
this.$router.push("/baseRegister");
},
// 去登录页
toLogin() {
......
<template>
<div>
<div :key="index" class="campList" v-for="(item,index) in List">
<el-card class="box-card">
<div class="flex list_item">
<div class="item_img">
<img :src="item.url"/>
</div>
<div class="right">
<div>
<div class="item_title">{{item.name}}</div>
<div class="item_tag">{{item.tag}}</div>
<div class="item_time">活动时间:{{item.time}}</div>
</div>
</div>
</div>
</el-card>
</div>
</div>
</template>
<script>
import img from "../../../assets/img/recruit.png";
export default {
name: "campList",
data() {
return {
List: [{
url: img,
name: 'XX大学暑期营',
tag: '线下活动',
time: '2023-07-23至2023-07-27',
}, {
url: img,
name: 'XX大学暑期营',
tag: '线下活动',
time: '2023-07-23至2023-07-27',
}]
}
},
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
}
.campList {
margin: 10px 0;
.list_item {
.item_img {
width: 30%;
margin-right: 10%;
img {
width: 100%;
}
}
.right {
display: flex;
align-items: center;
.item_title {
font-size: 15px;
}
.item_tag {
font-size: 10px;
background-color: #F2F2F2;
width: fit-content;
padding: 3px;
border-radius: 7px;
margin: 20px 0;
}
.item_time {
font-size: 13px;
color: gray;
}
}
}
}
</style>
......@@ -213,6 +213,7 @@ router.beforeEach((to, from, next) => {
toInfo = "/myInfo";
let code = false;
document.title = to.meta.title;
console.log(to.path )
if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
// code = to.params.code ? to.params.code : to.query.code;
// checkCam(code, (res) => {
......@@ -227,7 +228,7 @@ router.beforeEach((to, from, next) => {
// }
// });
return next();
} else if (to.path == toBaseLogin ||to.path == toBaseRegister ||to.path == toBaseReset || to.path == toInfo || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
} else if (to.path == toBaseLogin ||to.path == toBaseRegister ||to.path == toBaseReset || to.path == '/myInfo' || to.path == toHome || to.path == toActive || to.path.indexOf(toActive) != -1) {
return next();
} else if (to.name == "recruit") {
code = to.params.code;
......
......@@ -290,9 +290,10 @@
}
// this.$message.success("登录成功");请访问正确的营地链接地址
window.localStorage.setItem("index-token-all", res.data.token);
window.localStorage.setItem("phone", this.loginForm.phone);
window.localStorage.setItem("index-phone-all", this.loginForm.phone);
window.localStorage.setItem("email", res.data.email);
this.$router.replace("/myInfo");
// this.$router.replace("/myInfo");]
this.$router.go(-1);
});
});
},
......
......@@ -290,16 +290,8 @@
}
// this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token", res.data.token);
window.localStorage.setItem("phone", this.registerForm.phone);
// window.localStorage.setItem("email" + code, this.registerForm.email);
// 报名信息
window.localStorage.setItem("camp_name", res.data.cam.name);
//获取主题色
window.localStorage.setItem(
"system_color",
res.data.cam.system_color
);
window.localStorage.setItem("index-token-all", res.data.token);
window.localStorage.setItem("index-phone-all", this.registerForm.phone);
// 跳转到报名
this.$router.replace("/signUpList");
});
......
......@@ -288,7 +288,6 @@
}
this.$message.success(res.data.message);
// token存储
// window.localStorage.setItem("index-token" + code, res.token);
window.localStorage.setItem(
"restet_code_phone" ,
this.resetForm.phone
......
......@@ -72,7 +72,7 @@
},
watch: {},
created() {
this.ToSignUp(this.campindex_type)
// this.ToSignUp(this.campindex_type)
},
mounted() {
window.addEventListener("scroll", this.handleScrollX, true);
......
<template>
<div class="signUp">
<el-tabs @tab-click="handleClick" v-model="activeName">
<el-tabs @tab-click="handleClick" v-model="campStatus">
<el-tab-pane label="正在报名" name="1">
111
<campList></campList>
</el-tab-pane>
<el-tab-pane label="即将开营" name="2">
<div :key="index" class="campList" v-for="(item,index) in List">
<el-card class="box-card">
<div class="flex list_item">
<div class="item_img">
<img :src="item.url"/>
</div>
<div>
<div class="item_title">{{item.name}}</div>
<div class="item_tag">{{item.tag}}</div>
<div class="item_time">活动时间:{{item.time}}</div>
</div>
</div>
</el-card>
</div>
<campList></campList>
</el-tab-pane>
<el-tab-pane label="开营中" name="3">
<campList></campList>
</el-tab-pane>
<el-tab-pane label="已结营" name="4">
<campList></campList>
</el-tab-pane>
<el-tab-pane label="已退营" name="5">
<campList></campList>
</el-tab-pane>
<el-tab-pane label="开营中" name="3">开营中</el-tab-pane>
<el-tab-pane label="已结营" name="4">已结营</el-tab-pane>
<el-tab-pane label="已退营" name="5">已退营</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import img from "../../../assets/img/recruit.png";
import campList from "@/components/base/myInfo/campList.vue";
export default {
name: "signUpList",
components: {
campList
},
data() {
return {
activeName: '2',
List: [{
url: img,
name: 'XX大学暑期营',
tag: '线下活动',
time: '2023-07-23至2023-07-27',
}, {
url: img,
name: 'XX大学暑期营',
tag: '线下活动',
time: '2023-07-23至2023-07-27',
}]
campStatus: '1'
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
console.log(tab.index);
console.log(tab.name);
}
}
......@@ -66,23 +52,6 @@
.signUp {
margin: 10px 80px 10px 31px;
.campList {
margin: 10px 0;
.list_item {
.item_img {
width: 30%;
margin-right: 10%;
img {
width: 100%;
}
}
.item_title {
}
}
}
}
</style>
......@@ -215,7 +215,6 @@
}
this.statuss();
this.signUpInit();
},
watch: {
......
......@@ -308,7 +308,6 @@ export default {
"system_color" + code,
res.data.cam.system_color
);
this.$router.replace("/signUp/examInfo?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