schoolFollow.vue
1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* 关注学校*/
<template>
<div>
<div class="fontBox">请选择关注学校</div>
<div class="card">
<div class="cardItem" v-for="(v,i) in schoolList" :key="i">
<div>{{v.schoolName}}</div>
<div class="cardItem_blue" @click="switchSchool(v)">切换</div>
</div>
</div>
<van-popup style="background: transparent;" get-container="body" v-model="showSchool">
<!-- <school-add></school-add> -->
<group-penson></group-penson>
</van-popup>
</div>
</template>
<script>
import schoolAdd from '@/views/Travel/component/schoolAdd'
import groupPenson from '@/views/Travel/component/groupPenson'
export default {
components: { schoolAdd , groupPenson},
data() {
return {
schoolList: [],
showSchool: false
}
},
mounted() {
this.getList()
},
methods: {
//切换学校
switchSchool(v) {
localStorage.setItem('schoolNamesChoose',JSON.stringify(v))
this.$router.push({name : localStorage.getItem('prePage')})
},
getList() {
this.schoolList = JSON.parse(localStorage.getItem('schoolNames'))
}
}
}
</script>
<style lang="scss" scoped>
.fontBox {
width: 100vw;
height: 8vw;
display: flex;
align-items: center;
padding: 0 4vw;
box-sizing: border-box;
background-color: #F5F6FA;
font-size: 3.5vw;
color: #999999;
}
.card {
padding: 7vw 5vw 0;
box-sizing: border-box;
.cardItem {
display: flex;
justify-content: space-between;
margin-bottom: 10vw;
font-size: 3.8vw;
.cardItem_blue {
color:#3074FF
}
}
}
</style>
<style lang="scss">
// 长辈版
.elder {
.card .cardItem{
font-size: 36px;
}
}
</style>