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

个人信息

parent 279944cb
<template> <template>
<div> <div>
<div :key="index" class="campList" v-for="(item,index) in List"> <template v-if="activeList.length>0">
<div :key="index" class="campList" v-for="(item,index) in activeList">
<el-card class="box-card"> <el-card class="box-card">
<div class="flex list_item"> <div class="flex list_item" @click="toSignUp(item.identity)">
<div class="item_img"> <div class="item_img">
<img :src="item.url"/> <img :src="item.activityCover"/>
</div> </div>
<div class="right"> <div class="right">
<div> <div>
<div class="item_title">{{item.name}}</div> <div class="item_title">{{item.schoolName}}</div>
<div class="item_tag">{{item.tag}}</div> <div class="item_tag">{{item.activityLabel}}</div>
<div class="item_time">活动时间:{{item.time}}</div> <div class="item_time">活动时间:{{formatYMD(item.activityStartTime)}}{{formatYMD(item.activityEndTime)}}
</div>
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
</div> </div>
</template>
<div class="noCamp" v-else> 暂无营地</div>
</div> </div>
</template> </template>
<script> <script>
import img from "../../../assets/img/recruit.png"; import {activity} from "r/base/myInfo";
export default { export default {
name: "campList", name: "campList",
props: {
typeFu: [String, Number]
},
data() { data() {
return { return {
List: [{ activeList: [],
url: img, type: this.typeFu,
name: 'XX大学暑期营', }
tag: '线下活动', },
time: '2023-07-23至2023-07-27',
}, { created() {
url: img, this.getCampList();
name: 'XX大学暑期营', },
tag: '线下活动', methods: {
time: '2023-07-23至2023-07-27', getCampList() {
}] activity({
phone: window.localStorage.getItem('index-phone-all'),
type: this.type
}).then((res) => {
if (res.data.code != 200) {
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)
}
},
watch: {
typeFu() {
this.type = this.typeFu;
}
}
} }
</script> </script>
...@@ -85,4 +110,9 @@ ...@@ -85,4 +110,9 @@
} }
} }
} }
.noCamp {
text-align: center;
margin-top: 100px;
}
</style> </style>
import {request} from './network' import {request} from '../network'
//我的营地列表 //我的营地列表
export function activity(data) { export function activity(data) {
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
import Footer from "@/components/Footer.vue"; import Footer from "@/components/Footer.vue";
import svg1 from '@/assets/img/signUp/icon.svg'; import svg1 from '@/assets/img/signUp/icon.svg';
import signUpList from '../myInfo/signUp.vue'; import signUpList from '../myInfo/signUp.vue';
import {activity} from "r/base/myInfo";
export default { export default {
name: "myInfoIndex", name: "myInfoIndex",
...@@ -72,8 +71,6 @@ ...@@ -72,8 +71,6 @@
watch: {}, watch: {},
created() { created() {
// this.ToSignUp(this.campindex_type) // this.ToSignUp(this.campindex_type)
this.getCampList();
}, },
mounted() { mounted() {
window.addEventListener("scroll", this.handleScrollX, true); window.addEventListener("scroll", this.handleScrollX, true);
...@@ -84,18 +81,7 @@ ...@@ -84,18 +81,7 @@
window.removeEventListener("resize", this.onResize, true); window.removeEventListener("resize", this.onResize, true);
}, },
methods: { methods: {
getCampList() {
activity({
phone:window.localStorage.getItem('index-phone-all'),
type:1
}).then((res) => {
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$message.success(res.data.message);
this.activeList = res.data.data;
})
},
ToSignUp(index) { ToSignUp(index) {
console.log(index, 'index') console.log(index, 'index')
this.campindex_type = index; this.campindex_type = index;
......
...@@ -2,19 +2,30 @@ ...@@ -2,19 +2,30 @@
<div class="signUp"> <div class="signUp">
<el-tabs @tab-click="handleClick" v-model="campStatus"> <el-tabs @tab-click="handleClick" v-model="campStatus">
<el-tab-pane label="正在报名" name="1"> <el-tab-pane label="正在报名" name="1">
<campList></campList> <template v-if="campStatus==1">
<campList :typeFu="campStatus"></campList>
</template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="即将开营" name="2"> <el-tab-pane label="即将开营" name="2">
<campList></campList> <template v-if="campStatus==2">
<campList :typeFu="campStatus"></campList>
</template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="开营中" name="3"> <el-tab-pane label="开营中" name="3">
<campList></campList> <template v-if="campStatus==3">
<campList :typeFu="campStatus"></campList>
</template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已结营" name="4"> <el-tab-pane label="已结营" name="4">
<campList></campList> <template v-if="campStatus==4">
<campList :typeFu="campStatus"></campList>
</template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已退营" name="5"> <el-tab-pane label="已退营" name="5">
<campList></campList> <template v-if="campStatus==5">
<campList :typeFu="campStatus"></campList>
</template>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -22,6 +33,7 @@ ...@@ -22,6 +33,7 @@
<script> <script>
import campList from "@/components/base/myInfo/campList.vue"; import campList from "@/components/base/myInfo/campList.vue";
import {activity} from "r/base/myInfo";
export default { export default {
name: "signUpList", name: "signUpList",
...@@ -30,15 +42,16 @@ ...@@ -30,15 +42,16 @@
}, },
data() { data() {
return { return {
campStatus: '1' campStatus: '1',
} }
}, },
created() {
},
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); this.campStatus=tab.name;
console.log(tab.index); },
console.log(tab.name);
}
} }
} }
......
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