schoolAttestation.vue
2.26 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
82
83
84
85
86
/* 认证学校*/
<template>
<div>
<div class="fontBox"></div>
<div class="card">
<div class="cardItem" v-for="(v,i) in schoolList" :key="i">
<div @click="switchClass(v)">{{v.schoolName}}</div>
<div class="cardItem_blue" @click="switchSchool">重新认证</div>
</div>
</div>
<!-- <van-popup style="background: transparent;" get-container="body" v-model="showSchool">
<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: [
// {isAuth: false, schoolName: "测试学校"},
],
showSchool: false
}
},
methods: {
//获取学校
getSchool() {
let userNum = JSON.parse(localStorage.getItem('userInfo')).centerNo
this.yxAxios.get(`${this.baseUrl}/prod/user/info/getSchool?userNum=${userNum}`).then((res) => {
if(res.data.code == 200) {
this.schoolList = res.data.data
}else {
this.$toast.fail(res.data?.message)
}
})
},
//切换学校
switchSchool() {
localStorage.setItem('backRZ',true)
this.$router.push({name: localStorage.getItem('prePage') })
},
//选择班级
switchClass(v) {
this.$router.push({name: 'classAttestation',query: {schoolNamequery: v.schoolName}})
}
},
mounted() {
this.getSchool()
}
}
</script>
<style lang="scss" scoped>
.fontBox {
width: 100vw;
height: 3vw;
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>