Commit 1d640ded authored by wuwangwolihui's avatar wuwangwolihui

营地2.0-整合修改

parent fd369a29
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<div class="image"> <div class="image">
<img v-if="type==1" :src="all_logo" alt=""/> <img v-if="type==1" :src="all_logo" alt=""/>
<img v-if="type==2" :src="system_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"/> <img v-if="type==3" :src="system_logo" alt="" @click="toRecruit"/>
<img v-if="type==4" :src="system_logo?system_logo:all_logo" alt="" @click="toRecruit"/>
</div> </div>
<div class="right"> <div class="right">
<el-menu :default-active="$store.state.activeIndex" <el-menu :default-active="$store.state.activeIndex"
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
}, },
data() { data() {
return { return {
type: this.typeFu, // 1-baseHeader 2-indexHeader type: this.typeFu, // 1-baseHeader 2-营地简章的header 3-登录报名流程里的header 4-报名中心的header
isHover: true, isHover: true,
isLogin: false, isLogin: false,
phone: '', phone: '',
...@@ -89,15 +90,6 @@ ...@@ -89,15 +90,6 @@
toCenter() { toCenter() {
this.$router.replace("/myInfo/signUpList"); this.$router.replace("/myInfo/signUpList");
}, },
// 去注册
toRegister() {
if (this.type == 1) {
this.$router.push("/baseRegister");
} else if (this.type == 2 || this.type == 3) {
let code = this.$store.state.indexIdentity;
this.$router.push("/register?code=" + code);
}
},
// 立即报名 // 立即报名
toSignUp() { toSignUp() {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
...@@ -112,7 +104,7 @@ ...@@ -112,7 +104,7 @@
toLogin() { toLogin() {
if (this.type == 1) { if (this.type == 1) {
this.$router.push("/baseLogin"); this.$router.push("/baseLogin");
} else if (this.type == 2 || this.type == 3) { } else if (this.type == 2) {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
this.$router.push("/login?code=" + code); this.$router.push("/login?code=" + code);
} }
...@@ -128,9 +120,13 @@ ...@@ -128,9 +120,13 @@
if (confirmResult !== "confirm") { if (confirmResult !== "confirm") {
return this.$message.info("您取消了退出"); return this.$message.info("您取消了退出");
} }
await logout({});
let previousPath = localStorage.getItem('index-previousPath');
// 清除本地缓存 除了特殊缓存 // 清除本地缓存 除了特殊缓存
this.$store.commit('removeLocalStorage'); this.$store.commit('removeLocalStorage');
if (this.type == 2 || this.type == 3) { this.isLogin = false;
this.$message.success("退出成功");
if (this.type == 3) {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
if (this.$store.state.human == 1) { if (this.$store.state.human == 1) {
await this.$router.replace({ await this.$router.replace({
...@@ -143,9 +139,26 @@ ...@@ -143,9 +139,26 @@
await this.$router.replace("/" + code); await this.$router.replace("/" + code);
} }
} }
this.isLogin = false; if (this.type == 4) {
this.$message.success("退出成功"); if (previousPath &&
// await logout({}); (previousPath == '/home' ||
previousPath == '/active' ||
previousPath.indexOf('/active/') != -1)) {
await this.$router.replace(previousPath);
} else {
let code = this.$store.state.indexIdentity;
if (this.$store.state.human == 1) {
await this.$router.replace({
path: "/login",
query: {
code: code,
},
});
} else {
await this.$router.replace("/" + code);
}
}
}
}, },
// 鼠标移入事件 // 鼠标移入事件
onMouserEnter(val) { onMouserEnter(val) {
......
...@@ -15,6 +15,7 @@ export function getCam(code) { ...@@ -15,6 +15,7 @@ export function getCam(code) {
params: data params: data
}) })
} }
export function getCamInfo(code) { export function getCamInfo(code) {
let data = {}; let data = {};
data['identity'] = code ? code : store.state.indexIdentity; data['identity'] = code ? code : store.state.indexIdentity;
...@@ -27,6 +28,7 @@ export function getCamInfo(code) { ...@@ -27,6 +28,7 @@ export function getCamInfo(code) {
params: data params: data
}) })
} }
// 登录 // 登录
export function login(data) { export function login(data) {
data['identity'] = store.state.indexIdentity; data['identity'] = store.state.indexIdentity;
...@@ -37,6 +39,7 @@ export function login(data) { ...@@ -37,6 +39,7 @@ export function login(data) {
}) })
} }
// 获取登录验证码 // 获取登录验证码
export function loginCode(data) { export function loginCode(data) {
data['identity'] = store.state.indexIdentity; data['identity'] = store.state.indexIdentity;
...@@ -47,10 +50,15 @@ export function loginCode(data) { ...@@ -47,10 +50,15 @@ export function loginCode(data) {
}) })
} }
// 退出 // 退出
export function logout(data) { export function logout(data) {
const token = localStorage.getItem('index-token-all');
data['identity'] = store.state.indexIdentity; data['identity'] = store.state.indexIdentity;
return request({ return request({
headers: {
token: token
},
method: 'post', method: 'post',
url: '/web/auth/loginOut', url: '/web/auth/loginOut',
data data
......
...@@ -108,6 +108,7 @@ export function request(config) { ...@@ -108,6 +108,7 @@ export function request(config) {
const HotList = '/activityCenter/hotList'; const HotList = '/activityCenter/hotList';
const GetActiveInfo = '/activityCenter/detail/'; const GetActiveInfo = '/activityCenter/detail/';
const HomeHot = '/activityCenter/hot'; const HomeHot = '/activityCenter/hot';
const Logout = '/web/auth/loginOut';
if ((config.url.indexOf(loginUrl) != -1 && config.url.indexOf(loginOut) == -1) || if ((config.url.indexOf(loginUrl) != -1 && config.url.indexOf(loginOut) == -1) ||
config.url.indexOf(setAccountInfo) != -1 || config.url.indexOf(setAccountInfo) != -1 ||
config.url.indexOf(passMsgOld) != -1 || config.url.indexOf(passMsgOld) != -1 ||
...@@ -122,7 +123,8 @@ export function request(config) { ...@@ -122,7 +123,8 @@ export function request(config) {
config.url.indexOf(LabelType) != -1 || config.url.indexOf(LabelType) != -1 ||
config.url.indexOf(HotList) != -1 || config.url.indexOf(HotList) != -1 ||
config.url.indexOf(GetActiveInfo) != -1 || config.url.indexOf(GetActiveInfo) != -1 ||
config.url.indexOf(HomeHot) != -1) { config.url.indexOf(HomeHot) != -1 ||
config.url.indexOf(Logout) != -1) {
return config return config
} }
const token = localStorage.getItem('index-token-all'); const token = localStorage.getItem('index-token-all');
......
...@@ -197,6 +197,7 @@ function checkCam(code, cb) { ...@@ -197,6 +197,7 @@ function checkCam(code, cb) {
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(to, from)
if (from.fullPath != '/' && from.fullPath != '/baseLogin' && from.fullPath != '/baseRegister') { if (from.fullPath != '/' && from.fullPath != '/baseLogin' && from.fullPath != '/baseRegister') {
store.commit('setPreviousPath', from.fullPath); store.commit('setPreviousPath', from.fullPath);
} }
......
...@@ -3,6 +3,23 @@ ...@@ -3,6 +3,23 @@
<div class="active-search"> <div class="active-search">
<div class="active-search-title">活动筛选</div> <div class="active-search-title">活动筛选</div>
<div class="active-search-content"> <div class="active-search-content">
<div class="content-item">
<div class="content-item-tit">活动状态</div>
<el-checkbox
class="is-check-all"
v-model="checkAllStatus"
@change="handleCheckAllChange($event,3, statusList)"
>全部
</el-checkbox>
<el-checkbox-group v-model="isStatus"
@change="handleCheckedItemChange($event,3, statusList)">
<el-checkbox v-for="(item, index) in statusList"
:key="index"
:label="item.lableId"
border>{{item.lableName}}
</el-checkbox>
</el-checkbox-group>
</div>
<div class="content-item" v-for="(item, index) in labelList" :key="index"> <div class="content-item" v-for="(item, index) in labelList" :key="index">
<div class="content-item-tit">{{item.categoryName}}</div> <div class="content-item-tit">{{item.categoryName}}</div>
<el-checkbox <el-checkbox
...@@ -118,17 +135,36 @@ ...@@ -118,17 +135,36 @@
loading: false, loading: false,
queryForm: { queryForm: {
ids: {}, ids: {},
activityStatus: null,
isSupport: null, isSupport: null,
minDay: null, minDay: null,
maxDay: null, maxDay: null,
}, },
labelList: [], labelList: [],
activeList: [],// 通过后台数据得到的所有数据 activeList: [],// 通过后台数据得到的所有数据
showActiveList: [],// 前端页面需要渲染的数据 showActiveList: [],// 前端页面需要渲染的数据
pageSize: 6, //渲染数据的多少根据实际情况设置 pageSize: 6, //渲染数据的多少根据实际情况设置
baseSize: 6,// 渲染基础页数 baseSize: 6,// 渲染基础页数
totall: 0, //总数据量 totall: 0, //总数据量
statusList: [
{
lableId: 1,
lableName: '报名未开放'
},
{
lableId: 2,
lableName: '报名中'
},
{
lableId: 3,
lableName: '开营中'
},
{
lableId: 4,
lableName: '已结营'
},
],
supportList: [ supportList: [
{ {
lableId: 2, lableId: 2,
...@@ -141,6 +177,8 @@ ...@@ -141,6 +177,8 @@
], ],
selectIds: {}, selectIds: {},
checkAll: {}, checkAll: {},
isStatus: [],
checkAllStatus: false,
isSupport: [], isSupport: [],
checkAllSupp: false, checkAllSupp: false,
} }
...@@ -215,6 +253,7 @@ ...@@ -215,6 +253,7 @@
} }
this.loading = true; this.loading = true;
let queryForm = JSON.parse(JSON.stringify(this.queryForm)); let queryForm = JSON.parse(JSON.stringify(this.queryForm));
// 全选项 置空传值
let flag = true; let flag = true;
for (let key in queryForm['ids']) { for (let key in queryForm['ids']) {
if (!this.checkAll[key]) { if (!this.checkAll[key]) {
...@@ -224,6 +263,12 @@ ...@@ -224,6 +263,12 @@
if (flag) { if (flag) {
queryForm['ids'] = {}; queryForm['ids'] = {};
} }
if (this.checkAllStatus) {
queryForm['activityStatus'] = null;
}
if (this.checkAllSupp) {
queryForm['isSupport'] = null;
}
HotList(queryForm).then(res => { HotList(queryForm).then(res => {
console.log(res) console.log(res)
if (res.data.code != 200) { if (res.data.code != 200) {
...@@ -267,6 +312,7 @@ ...@@ -267,6 +312,7 @@
resetHandle() { resetHandle() {
this.queryForm = { this.queryForm = {
ids: {}, ids: {},
activityStatus: null,
isSupport: null, isSupport: null,
minDay: null, minDay: null,
maxDay: null, maxDay: null,
...@@ -279,7 +325,8 @@ ...@@ -279,7 +325,8 @@
} }
this.isSupport = []; this.isSupport = [];
this.checkAllSupp = false; this.checkAllSupp = false;
console.log(this.checkAll) this.isStatus = [];
this.checkAllStatus = false;
this.getList(); this.getList();
}, },
// 全部-标签操作 // 全部-标签操作
...@@ -293,9 +340,12 @@ ...@@ -293,9 +340,12 @@
} else { } else {
delete this.queryForm.ids[idx] delete this.queryForm.ids[idx]
} }
} else { } else if (type == 2) {
this.isSupport = arr; this.isSupport = arr;
this.queryForm.isSupport = arr.join(','); this.queryForm.isSupport = arr.join(',');
} else if (type == 3) {
this.isStatus = arr;
this.queryForm.activityStatus = arr.join(',');
} }
}, },
// 单个-标签操作 // 单个-标签操作
...@@ -309,9 +359,12 @@ ...@@ -309,9 +359,12 @@
} else { } else {
delete this.queryForm.ids[idx] delete this.queryForm.ids[idx]
} }
} else { } else if (type == 2) {
this.checkAllSupp = checkedCount === lableIdArr.length; this.checkAllSupp = checkedCount === lableIdArr.length;
this.queryForm.isSupport = val.join(','); this.queryForm.isSupport = val.join(',');
} else if (type == 3) {
this.checkAllStatus = checkedCount === lableIdArr.length;
this.queryForm.activityStatus = val.join(',');
} }
}, },
} }
......
<template> <template>
<el-container> <el-container>
<el-header height="104px"> <el-header height="104px">
<Header :typeFu="3"></Header> <Header :typeFu="4"></Header>
<div class="bg-top"></div> <div class="bg-top"></div>
</el-header> </el-header>
<el-container> <el-container>
......
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