Commit 77fd3690 authored by wuwangwolihui's avatar wuwangwolihui

营地2.0-活动中心-筛选

parent 5f52c5f3
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// 正式 // 正式
export const SERVER_URL = "https://apiy.thuers.com/"; // 正式环境 export const SERVER_URL = "https://apiy.thuers.com/"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "http://192.168.1.193:8088/"; //开发环境 export const DEVELOPMENT_SERVER_URL = "http://192.168.1.193:8088"; //开发环境
export const SERVER_WS_URL = "wss://apiy.thuers.com"; // websocket export const SERVER_WS_URL = "wss://apiy.thuers.com"; // websocket
// 测试 // 测试
......
/* eslint-disable */ /* eslint-disable */
import {request} from './network'; import {request} from './network';
// 登录 // 获取label列表-搜索模块
export function LabelType(data) {
return request({
method: 'get',
url: '/modules-campsite/activity/labelType',
params: data
})
}
// 获取营地列表-搜索模块
export function HotList(data) { export function HotList(data) {
return request({ return request({
method: 'post', method: 'post',
...@@ -9,3 +18,4 @@ export function HotList(data) { ...@@ -9,3 +18,4 @@ export function HotList(data) {
data: data data: data
}) })
} }
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
placeholder="最大天数" placeholder="最大天数"
oninput="value=value.replace(/^0/g, '')" oninput="value=value.replace(/^0/g, '')"
></el-input> ></el-input>
<el-button @click="resetHandle">重置</el-button>
<el-button @click="searchHandle">确定</el-button>
</div> </div>
<div class="content-item"> <div class="content-item">
<div class="content-item-tit">本站报名</div> <div class="content-item-tit">本站报名</div>
...@@ -55,11 +53,13 @@ ...@@ -55,11 +53,13 @@
border>{{item.lableName}} border>{{item.lableName}}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<el-button @click="resetHandle">重置</el-button>
<el-button @click="searchHandle">确定</el-button>
</div> </div>
</div> </div>
</div> </div>
<div class="active-list"> <div class="active-list" v-if="activeList.length>0">
<div class="active-list-item" v-for="(item, index) in activeList" :key="index" <div class="active-list-item" v-for="(item, index) in activeList" :key="index"
:style="{ :style="{
'-webkit-animation-delay': (index+1)*0.1+'s', '-webkit-animation-delay': (index+1)*0.1+'s',
...@@ -67,15 +67,19 @@ ...@@ -67,15 +67,19 @@
}"> }">
<div class="inner"> <div class="inner">
<div class="active-list-item-bg"> <div class="active-list-item-bg">
<el-image :src="item.cover" fit="cover"></el-image> <el-image :src="item.activityCover" fit="cover"></el-image>
</div> </div>
<div class="active-list-item-cont"> <div class="active-list-item-cont">
<div class="active-list-item-cont-header"> <div class="active-list-item-cont-header">
<div class="label">{{item.label}}</div> <div class="label" v-if="item.activityLabel">
<span v-for="(item2, index2) in item.activityLabel.split(',')"
:key="index2">{{item2}}</span>
</div>
<div class="title">{{item.name}}</div> <div class="title">{{item.name}}</div>
</div> </div>
<div class="active-list-item-cont-txt1">{{item.school}}</div> <div class="active-list-item-cont-txt1">{{item.schoolName}} | {{item.subjectName}}</div>
<div class="active-list-item-cont-txt2">{{item.beginTime}} (共{{item.days}}天)</div> <div class="active-list-item-cont-txt2">{{item.activityStartTime}} (共{{item.activityTime}}天)</div>
<div class="active-list-item-cont-txt3">报名截止时间:{{item.bmEndTime}}</div> <div class="active-list-item-cont-txt3">报名截止时间:{{item.bmEndTime}}</div>
<div class="active-list-item-cont-bottom" @click="$router.push('/active/current/'+item.id)"> <div class="active-list-item-cont-bottom" @click="$router.push('/active/current/'+item.id)">
<div>查看详情</div> <div>查看详情</div>
...@@ -85,12 +89,15 @@ ...@@ -85,12 +89,15 @@
</div> </div>
</div> </div>
</div> </div>
<div class="active-list" v-else>
<el-empty description="暂无数据" style="margin: 0 auto;"></el-empty>
</div>
</div> </div>
</template> </template>
<script> <script>
import img from "../../../assets/img/recruit.png"; import img from "../../../assets/img/recruit.png";
import {HotList} from "r/base/active"; import {LabelType, HotList} from "r/base/active";
export default { export default {
name: "Active", name: "Active",
...@@ -103,129 +110,8 @@ ...@@ -103,129 +110,8 @@
minDay: null, minDay: null,
maxDay: null, maxDay: null,
}, },
labelList: [ labelList: [],
{ activeList: [],
categoryId: 1,
categoryName: "活动状态",
labelLists: [
{
lableId: 5,
lableName: "222"
},
{
lableId: 6,
lableName: "33333"
},
{
lableId: 12,
lableName: "new"
},
]
},
{
categoryId: 2,
categoryName: "学科分类",
labelLists: [
{lableId: 8, lableName: "数学"},
{lableId: 9, lableName: "物理"},
{lableId: 10, lableName: "英语"},
{lableId: 11, lableName: "历史"},
{lableId: 13, lableName: "语文"},
]
},
{
categoryId: 3,
categoryName: "学校",
labelLists: [
{lableId: 2, lableName: "南开大学444"},
{lableId: 3, lableName: "北京航空航天大学"},
]
},
{
categoryId: 4,
categoryName: "面向人群",
labelLists: [
{lableId: 7, lableName: "555"},
]
},
{
categoryId: 5,
categoryName: "活动形式",
labelLists: [
{lableId: 14, lableName: "线上"},
{lableId: 15, lableName: "线下"},
{lableId: 16, lableName: " 线上结合线下"},
],
}
],
activeList: [
{
id: 1,
cover: img,
label: '线上',
name: '2023年寒假历史营地',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
},
{
id: 2,
cover: img,
label: '线上',
name: '2023年寒假历史营地2',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
},
{
id: 3,
cover: img,
label: '线上',
name: '2023年寒假历史营地3',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
},
{
id: 1,
cover: img,
label: '线上',
name: '2023年寒假历史营地',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
},
{
id: 2,
cover: img,
label: '线上',
name: '2023年寒假历史营地2',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
},
{
id: 3,
cover: img,
label: '线上',
name: '2023年寒假历史营地3',
school: '南开大学 | 历史学',
beginTime: '2023-09-01',
endTime: '20230903',
days: '3',
bmEndTime: '2023-08-31',
}
],
supportList: [ supportList: [
{ {
lableId: 2, lableId: 2,
...@@ -255,7 +141,7 @@ ...@@ -255,7 +141,7 @@
} }
}, },
created() { created() {
this.getHotList(); this.getLabelType();
this.getList(); this.getList();
}, },
methods: { methods: {
...@@ -320,14 +206,29 @@ ...@@ -320,14 +206,29 @@
return false; return false;
} }
this.loading = true; this.loading = true;
console.log('getList'); HotList(this.queryForm).then(res => {
console.log(res)
if (res.data.code != 200) {
this.loading = false;
return this.$message.error(res.data.msg);
}
this.loading = false;
this.activeList = res.data.data;
}).catch(err => {
console.log(err)
this.loading = false;
})
setTimeout(() => { setTimeout(() => {
this.loading = false; this.loading = false;
}, 2000) }, 2000)
}, },
// 获取筛选标签列表 // 获取筛选标签列表
getHotList() { getLabelType() {
HotList().then(res => { LabelType({}).then(res => {
if (res.data.code != 200) {
return this.$message.error(res.data.msg);
}
this.labelList = res.data.data;
console.log(res) console.log(res)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
...@@ -561,11 +462,14 @@ ...@@ -561,11 +462,14 @@
.label { .label {
font-size: 12px; font-size: 12px;
padding: 0 10px;
border-radius: 8px; > span {
color: #ffffff; padding: 0 10px;
background-color: var(--all_color); border-radius: 8px;
margin-right: 5px; color: #ffffff;
background-color: var(--all_color);
margin-right: 5px;
}
} }
.title { .title {
......
...@@ -18,6 +18,19 @@ module.exports = { ...@@ -18,6 +18,19 @@ module.exports = {
.set('common', resolve('src/common')) .set('common', resolve('src/common'))
.set('store', resolve('src/store')) .set('store', resolve('src/store'))
}, },
// devServer: {
// proxy: {
// '/api': {
// target: 'http://192.168.1.145:8088', // 设置代理目标地址
// changeOrigin: true,
// pathRewrite: {
// '^/api': 'modules-campsite' // 如果接口路径有前缀,可以在此处进行替换
// }
// }
// }
// },
// devServer: { // devServer: {
// host: 'localhost', // host: 'localhost',
// port: 8080, // 端口号 // port: 8080, // 端口号
......
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