Commit 9e82c2672cf1623f654f0f47f3eb6c548308261d
1 parent
36ed0d31
Exists in
master
feat: 个人中心更新
Showing
17 changed files
with
1559 additions
and
200 deletions
Show diff stats
src/App.vue
1 | 1 | <template> |
2 | 2 | <div id="app" :class="isElder?'elder':''"> |
3 | - <keep-alive> | |
4 | - <router-view v-if="this.$route.meta.keepAlive" @setElder="setElder" /> | |
5 | - </keep-alive> | |
6 | 3 | |
7 | - <router-view v-if="!this.$route.meta.keepAlive" @setElder="setElder" /> | |
4 | + <router-view @setElder="setElder" /> | |
8 | 5 | </div> |
9 | 6 | </template> |
10 | 7 | <script> | ... | ... |
2.46 KB
46.3 KB
src/router/index.js
... | ... | @@ -28,6 +28,10 @@ import payneed from '@/views/Service/payneed.vue' //购买须知 |
28 | 28 | import protocol from '@/views/Service/protocol.vue' //用户协议 |
29 | 29 | |
30 | 30 | |
31 | +import schoolFollow from '@/views/Travel/schoolFollow.vue' //已关注学校列表 | |
32 | +import schoolAttestation from '@/views/Travel/schoolAttestation.vue' //已认证学校列表 | |
33 | +import classAttestation from '@/views/Travel/classAttestation.vue' //已集团权限年级班级列表 | |
34 | + | |
31 | 35 | Vue.use(VueRouter) |
32 | 36 | const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace]; |
33 | 37 | VueRouter.prototype.push = function push(to) { |
... | ... | @@ -212,6 +216,31 @@ const routes = [{ |
212 | 216 | title: '用户协议' |
213 | 217 | } |
214 | 218 | }, |
219 | + { | |
220 | + path: '/schoolFollow', | |
221 | + name: 'schoolFollow', | |
222 | + component: schoolFollow, | |
223 | + meta: { | |
224 | + title: '关注学校' | |
225 | + } | |
226 | + }, | |
227 | + { | |
228 | + path: '/schoolAttestation', | |
229 | + name: 'schoolAttestation', | |
230 | + component: schoolAttestation, | |
231 | + meta: { | |
232 | + title: '已认证学校' | |
233 | + } | |
234 | + }, | |
235 | + { | |
236 | + path: '/classAttestation', | |
237 | + name: 'classAttestation', | |
238 | + component: classAttestation, | |
239 | + meta: { | |
240 | + title: '集团认领' | |
241 | + } | |
242 | + }, | |
243 | + | |
215 | 244 | ] |
216 | 245 | const router = new VueRouter({ |
217 | 246 | mode: 'hash', | ... | ... |
src/store/index.js
... | ... | @@ -4,12 +4,15 @@ import Vuex from 'vuex' |
4 | 4 | Vue.use(Vuex) |
5 | 5 | |
6 | 6 | export default new Vuex.Store({ |
7 | - state: { | |
8 | - }, | |
9 | - mutations: { | |
10 | - }, | |
11 | - actions: { | |
12 | - }, | |
13 | - modules: { | |
14 | - } | |
15 | -}) | |
7 | + state: { | |
8 | + schoolName: [] | |
9 | + | |
10 | + }, | |
11 | + mutations: { | |
12 | + changeSchool(state, params) { | |
13 | + state.schoolName = params | |
14 | + } | |
15 | + }, | |
16 | + actions: {}, | |
17 | + modules: {} | |
18 | +}) | |
16 | 19 | \ No newline at end of file | ... | ... |
src/views/Home/Home.vue
... | ... | @@ -5,7 +5,10 @@ |
5 | 5 | <div> |
6 | 6 | <img class="head" :src="headImgUrl?headImgUrl:defaultHead" alt=""> |
7 | 7 | <div class="right"> |
8 | - <p class="name">{{userInfo.nickName}}</p> | |
8 | + <!-- <p class="name">{{nicknameUser}}</p> --> | |
9 | + <div class="name"><span>{{nicknameUser}}</span> | |
10 | + <div class="school" v-show="schoolNamesChoose" @click="changeSchool">{{schoolNamesChoose}}<img src="@/assets/Travel/change.png" /></div> | |
11 | + </div> | |
9 | 12 | <p class="phone">{{userInfo.phone}}</p> |
10 | 13 | </div> |
11 | 14 | </div> |
... | ... | @@ -19,6 +22,11 @@ |
19 | 22 | <van-icon class="icon" name="orders-o" /> |
20 | 23 | <span>集团权限</span> |
21 | 24 | </div> |
25 | + <!-- <div class="pic"> | |
26 | + <img src="@/assets/home/bg2.png"/> | |
27 | + <span>已认证</span> | |
28 | + <van-icon name="arrow" /> | |
29 | + </div> --> | |
22 | 30 | <van-icon name="arrow" /> |
23 | 31 | </div> |
24 | 32 | <div class="item" @click="handleMyCard"> |
... | ... | @@ -55,7 +63,6 @@ import HomeChildList from '@/views/Home/component/HomeChildList' |
55 | 63 | import HomeOrder from '@/views/Home/component/HomeOrder' |
56 | 64 | import HomeScan from '@/views/Home/component/HomeScan' |
57 | 65 | import Tabbar4 from '@/component/Tabbar4' |
58 | -import { Dialog } from 'vant' | |
59 | 66 | export default { |
60 | 67 | data () { |
61 | 68 | return { |
... | ... | @@ -75,8 +82,10 @@ export default { |
75 | 82 | headImgUrl: '', |
76 | 83 | defaultHead: require('@/assets/head.png'), |
77 | 84 | isShow: false, |
85 | + isElder: false, | |
78 | 86 | showChildList: false, |
79 | - isElder: false | |
87 | + showSchool: false, | |
88 | + schoolNamesChoose: '' | |
80 | 89 | } |
81 | 90 | }, |
82 | 91 | |
... | ... | @@ -85,10 +94,17 @@ export default { |
85 | 94 | if (isElder) { |
86 | 95 | this.isElder = true |
87 | 96 | } |
97 | + this.schoolNamesChoose = localStorage.getItem('schoolNamesChoose') ? localStorage.getItem('schoolNamesChoose') : '' | |
88 | 98 | this.centerNo = localStorage.getItem('centerNo'); |
89 | 99 | this.getUserInfo() |
100 | + this.againRZ() | |
90 | 101 | |
91 | 102 | }, |
103 | + computed: { | |
104 | + schoolNames () { | |
105 | + return this.$store.state.schoolName | |
106 | + } | |
107 | + }, | |
92 | 108 | methods: { |
93 | 109 | // 研学码 |
94 | 110 | handleYanxue () { |
... | ... | @@ -114,7 +130,7 @@ export default { |
114 | 130 | // 点击长辈版 |
115 | 131 | handelElder () { |
116 | 132 | if (this.isElder) { |
117 | - Dialog.confirm({ | |
133 | + this.$dialog.confirm({ | |
118 | 134 | title: '长辈版', |
119 | 135 | message: '超大字号,看的更清楚,长辈版,专为长辈设计', |
120 | 136 | confirmButtonColor: '#ee0a24', |
... | ... | @@ -130,7 +146,7 @@ export default { |
130 | 146 | // on cancel |
131 | 147 | }); |
132 | 148 | } else { |
133 | - Dialog.confirm({ | |
149 | + this.$dialog.confirm({ | |
134 | 150 | title: '长辈版', |
135 | 151 | message: '超大字号,看的更清楚,长辈版,专为长辈设计', |
136 | 152 | confirmButtonColor: '#3385FF', |
... | ... | @@ -164,9 +180,20 @@ export default { |
164 | 180 | onSuccess: res => { |
165 | 181 | console.log('getUserInfo', res) |
166 | 182 | if (res.data.code == 200) { |
167 | - let userInfo = res.data.data.userInfo | |
168 | - this.userInfo = userInfo | |
183 | + let userInfo = res.data.data.userInfo; | |
184 | + this.userInfo = userInfo; | |
169 | 185 | localStorage.setItem('userInfo', JSON.stringify(userInfo)) |
186 | + if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') { | |
187 | + localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames)) | |
188 | + this.$store.commit('changeSchool', userInfo.schoolNames) | |
189 | + if (!localStorage.getItem('schoolNamesChoose')) { | |
190 | + localStorage.setItem('schoolNamesChoose', userInfo.schoolNames[0]) | |
191 | + this.schoolNamesChoose = userInfo.schoolNames[0] | |
192 | + } | |
193 | + } else { | |
194 | + localStorage.setItem('schoolNames', []) | |
195 | + this.$store.commit('changeSchool', []) | |
196 | + } | |
170 | 197 | } |
171 | 198 | this.showChildList = true |
172 | 199 | |
... | ... | @@ -185,6 +212,27 @@ export default { |
185 | 212 | }, |
186 | 213 | complete () { |
187 | 214 | this.getUserInfo() |
215 | + }, | |
216 | + //切换学校 | |
217 | + changeSchool () { | |
218 | + this.$router.push({ name: 'schoolFollow' }) | |
219 | + }, | |
220 | + //集团回调关闭页面 | |
221 | + closeJT () { | |
222 | + this.showSchool = false | |
223 | + }, | |
224 | + //查看是否有集团认证 | |
225 | + getRZ () { | |
226 | + // this.showSchool = true | |
227 | + this.$router.push({ name: 'schoolAttestation' }) | |
228 | + }, | |
229 | + //回跳重新认证 | |
230 | + againRZ () { | |
231 | + let backRZ = localStorage.getItem('backRZ') | |
232 | + if (backRZ == 'true') { | |
233 | + this.showSchool = true | |
234 | + localStorage.setItem('backRZ', false) | |
235 | + } | |
188 | 236 | } |
189 | 237 | }, |
190 | 238 | components: { |
... | ... | @@ -209,7 +257,6 @@ export default { |
209 | 257 | background-position: center; |
210 | 258 | .top { |
211 | 259 | display: flex; |
212 | - flex-wrap: wrap; | |
213 | 260 | align-items: center; |
214 | 261 | justify-content: space-between; |
215 | 262 | padding: 40px 28px; |
... | ... | @@ -225,14 +272,31 @@ export default { |
225 | 272 | .right { |
226 | 273 | height: 96px; |
227 | 274 | margin-left: 24px; |
228 | - display: flex; | |
229 | - align-content: space-around; | |
230 | - flex-wrap: wrap; | |
231 | 275 | color: #fff; |
232 | 276 | .name { |
233 | - font-size: 34px; | |
277 | + font-size: 33px; | |
234 | 278 | font-weight: bold; |
235 | 279 | width: 100%; |
280 | + margin-bottom: 15px; | |
281 | + display: flex; | |
282 | + .school { | |
283 | + max-width: 400px; | |
284 | + border-radius: 30px; | |
285 | + font-size: 26px; | |
286 | + font-weight: normal; | |
287 | + margin-left: 20px; | |
288 | + padding: 0 20px; | |
289 | + box-sizing: border-box; | |
290 | + background-color: #d82b2b; | |
291 | + display: flex; | |
292 | + align-items: center; | |
293 | + | |
294 | + img { | |
295 | + width: 30px; | |
296 | + height: 30px; | |
297 | + margin-left: 5px; | |
298 | + } | |
299 | + } | |
236 | 300 | } |
237 | 301 | .phone { |
238 | 302 | font-size: 26px; |
... | ... | @@ -266,6 +330,21 @@ export default { |
266 | 330 | font-size: 30px; |
267 | 331 | } |
268 | 332 | } |
333 | + .pic { | |
334 | + display: flex; | |
335 | + align-items: center; | |
336 | + margin-right: 5px; | |
337 | + | |
338 | + span { | |
339 | + font-size: 27px; | |
340 | + color: #333333; | |
341 | + } | |
342 | + img { | |
343 | + width: 30px; | |
344 | + height: 30px; | |
345 | + margin-right: 5px; | |
346 | + } | |
347 | + } | |
269 | 348 | } |
270 | 349 | } |
271 | 350 | } | ... | ... |
src/views/Home/component/AddChildPopupGroup.vue
1 | 1 | <template> |
2 | 2 | <div> |
3 | - <div class="addchild_group" v-if="step==1"> | |
3 | + <div class="addchild_group" v-if="step==2"> | |
4 | 4 | <img class="bg" src="@/assets/home/bg2.png" alt=""> |
5 | - <p class="title">添加学生</p> | |
6 | - <p class="des">完善相关信息可帮助获得最佳使用体验 </p> | |
5 | + <p class="title">激活认证</p> | |
6 | + <p class="des">完善认证信息可帮助获得最佳使用体验</p> | |
7 | 7 | <div class="phone_content"> |
8 | 8 | <div class="item"> |
9 | 9 | <p class="phone_title">手机号</p> |
... | ... | @@ -16,44 +16,31 @@ |
16 | 16 | <p class="phone_title">验证码</p> |
17 | 17 | <input class="code" type="text" v-model="code" placeholder="请输入验证码"> |
18 | 18 | </div> |
19 | - <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button> | |
20 | - </div> | |
21 | - </div> | |
22 | - <div class="addchild_group" v-if="step==2"> | |
23 | - <img class="bg" src="@/assets/home/bg2.png" alt=""> | |
24 | - <p class="title">已查询到{{claimChildList.length}}位学生信息</p> | |
25 | - <p class="des">请仔细确认学生信息后再认领</p> | |
26 | - <div class="child_content"> | |
27 | - <div class="child_box"> | |
28 | - <div class="child_item" v-for="(item,index) in claimChildList" :key="index"> | |
29 | - <p><span>姓名</span>{{item.travelerName}}</p> | |
30 | - <p><span>阶段</span>{{item.travelerType==1?'小学':item.travelerType==2?'初中':'高中'}}</p> | |
31 | - <p><span>所在地区</span>{{item.province+item.city+item.area}}</p> | |
32 | - <p><span>学校</span>{{item.schoolName}}</p> | |
33 | - <p><span>入学年份</span>{{item.enrollYear}}</p> | |
34 | - <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox> | |
35 | - </div> | |
36 | - </div> | |
37 | - <button class="submit" @click="claimChild">认领</button> | |
19 | + <button class="submit" @click="checkPhoneAndCode">完成</button> | |
38 | 20 | </div> |
39 | 21 | </div> |
40 | - <div class="addchild_group" v-if="step==3"> | |
22 | + <div class="addchild_group" v-if="step==1"> | |
41 | 23 | <img class="bg" src="@/assets/home/bg2.png" alt=""> |
42 | 24 | <p class="title">添加学生信息</p> |
43 | - <p class="des">如验证号码非学校预留号码,请按步骤自行添加完善学生信息。</p> | |
25 | + <p class="des">完善相关信息可帮助获得最佳使用体验</p> | |
44 | 26 | <div class="content"> |
45 | 27 | <div class="name">学生信息</div> |
46 | - <div class="item"> | |
28 | + <div class="item" style="width:48%;display:inline-flex;margin-right:4%;"> | |
47 | 29 | <input type="text" placeholder="请输入学生姓名" v-model="studentName"> |
48 | 30 | </div> |
31 | + <div class="item" @click="handleYear" style="width:48%;display:inline-flex;"> | |
32 | + <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p> | |
33 | + <img src="@/assets/more.png" alt=""> | |
34 | + </div> | |
49 | 35 | <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;"> |
50 | 36 | <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p> |
51 | 37 | <img src="@/assets/more.png" alt=""> |
52 | 38 | </div> |
53 | - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;"> | |
54 | - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p> | |
39 | + <div class="item" @click="showUserClassSelect=true" style="width:48%;display:inline-flex;"> | |
40 | + <p :class="!classType?'nodata':''">{{classType?classType:'班级'}}</p> | |
55 | 41 | <img src="@/assets/more.png" alt=""> |
56 | 42 | </div> |
43 | + | |
57 | 44 | <div class="item" @click="showAreaSelect=true"> |
58 | 45 | <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p> |
59 | 46 | <img src="@/assets/more.png" alt=""> |
... | ... | @@ -74,6 +61,9 @@ |
74 | 61 | <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true"> |
75 | 62 | <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" /> |
76 | 63 | </van-popup> |
64 | + <van-popup v-model="showUserClassSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true"> | |
65 | + <van-picker title="班级" show-toolbar :columns="classTypeArr" value-key="label" @cancel="showUserClassSelect = false" @confirm="selectClassTypeOver" /> | |
66 | + </van-popup> | |
77 | 67 | |
78 | 68 | <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true"> |
79 | 69 | <div v-if="chooseSchoolisShow"> |
... | ... | @@ -89,17 +79,15 @@ import chooseSchool from '@/views/Service/component/chooseSchool' |
89 | 79 | var codeInterval; |
90 | 80 | export default { |
91 | 81 | components: { chooseSchool }, |
82 | + props: ['step', 'travelerNum'], | |
92 | 83 | data () { |
93 | 84 | return { |
94 | - step: 1, | |
95 | 85 | phone: '', |
96 | 86 | codeText: '获取验证码',//获取验证码按钮文字 |
97 | 87 | code: '',//验证码 |
98 | 88 | studentName: '', |
99 | 89 | showDialog: true, |
100 | 90 | |
101 | - claimChildList: [], | |
102 | - | |
103 | 91 | year: '',//入学年份 |
104 | 92 | yearDisable: false, |
105 | 93 | showYearSelect: false, |
... | ... | @@ -108,16 +96,176 @@ export default { |
108 | 96 | userType: '', |
109 | 97 | userTypeVal: '',//所处阶段1-小学 2-初中 3-高中 |
110 | 98 | showUserTypeSelect: false, |
111 | - userTypeArr: [{ | |
112 | - label: '小学', | |
113 | - value: 1 | |
99 | + userTypeArr: [ | |
100 | + { | |
101 | + label: '幼儿园', | |
102 | + value: 0 | |
103 | + }, { | |
104 | + label: '小学', | |
105 | + value: 1 | |
106 | + }, { | |
107 | + label: '初中', | |
108 | + value: 2 | |
109 | + }, { | |
110 | + label: '高中', | |
111 | + value: 3 | |
112 | + }], | |
113 | + | |
114 | + classType: '', | |
115 | + classTypeVal: '',//班级 | |
116 | + showUserClassSelect: false, | |
117 | + classTypeArr: [{ | |
118 | + label: '1班', | |
119 | + value: '1班' | |
120 | + }, { | |
121 | + label: '2班', | |
122 | + value: '2班' | |
123 | + }, { | |
124 | + label: '3班', | |
125 | + value: '3班' | |
126 | + }, { | |
127 | + label: '4班', | |
128 | + value: '4班' | |
129 | + }, { | |
130 | + label: '5班', | |
131 | + value: '5班' | |
132 | + }, { | |
133 | + label: '6班', | |
134 | + value: '6班' | |
135 | + }, { | |
136 | + label: '7班', | |
137 | + value: '7班' | |
138 | + }, { | |
139 | + label: '8班', | |
140 | + value: '8班' | |
141 | + }, { | |
142 | + label: '9班', | |
143 | + value: '9班' | |
144 | + }, { | |
145 | + label: '10班', | |
146 | + value: '10班' | |
147 | + }, { | |
148 | + label: '11班', | |
149 | + value: '11班' | |
150 | + }, { | |
151 | + label: '12班', | |
152 | + value: '12班' | |
153 | + }, { | |
154 | + label: '13班', | |
155 | + value: '13班' | |
156 | + }, { | |
157 | + label: '14班', | |
158 | + value: '14班' | |
159 | + }, { | |
160 | + label: '15班', | |
161 | + value: '15班' | |
162 | + }, { | |
163 | + label: '16班', | |
164 | + value: '16班' | |
165 | + }, { | |
166 | + label: '17班', | |
167 | + value: '17班' | |
168 | + }, { | |
169 | + label: '18班', | |
170 | + value: '18班' | |
171 | + }, { | |
172 | + label: '19班', | |
173 | + value: '19班' | |
174 | + }, { | |
175 | + label: '20班', | |
176 | + value: '20班' | |
177 | + }, { | |
178 | + label: '21班', | |
179 | + value: '21班' | |
180 | + }, { | |
181 | + label: '22班', | |
182 | + value: '22班' | |
183 | + }, { | |
184 | + label: '23班', | |
185 | + value: '23班' | |
186 | + }, { | |
187 | + label: '24班', | |
188 | + value: '24班' | |
189 | + }, { | |
190 | + label: '25班', | |
191 | + value: '25班' | |
192 | + }, { | |
193 | + label: '26班', | |
194 | + value: '26班' | |
195 | + }, { | |
196 | + label: '27班', | |
197 | + value: '27班' | |
198 | + }, { | |
199 | + label: '28班', | |
200 | + value: '28班' | |
201 | + }, { | |
202 | + label: '29班', | |
203 | + value: '29班' | |
204 | + }, { | |
205 | + label: '30班', | |
206 | + value: '30班' | |
207 | + }, { | |
208 | + label: '31班', | |
209 | + value: '31班' | |
210 | + }, { | |
211 | + label: '32班', | |
212 | + value: '32班' | |
213 | + }, { | |
214 | + label: '33班', | |
215 | + value: '33班' | |
216 | + }, { | |
217 | + label: '34班', | |
218 | + value: '34班' | |
219 | + }, { | |
220 | + label: '35班', | |
221 | + value: '35班' | |
222 | + }, { | |
223 | + label: '36班', | |
224 | + value: '36班' | |
225 | + }, { | |
226 | + label: '37班', | |
227 | + value: '37班' | |
114 | 228 | }, { |
115 | - label: '初中', | |
116 | - value: 2 | |
229 | + label: '38班', | |
230 | + value: '38班' | |
117 | 231 | }, { |
118 | - label: '高中', | |
119 | - value: 3 | |
120 | - }], | |
232 | + label: '39班', | |
233 | + value: '39班' | |
234 | + }, { | |
235 | + label: '40班', | |
236 | + value: '40班' | |
237 | + }, { | |
238 | + label: '41班', | |
239 | + value: '41班' | |
240 | + }, { | |
241 | + label: '42班', | |
242 | + value: '42班' | |
243 | + }, { | |
244 | + label: '43班', | |
245 | + value: '43班' | |
246 | + }, { | |
247 | + label: '44班', | |
248 | + value: '44班' | |
249 | + }, { | |
250 | + label: '45班', | |
251 | + value: '45班' | |
252 | + }, { | |
253 | + label: '46班', | |
254 | + value: '46班' | |
255 | + }, { | |
256 | + label: '47班', | |
257 | + value: '47班' | |
258 | + }, { | |
259 | + label: '48班', | |
260 | + value: '48班' | |
261 | + }, { | |
262 | + label: '49班', | |
263 | + value: '49班' | |
264 | + }, { | |
265 | + label: '50班', | |
266 | + value: '50班' | |
267 | + } | |
268 | + ], | |
121 | 269 | |
122 | 270 | area: '', |
123 | 271 | areaCode: '', |
... | ... | @@ -169,20 +317,20 @@ export default { |
169 | 317 | }, |
170 | 318 | onSuccess: res => { |
171 | 319 | this.$toast.clear() |
172 | - if (res.success) { | |
173 | - let i = 60; | |
174 | - codeInterval = setInterval(() => { | |
175 | - if (i == 0) { | |
176 | - this.codeText = `获取验证码`; | |
177 | - clearInterval(codeInterval); | |
178 | - return; | |
179 | - } | |
180 | - this.codeText = `重试(${i})`; | |
181 | - i-- | |
182 | - }, 1000) | |
183 | - } else { | |
184 | - this.$toast.fail(res.message) | |
185 | - } | |
320 | + if (res.success) { | |
321 | + let i = 60; | |
322 | + codeInterval = setInterval(() => { | |
323 | + if (i == 0) { | |
324 | + this.codeText = `获取验证码`; | |
325 | + clearInterval(codeInterval); | |
326 | + return; | |
327 | + } | |
328 | + this.codeText = `重试(${i})`; | |
329 | + i-- | |
330 | + }, 1000) | |
331 | + } else { | |
332 | + this.$toast.fail(res.message) | |
333 | + } | |
186 | 334 | }, |
187 | 335 | onFail: err => { |
188 | 336 | console.log('err', err) |
... | ... | @@ -209,7 +357,7 @@ export default { |
209 | 357 | forbidClick: true |
210 | 358 | }) |
211 | 359 | this.mgop({ |
212 | - api: 'mgop.sz.hswsy.checkPhoneAndCode', // 必须 | |
360 | + api: 'mgop.sz.hswsy.checkPhone', // 必须 | |
213 | 361 | host: 'https://mapi.zjzwfw.gov.cn/', |
214 | 362 | dataType: 'JSON', |
215 | 363 | type: 'POST', |
... | ... | @@ -220,69 +368,12 @@ export default { |
220 | 368 | data: { |
221 | 369 | "code": this.code, |
222 | 370 | "phone": this.phone, |
223 | - "unionId": localStorage.getItem('centerNo') | |
224 | - }, | |
225 | - onSuccess: res => { | |
226 | - this.$toast.clear() | |
227 | - if (res.data.code == 200) { | |
228 | - if (res.data.data.length == 0) { | |
229 | - // 白名单无用户 | |
230 | - this.step = 3; | |
231 | - } else { | |
232 | - // 白名单有用户 | |
233 | - let claimChildList = res.data.data | |
234 | - for (let i in claimChildList) { | |
235 | - claimChildList[i].checked = false | |
236 | - } | |
237 | - this.claimChildList = claimChildList | |
238 | - this.step = 2; | |
239 | - } | |
240 | - } else { | |
241 | - this.$toast.fail(res.data?.message) | |
242 | - } | |
243 | - }, | |
244 | - onFail: err => { | |
245 | - console.log('err', err) | |
246 | - } | |
247 | - }); | |
248 | - }, | |
249 | - | |
250 | - | |
251 | - // 认领孩子 | |
252 | - claimChild () { | |
253 | - const claimChildList = this.claimChildList; | |
254 | - let claimChildId = '' | |
255 | - for (let i in claimChildList) { | |
256 | - if (claimChildList[i].checked) { | |
257 | - if (claimChildId == '') { | |
258 | - claimChildId = claimChildList[i].travelerNum | |
259 | - } else { | |
260 | - claimChildId = claimChildId + ',' + claimChildList[i].travelerNum | |
261 | - } | |
262 | - } | |
263 | - } | |
264 | - this.$toast.loading({ | |
265 | - message: '加载中...', | |
266 | - duration: 0, | |
267 | - forbidClick: true | |
268 | - }) | |
269 | - this.mgop({ | |
270 | - api: 'mgop.sz.hswsy.claimChildren', // 必须 | |
271 | - host: 'https://mapi.zjzwfw.gov.cn/', | |
272 | - dataType: 'JSON', | |
273 | - type: 'POST', | |
274 | - appKey: 'fuxgnukl+2001895516+edccpx', // 必须 | |
275 | - headers: { | |
276 | - // 'isTestUrl': '1' | |
277 | - }, | |
278 | - data: { | |
279 | - "loginMobile": this.phone, | |
280 | - "subUserNums": claimChildId | |
371 | + "travelerNum": this.travelerNum | |
281 | 372 | }, |
282 | 373 | onSuccess: res => { |
283 | 374 | this.$toast.clear() |
284 | 375 | if (res.data.code == 200) { |
285 | - this.$toast.success('认领成功') | |
376 | + this.$toast.success('认证成功') | |
286 | 377 | this.$emit('complete') |
287 | 378 | } else { |
288 | 379 | this.$toast.fail(res.data?.message) |
... | ... | @@ -294,7 +385,6 @@ export default { |
294 | 385 | }); |
295 | 386 | }, |
296 | 387 | |
297 | - | |
298 | 388 | // 初始化入学年份选项 |
299 | 389 | initYearArr () { |
300 | 390 | // 页面创建时执行 |
... | ... | @@ -324,6 +414,12 @@ export default { |
324 | 414 | this.userTypeVal = value.value; |
325 | 415 | this.showUserTypeSelect = false; |
326 | 416 | }, |
417 | + //班级选择 | |
418 | + selectClassTypeOver (value) { | |
419 | + this.classType = value.label; | |
420 | + this.classTypeVal = value.value; | |
421 | + this.showUserClassSelect = false; | |
422 | + }, | |
327 | 423 | // 获取地区列表 |
328 | 424 | GetSysAreaList () { |
329 | 425 | this.mgop({ |
... | ... | @@ -389,6 +485,9 @@ export default { |
389 | 485 | else if (!this.userType) { |
390 | 486 | this.$toast('请选择阶段'); |
391 | 487 | } |
488 | + else if (!this.classType) { | |
489 | + this.$toast('请选择班级'); | |
490 | + } | |
392 | 491 | else if (!this.year) { |
393 | 492 | this.$toast('请选择入学年份'); |
394 | 493 | } |
... | ... | @@ -400,7 +499,7 @@ export default { |
400 | 499 | } else { |
401 | 500 | let postData = { |
402 | 501 | contactsName: this.studentName, |
403 | - contactsMobile: this.phone, | |
502 | + contactsMobile: this.userInfo?.phone, | |
404 | 503 | contactsType: 1, |
405 | 504 | province: this.area.split(',')[0],//省份 |
406 | 505 | city: this.area.split(',')[1],//城市 |
... | ... | @@ -408,7 +507,8 @@ export default { |
408 | 507 | schoolName: this.school,//学校名称 |
409 | 508 | enrollYear: this.year,//入学年份 |
410 | 509 | travelerType: this.userTypeVal,//1-小学 2-初中 3-高中 |
411 | - loginMobile: this.userInfo?.phone | |
510 | + loginMobile: this.userInfo?.phone, | |
511 | + className: this.classType //班级 | |
412 | 512 | } |
413 | 513 | this.$toast.loading({ |
414 | 514 | message: '加载中', | ... | ... |
src/views/Home/component/HomeChildList.vue
... | ... | @@ -3,9 +3,9 @@ |
3 | 3 | <div class="stu_info" v-for="(item,index) in childList" :key="index" @click="handleStudentDetail(index)"> |
4 | 4 | <div class="title"> |
5 | 5 | <p>学生信息</p> |
6 | - <!-- <button @click="handleYanxue(index)">出示研学码</button> --> | |
6 | + <button v-if="item.whiteFlag!=1||item.isBing!=1" @click.stop="Certification(index)">激活认证</button> | |
7 | 7 | </div> |
8 | - <img v-if="item.whiteFlag" class="img_auth" src="@/assets/home/auth.png" alt=""> | |
8 | + <img v-if="item.whiteFlag==1&&item.isBing==1" class="img_auth" src="@/assets/home/auth.png" alt=""> | |
9 | 9 | <div class="item"> |
10 | 10 | <van-icon name="manager" /><span>{{item.travelerName}}</span> |
11 | 11 | </div> |
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | 添加学生信息 |
22 | 22 | </div> |
23 | 23 | <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> |
24 | - <AddChildPopupGroup @complete="complete"></AddChildPopupGroup> | |
24 | + <AddChildPopupGroup @complete="complete" :step="step" :travelerNum="travelerNum"></AddChildPopupGroup> | |
25 | 25 | </van-popup> |
26 | 26 | </div> |
27 | 27 | </template> |
... | ... | @@ -39,17 +39,20 @@ export default { |
39 | 39 | return { |
40 | 40 | showAddChildPopupGroup: false,//新增孩子弹出框 |
41 | 41 | childList: [],//孩子列表 |
42 | + step: 1, | |
43 | + travelerNum: '' | |
42 | 44 | } |
43 | 45 | }, |
44 | 46 | mounted () { |
45 | 47 | this.getChildList() |
46 | 48 | }, |
47 | 49 | methods: { |
48 | - // 研学码 | |
49 | - // handleYanxue (index) { | |
50 | - // localStorage.setItem('bindYanxueCodeChildInfo',JSON.stringify(this.childList[index])) | |
51 | - // this.$router.push({ name: 'YanxueCode' }) | |
52 | - // }, | |
50 | + // 激活认证 | |
51 | + Certification (index) { | |
52 | + this.step = 2 | |
53 | + this.travelerNum = this.childList[index].travelerNum | |
54 | + this.showAddChildPopupGroup = true | |
55 | + }, | |
53 | 56 | // 进入学生详情页 |
54 | 57 | handleStudentDetail (index) { |
55 | 58 | localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index])) |
... | ... | @@ -78,7 +81,18 @@ export default { |
78 | 81 | console.log('getUserInfo', res) |
79 | 82 | this.$toast.clear() |
80 | 83 | if (res.data.code == 200) { |
81 | - this.childList = res.data.data.userInfo.subUsers | |
84 | + const userInfo = res.data.data.userInfo | |
85 | + this.childList = userInfo.subUsers | |
86 | + if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') { | |
87 | + localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames)) | |
88 | + this.$store.commit('changeSchool', userInfo.schoolNames) | |
89 | + if (localStorage.getItem('schoolNamesChoose')) { | |
90 | + localStorage.setItem('schoolNamesChoose', userInfo.schoolNames[0]) | |
91 | + } | |
92 | + } else { | |
93 | + localStorage.setItem('schoolNames', []) | |
94 | + this.$store.commit('changeSchool', []) | |
95 | + } | |
82 | 96 | } |
83 | 97 | }, |
84 | 98 | onFail: err => { |
... | ... | @@ -86,8 +100,9 @@ export default { |
86 | 100 | } |
87 | 101 | }); |
88 | 102 | }, |
89 | - addStudent(){ | |
90 | - this.showAddChildPopupGroup=true | |
103 | + addStudent () { | |
104 | + this.step = 1 | |
105 | + this.showAddChildPopupGroup = true | |
91 | 106 | }, |
92 | 107 | complete () { |
93 | 108 | this.showAddChildPopupGroup = false; |
... | ... | @@ -201,12 +216,12 @@ export default { |
201 | 216 | </style> |
202 | 217 | <style lang="scss"> |
203 | 218 | .elder { |
204 | - .home_child_list .stu_info{ | |
219 | + .home_child_list .stu_info { | |
205 | 220 | height: auto; |
206 | - .title p{ | |
221 | + .title p { | |
207 | 222 | font-size: 40px; |
208 | 223 | } |
209 | - .item{ | |
224 | + .item { | |
210 | 225 | font-size: 38px; |
211 | 226 | } |
212 | 227 | } | ... | ... |
src/views/Service/AbroadDetail.vue
... | ... | @@ -95,13 +95,13 @@ |
95 | 95 | <img class="notime" v-if="packageArr.length==0" src="@/assets/service/notime.png" alt=""> |
96 | 96 | |
97 | 97 | <van-tabs class="tabs top_border" v-model="active" swipeable :ellipsis="false" color="#4092FF" scrollspy sticky> |
98 | - <van-tab title="商品详情"> | |
98 | + <van-tab title="产品详情"> | |
99 | 99 | <div class="tag_item" v-if="detailData.productFeatures"> |
100 | - <p class="tag_title">商品特色</p> | |
100 | + <p class="tag_title">产品特色</p> | |
101 | 101 | <p class="tag_text" v-html="detailData.productFeatures"></p> |
102 | 102 | </div> |
103 | 103 | <div class="tag_item" v-if="detailData.productDescription"> |
104 | - <p class="tag_title">商品描述</p> | |
104 | + <p class="tag_title">产品描述</p> | |
105 | 105 | <div class="content_box"> |
106 | 106 | <div class="content_all" :class="isOpen ? 'open' : ''"> |
107 | 107 | <p v-html="detailData.productDescription"></p> |
... | ... | @@ -347,7 +347,7 @@ export default { |
347 | 347 | } else { |
348 | 348 | let message = res.data.message; |
349 | 349 | if (!message) { |
350 | - message = '商品不存在' | |
350 | + message = '产品不存在' | |
351 | 351 | } |
352 | 352 | this.$toast.fail(message) |
353 | 353 | } | ... | ... |
src/views/Service/EditContact.vue
... | ... | @@ -31,25 +31,35 @@ export default { |
31 | 31 | phone: '', |
32 | 32 | gender: '', |
33 | 33 | travelerIdCard: '', |
34 | - travelerNum: '' | |
34 | + travelerNum: '', | |
35 | + isAdd: false,//是否为新增家长(新增学生不在此页面) | |
35 | 36 | } |
36 | 37 | }, |
37 | 38 | mounted () { |
38 | 39 | let editContact = JSON.parse(localStorage.getItem('editContact')) |
39 | - | |
40 | - this.userType = editContact?.userType | |
41 | - this.userTypeName = editContact?.userType == 1 ? '学生' : '家长' | |
42 | - if (editContact?.travelerIdCard) { | |
43 | - this.travelerIdCard = editContact?.travelerIdCard | |
44 | - } | |
45 | - if (editContact?.travelerMobile) { | |
46 | - this.phone = editContact?.travelerMobile | |
47 | - } | |
48 | - if (editContact?.travelerName) { | |
49 | - this.travelerName = editContact?.travelerName | |
40 | + if (this.$route.query.add) { | |
41 | + console.log('新增家长') | |
42 | + this.userType = 2; | |
43 | + this.userTypeName = '家长' | |
44 | + this.isAdd = true; | |
45 | + } else { | |
46 | + this.userType = editContact?.userType | |
47 | + this.userTypeName = editContact?.userType == 1 ? '学生' : '家长' | |
48 | + if (editContact?.travelerIdCard) { | |
49 | + this.travelerIdCard = editContact?.travelerIdCard | |
50 | + } | |
51 | + if (editContact?.travelerMobile) { | |
52 | + this.phone = editContact?.travelerMobile | |
53 | + } | |
54 | + if (editContact?.travelerName) { | |
55 | + this.travelerName = editContact?.travelerName | |
56 | + } | |
57 | + if (editContact?.gender) { | |
58 | + this.gender = String(editContact?.gender) | |
59 | + } | |
60 | + this.userType = editContact?.userType | |
61 | + this.travelerNum = editContact?.travelerNum | |
50 | 62 | } |
51 | - this.userType = editContact?.userType | |
52 | - this.travelerNum = editContact?.travelerNum | |
53 | 63 | }, |
54 | 64 | methods: { |
55 | 65 | // 确认 |
... | ... | @@ -77,13 +87,15 @@ export default { |
77 | 87 | let userInfo = localStorage.getItem('userInfo') |
78 | 88 | userInfo = userInfo ? JSON.parse(userInfo) : userInfo; |
79 | 89 | let postData = { |
80 | - userNum: this.travelerNum, | |
81 | 90 | contactsName: this.travelerName, |
82 | 91 | contactsMobile: this.phone, |
83 | 92 | contactsIdCard: this.travelerIdCard, |
84 | 93 | contactsType: this.userType, |
85 | 94 | gender: Number(this.gender), |
86 | 95 | loginMobile: userInfo?.phone |
96 | + }; | |
97 | + if (!this.isAdd) {//新增学生或家长 | |
98 | + postData.userNum = this.travelerNum; | |
87 | 99 | } |
88 | 100 | this.$toast.loading({ |
89 | 101 | message: '加载中', | ... | ... |
src/views/Service/SelectContact.vue
1 | 1 | <template> |
2 | 2 | <div id="selectContact"> |
3 | + <div class="control"> | |
4 | + <div class="add_btn" @click="showAddChildPopupGroup=true"> | |
5 | + <van-icon name="add-o" /> | |
6 | + 新增学生 | |
7 | + </div> | |
8 | + <div class="add_btn" @click="addContact"> | |
9 | + <van-icon name="add-o" /> | |
10 | + 新增家长 | |
11 | + </div> | |
12 | + </div> | |
3 | 13 | <div class="box"> |
4 | 14 | <template v-for="(item,index) in contactList"> |
5 | 15 | <div class="contact_item" v-if="!hideParent&&item.userType!=1||item.userType==1" :key="index"> |
6 | - <van-icon class="edit" name="edit" @click="editContact(index)" /> | |
16 | + <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox> | |
7 | 17 | <div class="info"> |
8 | 18 | <p class="name">{{item.travelerName}}<span v-if="!item.travelerIdCard||!item.gender">需完善</span></p> |
9 | 19 | <p class="des">{{item.userType==1?'学生':'家长'}}·{{item.travelerMobile}}</p> |
10 | 20 | </div> |
11 | - <van-checkbox v-if="item.userType==1" class="checkbox" v-model="item.checked" shape="square"></van-checkbox> | |
12 | - <van-checkbox v-else class="checkbox" v-model="item.checked" @change="checkboxChange" shape="square"></van-checkbox> | |
21 | + <van-icon class="edit" name="edit" @click="editContact(index)" /> | |
13 | 22 | </div> |
14 | 23 | </template> |
15 | - <div class="add_btn" @click="showAddChildPopupGroup=true"> | |
16 | - <van-icon name="add-o" /> | |
17 | - 新增出行学生 | |
18 | - </div> | |
24 | + | |
19 | 25 | </div> |
20 | 26 | <van-button class="btn" type="primary" @click="selectContact">确定</van-button> |
21 | 27 | <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> |
22 | - <AddChildPopupGroup @complete="complete"></AddChildPopupGroup> | |
28 | + <AddChildPopupGroup @complete="complete" step='1'></AddChildPopupGroup> | |
23 | 29 | </van-popup> |
24 | 30 | </div> |
25 | 31 | </template> |
26 | 32 | <script> |
27 | 33 | import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup' |
28 | -import { Dialog } from 'vant'; | |
29 | 34 | export default { |
30 | 35 | data () { |
31 | 36 | return { |
... | ... | @@ -92,11 +97,16 @@ export default { |
92 | 97 | userType: contactItem.userType, |
93 | 98 | travelerIdCard: contactItem.travelerIdCard, |
94 | 99 | travelerNum: contactItem.travelerNum, |
95 | - travelerName: contactItem.travelerName | |
100 | + travelerName: contactItem.travelerName, | |
101 | + gender: contactItem.gender, | |
96 | 102 | } |
97 | 103 | localStorage.setItem('editContact', JSON.stringify(editContact)) |
98 | 104 | this.$router.push({ name: 'EditContact' }) |
99 | 105 | }, |
106 | + // 添加家长 | |
107 | + addContact () { | |
108 | + this.$router.push({ name: 'EditContact', query: { add: 1 } }) | |
109 | + }, | |
100 | 110 | complete () { |
101 | 111 | this.showAddChildPopupGroup = false; |
102 | 112 | this.getContactList() |
... | ... | @@ -114,28 +124,36 @@ export default { |
114 | 124 | selectedArr.push({ |
115 | 125 | travelerName: contactList[i].travelerName, |
116 | 126 | travelerMobile: contactList[i].travelerMobile, |
117 | - travelerNum: contactList[i].travelerNum | |
127 | + travelerNum: contactList[i].travelerNum, | |
128 | + userType: contactList[i].userType, | |
118 | 129 | }) |
119 | 130 | } |
120 | 131 | } |
121 | 132 | } |
122 | 133 | console.log(this.limit, selectedArr.length) |
134 | + // 判断出行人数是否符合 | |
123 | 135 | if (this.limit && this.limit != selectedArr.length) { |
124 | 136 | this.$toast(`请选择${this.limit}位出行人`) |
125 | 137 | return; |
126 | 138 | } |
127 | - // console.log(selectedArr) | |
128 | - localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr)) | |
129 | - this.$router.back() | |
130 | - }, | |
131 | - checkboxChange (e) { | |
132 | - if (e == true) { | |
133 | - Dialog.alert({ | |
139 | + // 判断是否选择学生 | |
140 | + let hasStudent = false; | |
141 | + for (let i in selectedArr) { | |
142 | + if (selectedArr[i].userType == 1) { | |
143 | + hasStudent = true | |
144 | + } | |
145 | + } | |
146 | + if (!hasStudent) { | |
147 | + this.$dialog.alert({ | |
134 | 148 | title: '温馨提示', |
135 | 149 | message: '活动参与主体为学生本人,请选择出行学生!未绑定学生,请新增出行学生进行添加。', |
136 | 150 | confirmButtonColor: '#3385FF' |
137 | 151 | }) |
152 | + return; | |
138 | 153 | } |
154 | + // console.log(selectedArr) | |
155 | + localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr)) | |
156 | + this.$router.back() | |
139 | 157 | } |
140 | 158 | }, |
141 | 159 | components: { |
... | ... | @@ -150,26 +168,38 @@ export default { |
150 | 168 | box-sizing: border-box; |
151 | 169 | padding: 16px 0; |
152 | 170 | background: #f6f7fa; |
153 | - .box { | |
171 | + .control { | |
154 | 172 | width: 702px; |
155 | 173 | margin: 0 auto; |
156 | 174 | padding: 0 24px; |
157 | - padding-bottom: 200px; | |
158 | 175 | box-sizing: border-box; |
159 | 176 | background: #fff; |
160 | 177 | border-radius: 16px; |
178 | + margin-bottom: 24px; | |
161 | 179 | .add_btn { |
180 | + display: inline-block; | |
181 | + width: 50%; | |
162 | 182 | line-height: 104px; |
163 | 183 | font-size: 28px; |
164 | 184 | color: #4092ff; |
165 | 185 | text-align: center; |
166 | 186 | } |
187 | + } | |
188 | + .box { | |
189 | + width: 702px; | |
190 | + margin: 0 auto; | |
191 | + padding: 0 24px; | |
192 | + padding-bottom: 200px; | |
193 | + box-sizing: border-box; | |
194 | + background: #fff; | |
195 | + border-radius: 16px; | |
196 | + | |
167 | 197 | .contact_item { |
168 | 198 | display: flex; |
169 | 199 | align-items: center; |
170 | 200 | justify-content: space-between; |
171 | 201 | .edit { |
172 | - padding: 20px 20px 20px 0; | |
202 | + padding: 20px 0px 20px 20px; | |
173 | 203 | font-size: 40px; |
174 | 204 | color: #4092ff; |
175 | 205 | } |
... | ... | @@ -196,7 +226,7 @@ export default { |
196 | 226 | } |
197 | 227 | } |
198 | 228 | .checkbox { |
199 | - padding: 20px 0 20px 20px; | |
229 | + padding: 20px 20px 20px 0px; | |
200 | 230 | } |
201 | 231 | } |
202 | 232 | } |
... | ... | @@ -229,10 +259,9 @@ export default { |
229 | 259 | font-size: 40px; |
230 | 260 | } |
231 | 261 | } |
232 | - .btn{ | |
262 | + .btn { | |
233 | 263 | font-size: 40px; |
234 | 264 | } |
235 | - | |
236 | 265 | } |
237 | 266 | } |
238 | 267 | </style> |
239 | 268 | \ No newline at end of file | ... | ... |
src/views/Service/ServiceBaseKQ.vue
... | ... | @@ -112,7 +112,6 @@ export default { |
112 | 112 | mounted () { |
113 | 113 | console.log('base mounted') |
114 | 114 | this.initService() |
115 | - | |
116 | 115 | }, |
117 | 116 | activated () { |
118 | 117 | console.log('base activated') |
... | ... | @@ -133,7 +132,6 @@ export default { |
133 | 132 | }else if(list=='riverList'){ |
134 | 133 | this.getRiverList() |
135 | 134 | } |
136 | - | |
137 | 135 | }, |
138 | 136 | initService () { |
139 | 137 | this.getUniList() |
... | ... | @@ -415,7 +413,6 @@ export default { |
415 | 413 | }, |
416 | 414 | handleRedLink () { |
417 | 415 | location.href = 'https://720yun.com/t/89vkzwd7pfw?scene_id=80780201' |
418 | - | |
419 | 416 | } |
420 | 417 | }, |
421 | 418 | components: { | ... | ... |
... | ... | @@ -0,0 +1,124 @@ |
1 | +/* 集团认领 年级班级*/ | |
2 | +<template> | |
3 | + <div> | |
4 | + <div class="fontBox">已认领</div> | |
5 | + <div class="card"> | |
6 | + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> | |
7 | + <div>2021级01班</div> | |
8 | + <div class="cardItem_grey" @click="switchSchool">取消认领</div> | |
9 | + </div> | |
10 | + </div> | |
11 | + <div class="fontBox">未认领</div> | |
12 | + <div class="treeCard"> | |
13 | + <van-collapse v-model="activeNames" v-for="(v,i) in treeList" :key='i'> | |
14 | + <van-collapse-item title="标题1" :name="i">内容</van-collapse-item> | |
15 | + </van-collapse> | |
16 | + </div> | |
17 | + | |
18 | + <van-popup style="background: transparent;" get-container="body" v-model="showSchool"> | |
19 | + <!-- <school-add></school-add> --> | |
20 | + <group-penson></group-penson> | |
21 | + </van-popup> | |
22 | + </div> | |
23 | +</template> | |
24 | + | |
25 | +<script> | |
26 | +import schoolAdd from '@/views/Travel/component/schoolAdd' | |
27 | +import groupPenson from '@/views/Travel/component/groupPenson' | |
28 | +export default { | |
29 | + components: { schoolAdd , groupPenson}, | |
30 | + data() { | |
31 | + return { | |
32 | + schoolList: [ | |
33 | + {}, | |
34 | + {}, | |
35 | + {}, | |
36 | + ], | |
37 | + showSchool: false, | |
38 | + // | |
39 | + treeList: [ | |
40 | + { | |
41 | + children: [ | |
42 | + {}, | |
43 | + {}, | |
44 | + ] | |
45 | + }, | |
46 | + {}, | |
47 | + {}, | |
48 | + ], | |
49 | + isShow: false, | |
50 | + activeNames: ['1'], | |
51 | + } | |
52 | + }, | |
53 | + methods: { | |
54 | + //切换学校 | |
55 | + switchSchool() { | |
56 | + // this.showSchool = true | |
57 | + }, | |
58 | + // | |
59 | + childrenClick() { | |
60 | + if(this.isShow) {this.isShow = false} | |
61 | + else { | |
62 | + this.isShow = true | |
63 | + } | |
64 | + }, | |
65 | + // | |
66 | + getClass() { | |
67 | + let phone = '18267566730' | |
68 | + let dataList = '绍兴市鲁迅小学' | |
69 | + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/claimSchool?loginMobile=${phone}&schoolNames=${dataList}`).then((res) => { | |
70 | + // this.$toast.clear() | |
71 | + // console.log(res.data) | |
72 | + // if (res.data.code == 200) { | |
73 | + // this.$toast.success('认证成功') | |
74 | + // this.$emit('closeJT') | |
75 | + // } else { | |
76 | + // this.$toast.fail(res.data?.message) | |
77 | + // } | |
78 | + // }) | |
79 | + } | |
80 | + } | |
81 | +} | |
82 | +</script> | |
83 | + | |
84 | +<style lang="scss" scoped> | |
85 | +.fontBox { | |
86 | + width: 100vw; | |
87 | + height: 8vw; | |
88 | + display: flex; | |
89 | + align-items: center; | |
90 | + padding: 0 4vw; | |
91 | + box-sizing: border-box; | |
92 | + background-color: #F5F6FA; | |
93 | + font-size: 3.7vw; | |
94 | + font-weight: bold; | |
95 | + color: #0F1826; | |
96 | +} | |
97 | +.card { | |
98 | + padding: 7vw 5vw 0; | |
99 | + box-sizing: border-box; | |
100 | + | |
101 | + .cardItem { | |
102 | + display: flex; | |
103 | + justify-content: space-between; | |
104 | + margin-bottom: 9vw; | |
105 | + font-size: 3.8vw; | |
106 | + | |
107 | + .cardItem_blue { | |
108 | + color:#4092FF | |
109 | + } | |
110 | + .cardItem_grey { | |
111 | + color:#999999 | |
112 | + } | |
113 | + } | |
114 | + | |
115 | + .treeIem { | |
116 | + margin-bottom: 9vw; | |
117 | + font-size: 3.8vw; | |
118 | + } | |
119 | +} | |
120 | +.treeCard { | |
121 | + padding: 2vw 1vw 0; | |
122 | + box-sizing: border-box; | |
123 | +} | |
124 | +</style> | |
0 | 125 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,476 @@ |
1 | +<template> | |
2 | + <div> | |
3 | + <div class="addchild_group" v-if="step==1"> | |
4 | + <img class="bg" src="@/assets/home/bg2.png" alt=""> | |
5 | + <p class="title">集团管理人员认证</p> | |
6 | + <p class="des">认证完成后可发起集团定制研学活动</p> | |
7 | + <div class="phone_content"> | |
8 | + <div class="item"> | |
9 | + <p class="phone_title">手机号</p> | |
10 | + <div class="flex"> | |
11 | + <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号"> | |
12 | + <span class="getcode" @click="getCode">{{codeText}}</span> | |
13 | + </div> | |
14 | + </div> | |
15 | + <div class="item"> | |
16 | + <p class="phone_title">验证码</p> | |
17 | + <input class="code" type="text" v-model="code" placeholder="请输入验证码"> | |
18 | + </div> | |
19 | + <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button> | |
20 | + </div> | |
21 | + </div> | |
22 | + | |
23 | + <div class="addchild_group" v-if="step==2"> | |
24 | + <img class="bg" src="@/assets/home/bg2.png" alt=""> | |
25 | + <p class="title">已查询到相关信息</p> | |
26 | + <p class="des">请仔细确认个人信息后再认领</p> | |
27 | + <div class="child_content"> | |
28 | + <div class="school_box"> | |
29 | + <div class="box" v-for="(v,i) in schoolList" :key="i"> | |
30 | + <div class="box_list"> | |
31 | + <div class="box_name" style="margin:0 0 20px"> | |
32 | + <div class="greyFont">学校:</div> | |
33 | + <div>{{v.schoolName}}</div> | |
34 | + </div> | |
35 | + <!-- <div class="box_name" style="margin:12px 0 40px"> | |
36 | + <div class="greyFont">所在地区:</div> | |
37 | + <div>浙江绍兴 越城区</div> | |
38 | + </div> --> | |
39 | + </div> | |
40 | + <div class="box_check"> | |
41 | + <van-checkbox v-model="v.isAuth" shape="square"></van-checkbox> | |
42 | + </div> | |
43 | + </div> | |
44 | + </div> | |
45 | + <button class="submit" @click="claimChild">完成</button> | |
46 | + </div> | |
47 | + </div> | |
48 | + | |
49 | + <div class="addchild_group" v-if="step==3"> | |
50 | + <img class="bg" src="@/assets/home/bg2.png" alt=""> | |
51 | + <p class="title">暂无相关信息</p> | |
52 | + <p class="des">请确认预留手机号码是否正确</p> | |
53 | + <div class="content"> | |
54 | + <div class="pic"> | |
55 | + <img style="width:100%;height:100%" src="@/assets/Travel/noSchool.png" alt=""> | |
56 | + </div> | |
57 | + <button class="submit" style="margin-top:50px" @click="handleClose">完成</button> | |
58 | + </div> | |
59 | + </div> | |
60 | + | |
61 | + </div> | |
62 | +</template> | |
63 | + | |
64 | +<script> | |
65 | + | |
66 | +import chooseSchool from '@/views/Service/component/chooseSchool' | |
67 | +var codeInterval; | |
68 | +export default { | |
69 | + components: { chooseSchool }, | |
70 | + data () { | |
71 | + return { | |
72 | + step: 1, | |
73 | + publicName: '', | |
74 | + phone: '', | |
75 | + codeText: '获取验证码',//获取验证码按钮文字 | |
76 | + code: '',//验证码 | |
77 | + studentName: '', | |
78 | + showDialog: true, | |
79 | + | |
80 | + claimChildList: [], | |
81 | + | |
82 | + appId: '', | |
83 | + chooseSchoolisShow: false, | |
84 | + | |
85 | + checked: '', | |
86 | + schoolList: [ | |
87 | + | |
88 | + ] | |
89 | + } | |
90 | + }, | |
91 | + | |
92 | + mounted () { | |
93 | + let publicName = localStorage.getItem('publicName') | |
94 | + this.publicName = publicName | |
95 | + let userInfo = localStorage.getItem('userInfo') | |
96 | + this.userInfo = JSON.parse(userInfo); | |
97 | + }, | |
98 | + methods: { | |
99 | + // 获取验证码 | |
100 | + getCode () { | |
101 | + if (this.codeText != '获取验证码') return; | |
102 | + if (!this.phone) { | |
103 | + this.$toast('请输入手机号') | |
104 | + return; | |
105 | + } | |
106 | + if (!this.checkPhone(this.phone)) { | |
107 | + this.$toast('请输入正确的手机号') | |
108 | + return; | |
109 | + } | |
110 | + this.$toast.loading({ | |
111 | + message: '加载中', | |
112 | + duration: 0, | |
113 | + forbidClick: true | |
114 | + }) | |
115 | + this.http.getMsg({ | |
116 | + phone: this.phone | |
117 | + }).then((res) => { | |
118 | + this.$toast.clear() | |
119 | + if (res.success) { | |
120 | + let i = 60; | |
121 | + codeInterval = setInterval(() => { | |
122 | + if (i == 0) { | |
123 | + this.codeText = `获取验证码`; | |
124 | + clearInterval(codeInterval); | |
125 | + return; | |
126 | + } | |
127 | + this.codeText = `重试(${i})`; | |
128 | + i-- | |
129 | + }, 1000) | |
130 | + } else { | |
131 | + this.$toast.fail(res.message) | |
132 | + } | |
133 | + }) | |
134 | + }, | |
135 | + // 获取手机号白名单信息 | |
136 | + checkPhoneAndCode () { | |
137 | + if (!this.phone) { | |
138 | + this.$toast('请输入手机号') | |
139 | + return; | |
140 | + } | |
141 | + if (!this.checkPhone(this.phone)) { | |
142 | + this.$toast('请输入正确的手机号') | |
143 | + return; | |
144 | + } | |
145 | + if (!this.code) { | |
146 | + this.$toast('请输入验证码') | |
147 | + return; | |
148 | + } | |
149 | + this.$toast.loading({ | |
150 | + message: '加载中', | |
151 | + duration: 0, | |
152 | + forbidClick: true | |
153 | + }) | |
154 | + const userInfo = JSON.parse(localStorage.getItem('userInfo')) | |
155 | + | |
156 | + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/checkPhoneAndCode`, { | |
157 | + // "code": this.code, | |
158 | + // "phone": this.phone, | |
159 | + // "unionId": userInfo.unionId, | |
160 | + // 'requestFlag': 2 | |
161 | + // }).then((res) => { | |
162 | + // this.$toast.clear() | |
163 | + // if (res.data.code == 200) { | |
164 | + // if (res.data.data.length == 0) { | |
165 | + // // 白名单无用户 | |
166 | + // this.step = 3; | |
167 | + // } else { | |
168 | + // // 白名单有用户 | |
169 | + // this.schoolList = res.data.data | |
170 | + // this.step = 2; | |
171 | + // } | |
172 | + // } else { | |
173 | + // this.$toast.fail(res.data?.message) | |
174 | + // } | |
175 | + // }) | |
176 | + }, | |
177 | + | |
178 | + // 完成 | |
179 | + claimChild () { | |
180 | + const schoolList = this.schoolList | |
181 | + let dataList = '' | |
182 | + schoolList.forEach(item => { | |
183 | + if(item.isAuth) { | |
184 | + dataList = dataList + item.schoolName + ',' | |
185 | + } | |
186 | + }) | |
187 | + if(dataList) { | |
188 | + dataList = dataList.substring(0 , dataList.length-1); | |
189 | + } | |
190 | + console.log(dataList ) | |
191 | + this.$toast.loading({ | |
192 | + message: '加载中...', | |
193 | + duration: 0, | |
194 | + forbidClick: true | |
195 | + }) | |
196 | + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/claimSchool?loginMobile=${this.phone}&schoolNames=${dataList}`).then((res) => { | |
197 | + // this.$toast.clear() | |
198 | + // console.log(res.data) | |
199 | + // if (res.data.code == 200) { | |
200 | + // this.$toast.success('认证成功') | |
201 | + // this.$emit('closeJT') | |
202 | + // } else { | |
203 | + // this.$toast.fail(res.data?.message) | |
204 | + // } | |
205 | + // }) | |
206 | + }, | |
207 | + | |
208 | + handleClose () { | |
209 | + this.$emit('closeJT') | |
210 | + }, | |
211 | + checkPhone (phone) { | |
212 | + if ((/^1[3456789]\d{9}$/.test(phone))) { | |
213 | + return true | |
214 | + } else { | |
215 | + return false | |
216 | + } | |
217 | + }, | |
218 | + }, | |
219 | + destroyed () { | |
220 | + clearInterval(codeInterval); | |
221 | + }, | |
222 | +} | |
223 | +</script> | |
224 | +<style lang="scss" scoped> | |
225 | +.addchild_group { | |
226 | + width: 638px; | |
227 | + height: 836px; | |
228 | + background: #ffffff; | |
229 | + border-radius: 24px; | |
230 | + position: relative; | |
231 | + .bg { | |
232 | + width: 100%; | |
233 | + position: absolute; | |
234 | + top: 0; | |
235 | + left: 0; | |
236 | + } | |
237 | + .title { | |
238 | + position: relative; | |
239 | + width: 100%; | |
240 | + padding-top: 70px; | |
241 | + padding-bottom: 8px; | |
242 | + text-align: center; | |
243 | + font-size: 34px; | |
244 | + font-weight: bold; | |
245 | + color: #0857ff; | |
246 | + } | |
247 | + .des { | |
248 | + position: relative; | |
249 | + width: 100%; | |
250 | + box-sizing: border-box; | |
251 | + padding: 0 15%; | |
252 | + text-align: center; | |
253 | + font-size: 24px; | |
254 | + color: #6596ff; | |
255 | + } | |
256 | + .content { | |
257 | + width: 100%; | |
258 | + box-sizing: border-box; | |
259 | + padding: 0 40px; | |
260 | + position: absolute; | |
261 | + top: 236px; | |
262 | + left: 0; | |
263 | + .name { | |
264 | + width: 558px; | |
265 | + height: 50px; | |
266 | + font-size: 28px; | |
267 | + color: #000; | |
268 | + padding-left: 20px; | |
269 | + box-sizing: border-box; | |
270 | + } | |
271 | + .item { | |
272 | + width: 558px; | |
273 | + height: 72px; | |
274 | + border-radius: 36px; | |
275 | + background: #f7f7f7; | |
276 | + box-sizing: border-box; | |
277 | + font-size: 28px; | |
278 | + padding: 0 32px; | |
279 | + display: flex; | |
280 | + justify-content: space-between; | |
281 | + align-items: center; | |
282 | + margin-bottom: 28px; | |
283 | + p { | |
284 | + color: #333333; | |
285 | + &.nodata { | |
286 | + color: #999999; | |
287 | + } | |
288 | + } | |
289 | + img { | |
290 | + width: 40px; | |
291 | + } | |
292 | + input { | |
293 | + width: 100%; | |
294 | + background: transparent; | |
295 | + border: 0; | |
296 | + color: #333333; | |
297 | + padding: 0; | |
298 | + &::-webkit-input-placeholder { | |
299 | + color: #999999; | |
300 | + } | |
301 | + } | |
302 | + .btn { | |
303 | + width: 240px; | |
304 | + height: 55px; | |
305 | + float: right; | |
306 | + font-size: 28px; | |
307 | + background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%); | |
308 | + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), | |
309 | + 0px 8px 12px 0px rgba(89, 199, 171, 0.5); | |
310 | + border-radius: 34px; | |
311 | + border: transparent; | |
312 | + color: #333333; | |
313 | + } | |
314 | + } | |
315 | + .school_select { | |
316 | + font-size: 28px; | |
317 | + padding: 0 32px; | |
318 | + margin-bottom: 28px; | |
319 | + } | |
320 | + .submit { | |
321 | + width: 294px; | |
322 | + height: 72px; | |
323 | + border: 0; | |
324 | + background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%); | |
325 | + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), | |
326 | + 0px 8px 12px 0px rgba(87, 137, 255, 0.5); | |
327 | + border-radius: 34px; | |
328 | + font-size: 34px; | |
329 | + color: #ffffff; | |
330 | + margin: 0 auto; | |
331 | + display: block; | |
332 | + } | |
333 | + .pic { | |
334 | + width: 350px; | |
335 | + height: 350px; | |
336 | + margin: auto | |
337 | + } | |
338 | + } | |
339 | + .child_content { | |
340 | + position: relative; | |
341 | + margin-top: 40px; | |
342 | + .child_box { | |
343 | + height: 500px; | |
344 | + overflow: auto; | |
345 | + padding-left: 100px; | |
346 | + .child_item { | |
347 | + position: relative; | |
348 | + margin-bottom: 50px; | |
349 | + p { | |
350 | + font-size: 28px; | |
351 | + padding: 8px 0; | |
352 | + span { | |
353 | + display: inline-block; | |
354 | + width: 140px; | |
355 | + margin-right: 28px; | |
356 | + color: #999; | |
357 | + } | |
358 | + } | |
359 | + .checkbox { | |
360 | + position: absolute; | |
361 | + top: 115px; | |
362 | + right: 20px; | |
363 | + } | |
364 | + } | |
365 | + } | |
366 | + .school_box { | |
367 | + width: 100%; | |
368 | + height: 500px; | |
369 | + overflow: auto; | |
370 | + font-size: 3.7vw; | |
371 | + padding: 20px 60px 20px 90px ; | |
372 | + box-sizing: border-box; | |
373 | + | |
374 | + .box { | |
375 | + display: flex; | |
376 | + justify-content: space-between; | |
377 | + | |
378 | + .box_list { | |
379 | + .box_name { | |
380 | + display: flex; | |
381 | + | |
382 | + .greyFont { | |
383 | + // width: 160px; | |
384 | + width: 110px; | |
385 | + color: #999999; | |
386 | + } | |
387 | + } | |
388 | + } | |
389 | + .box_check { | |
390 | + | |
391 | + } | |
392 | + } | |
393 | + } | |
394 | + .submit { | |
395 | + width: 438px; | |
396 | + height: 78px; | |
397 | + background: #3385ff; | |
398 | + border-radius: 37px; | |
399 | + border-radius: 39px; | |
400 | + border: 0; | |
401 | + font-size: 34px; | |
402 | + color: #ffffff; | |
403 | + margin: 0 auto; | |
404 | + display: block; | |
405 | + } | |
406 | + } | |
407 | + .phone_content { | |
408 | + width: 100%; | |
409 | + position: absolute; | |
410 | + top: 180px; | |
411 | + left: 0; | |
412 | + box-sizing: border-box; | |
413 | + padding: 40px; | |
414 | + .item { | |
415 | + border-bottom: 1px solid #e2e2e2; | |
416 | + margin-bottom: 30px; | |
417 | + } | |
418 | + .phone_title { | |
419 | + font-size: 34px; | |
420 | + font-weight: bold; | |
421 | + margin-bottom: 28px; | |
422 | + } | |
423 | + .flex { | |
424 | + display: flex; | |
425 | + align-items: center; | |
426 | + justify-content: space-between; | |
427 | + margin-bottom: 22px; | |
428 | + } | |
429 | + .code { | |
430 | + border: 0; | |
431 | + background: transparent; | |
432 | + font-size: 28px; | |
433 | + margin-bottom: 32px; | |
434 | + width: 100%; | |
435 | + } | |
436 | + .phone { | |
437 | + width: 50%; | |
438 | + margin: 0; | |
439 | + } | |
440 | + .getcode { | |
441 | + color: #5789ff; | |
442 | + font-size: 28px; | |
443 | + padding: 10px; | |
444 | + } | |
445 | + .submit { | |
446 | + width: 438px; | |
447 | + height: 78px; | |
448 | + background: #3385ff; | |
449 | + border-radius: 37px; | |
450 | + border-radius: 39px; | |
451 | + border: 0; | |
452 | + font-size: 34px; | |
453 | + color: #ffffff; | |
454 | + margin: 0 auto; | |
455 | + margin-top: 120px; | |
456 | + display: block; | |
457 | + } | |
458 | + } | |
459 | +} | |
460 | + ::v-deep .van-search { | |
461 | + background: transparent; | |
462 | + padding: 0; | |
463 | + width: 100%; | |
464 | +} | |
465 | + ::v-deep .van-search__content { | |
466 | + padding: 0; | |
467 | +} | |
468 | +.schoolBoxF { | |
469 | + width: 100vw; | |
470 | + height: 100vh; | |
471 | + position: absolute; | |
472 | + top: 0; | |
473 | + left: 0; | |
474 | + background-color: #fff; | |
475 | +} | |
476 | +</style> | ... | ... |
... | ... | @@ -0,0 +1,351 @@ |
1 | +<template> | |
2 | + <div> | |
3 | + <div class="addchild_group" v-if="step==1"> | |
4 | + <img class="bg" src="@/assets/home/bg2.png" alt=""> | |
5 | + <p class="title">选择学校</p> | |
6 | + <p class="des">请选择你关注的学校</p> | |
7 | + <div class="content"> | |
8 | + <!-- <div class="name">选择学校</div> --> | |
9 | + <div class="item"> | |
10 | + <input type="text" placeholder="请选择学校" readonly v-model="school"> | |
11 | + <button type="info" class="btn" @click="chooseSchool">选择学校</button> | |
12 | + </div> | |
13 | + <button class="submit" @click="submit">确定</button> | |
14 | + </div> | |
15 | + </div> | |
16 | + | |
17 | + <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true"> | |
18 | + <div v-if="chooseSchoolisShow"> | |
19 | + <chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool> | |
20 | + </div> | |
21 | + </van-popup> | |
22 | + </div> | |
23 | +</template> | |
24 | + | |
25 | +<script> | |
26 | + | |
27 | +import chooseSchool from '@/views/Service/component/chooseSchool' | |
28 | +export default { | |
29 | + components: { chooseSchool }, | |
30 | + data () { | |
31 | + return { | |
32 | + step: 1, | |
33 | + phone: '', | |
34 | + codeText: '获取验证码',//获取验证码按钮文字 | |
35 | + code: '',//验证码 | |
36 | + studentName: '', | |
37 | + userInfo: {}, | |
38 | + | |
39 | + searchSchool: '', | |
40 | + school: '', | |
41 | + schoolId: '', | |
42 | + | |
43 | + chooseSchoolisShow: false | |
44 | + } | |
45 | + }, | |
46 | + | |
47 | + mounted () { | |
48 | + let userInfo = localStorage.getItem('userInfo') | |
49 | + this.userInfo = JSON.parse(userInfo); | |
50 | + }, | |
51 | + methods: { | |
52 | + submit () { | |
53 | + if (!this.school) { | |
54 | + this.$toast('请选择学校'); | |
55 | + } else { | |
56 | + let postData = { | |
57 | + userNum: this.userInfo.centerNo, | |
58 | + contactsName: this.userInfo.nickName, | |
59 | + contactsMobile: this.userInfo.phone, | |
60 | + loginMobile: this.userInfo.phone, | |
61 | + schoolName: this.school, | |
62 | + contactsType: this.userInfo.userType, | |
63 | + } | |
64 | + this.$toast.loading({ | |
65 | + message: '加载中', | |
66 | + duration: 0, | |
67 | + forbidClick: true | |
68 | + }) | |
69 | + console.log(postData) | |
70 | + this.yxAxios.post(`${this.proxyUrl}/prod/user/info/addContacts`, postData).then((res) => { | |
71 | + this.$toast.clear() | |
72 | + if (res.data.code == 200) { | |
73 | + this.$toast.success('关注成功') | |
74 | + this.$emit('closeAdd') | |
75 | + this.getUserInfoXST() | |
76 | + } else { | |
77 | + this.$toast.fail(res.message) | |
78 | + } | |
79 | + }) | |
80 | + } | |
81 | + }, | |
82 | + //选择学校 | |
83 | + chooseSchool () { | |
84 | + // this.$router.push({name: 'chooseSchool'}) | |
85 | + this.chooseSchoolisShow = true | |
86 | + }, | |
87 | + schoolData (val) { | |
88 | + this.school = val.text; | |
89 | + this.schoolId = val.id; | |
90 | + }, | |
91 | + // 获取用户信息 | |
92 | + getUserInfoXST () { | |
93 | + this.$toast.loading({ | |
94 | + message: '加载中...', | |
95 | + duration: 0, | |
96 | + forbidClick: true | |
97 | + }) | |
98 | + let appid = '' | |
99 | + let publicName = localStorage.getItem('publicName') | |
100 | + if( publicName == 'XST'){ | |
101 | + appid = 'wx1c630c8773c482f1' | |
102 | + }else if (publicName == 'SXYX') { | |
103 | + appId = 'wx1305e88d2bc74073' | |
104 | + } else if (publicName == 'XST') { | |
105 | + appId = 'wx1c630c8773c482f1' | |
106 | + } else if (publicName == 'KQ') { | |
107 | + appId = 'wx1305e88d2bc74073' | |
108 | + } | |
109 | + | |
110 | + this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${appid}/getUserInfo?unionId=${localStorage.getItem('unionId')}`).then((res) => { | |
111 | + this.$toast.clear() | |
112 | + if (res.data.code == 200) { | |
113 | + localStorage.setItem('userInfo', JSON.stringify(res.data.data)) | |
114 | + | |
115 | + if(res.data.data.schoolNames || res.data.data.schoolNames == [] || res.data.data.schoolNames == 'null') { | |
116 | + localStorage.setItem('schoolNames',JSON.stringify(res.data.data.schoolNames)) | |
117 | + this.$store.commit('changeSchool', res.data.data.schoolNames) | |
118 | + if(!localStorage.getItem('schoolNamesChoose')) { | |
119 | + localStorage.setItem('schoolNamesChoose',res.data.data.schoolNames[0]) | |
120 | + } | |
121 | + }else { | |
122 | + localStorage.setItem('schoolNames',[]) | |
123 | + this.$store.commit('changeSchool', []) | |
124 | + } | |
125 | + } | |
126 | + }) | |
127 | + }, | |
128 | + }, | |
129 | +} | |
130 | +</script> | |
131 | +<style lang="scss" scoped> | |
132 | +.addchild_group { | |
133 | + width: 638px; | |
134 | + // height: 836px; | |
135 | + height: 496px; | |
136 | + background: #ffffff; | |
137 | + border-radius: 24px; | |
138 | + position: relative; | |
139 | + .bg { | |
140 | + width: 100%; | |
141 | + position: absolute; | |
142 | + top: 0; | |
143 | + left: 0; | |
144 | + } | |
145 | + .title { | |
146 | + position: relative; | |
147 | + width: 100%; | |
148 | + padding-top: 70px; | |
149 | + padding-bottom: 8px; | |
150 | + text-align: center; | |
151 | + font-size: 34px; | |
152 | + font-weight: bold; | |
153 | + color: #0857ff; | |
154 | + } | |
155 | + .des { | |
156 | + position: relative; | |
157 | + width: 100%; | |
158 | + box-sizing: border-box; | |
159 | + padding: 0 15%; | |
160 | + text-align: center; | |
161 | + font-size: 24px; | |
162 | + color: #6596ff; | |
163 | + } | |
164 | + .content { | |
165 | + width: 100%; | |
166 | + box-sizing: border-box; | |
167 | + padding: 0 40px; | |
168 | + position: absolute; | |
169 | + top: 236px; | |
170 | + left: 0; | |
171 | + .name { | |
172 | + width: 558px; | |
173 | + height: 50px; | |
174 | + font-size: 28px; | |
175 | + color: #000; | |
176 | + padding-left: 20px; | |
177 | + box-sizing: border-box; | |
178 | + } | |
179 | + .item { | |
180 | + width: 558px; | |
181 | + height: 72px; | |
182 | + border-radius: 36px; | |
183 | + background: #f7f7f7; | |
184 | + box-sizing: border-box; | |
185 | + font-size: 28px; | |
186 | + padding: 0 32px; | |
187 | + display: flex; | |
188 | + justify-content: space-between; | |
189 | + align-items: center; | |
190 | + margin-bottom: 28px; | |
191 | + p { | |
192 | + color: #333333; | |
193 | + &.nodata { | |
194 | + color: #999999; | |
195 | + } | |
196 | + } | |
197 | + img { | |
198 | + width: 40px; | |
199 | + } | |
200 | + input { | |
201 | + width: 100%; | |
202 | + background: transparent; | |
203 | + border: 0; | |
204 | + color: #333333; | |
205 | + padding: 0; | |
206 | + &::-webkit-input-placeholder { | |
207 | + color: #999999; | |
208 | + } | |
209 | + } | |
210 | + .btn { | |
211 | + width: 240px; | |
212 | + height: 55px; | |
213 | + float: right; | |
214 | + font-size: 28px; | |
215 | + background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%); | |
216 | + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), | |
217 | + 0px 8px 12px 0px rgba(89, 199, 171, 0.5); | |
218 | + border-radius: 34px; | |
219 | + border: transparent; | |
220 | + color: #333333; | |
221 | + } | |
222 | + } | |
223 | + .school_select { | |
224 | + font-size: 28px; | |
225 | + padding: 0 32px; | |
226 | + margin-bottom: 28px; | |
227 | + } | |
228 | + .submit { | |
229 | + width: 294px; | |
230 | + height: 72px; | |
231 | + border: 0; | |
232 | + background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%); | |
233 | + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), | |
234 | + 0px 8px 12px 0px rgba(87, 137, 255, 0.5); | |
235 | + border-radius: 34px; | |
236 | + font-size: 34px; | |
237 | + color: #ffffff; | |
238 | + margin: 55px auto 0; | |
239 | + display: block; | |
240 | + } | |
241 | + } | |
242 | + .child_content { | |
243 | + position: relative; | |
244 | + margin-top: 40px; | |
245 | + .child_box { | |
246 | + height: 500px; | |
247 | + overflow: auto; | |
248 | + padding-left: 100px; | |
249 | + .child_item { | |
250 | + position: relative; | |
251 | + margin-bottom: 50px; | |
252 | + p { | |
253 | + font-size: 28px; | |
254 | + padding: 8px 0; | |
255 | + span { | |
256 | + display: inline-block; | |
257 | + width: 140px; | |
258 | + margin-right: 28px; | |
259 | + color: #999; | |
260 | + } | |
261 | + } | |
262 | + .checkbox { | |
263 | + position: absolute; | |
264 | + top: 115px; | |
265 | + right: 20px; | |
266 | + } | |
267 | + } | |
268 | + } | |
269 | + .submit { | |
270 | + width: 438px; | |
271 | + height: 78px; | |
272 | + background: #3385ff; | |
273 | + border-radius: 37px; | |
274 | + border-radius: 39px; | |
275 | + border: 0; | |
276 | + font-size: 34px; | |
277 | + color: #ffffff; | |
278 | + margin: 0 auto; | |
279 | + display: block; | |
280 | + } | |
281 | + } | |
282 | + .phone_content { | |
283 | + width: 100%; | |
284 | + position: absolute; | |
285 | + top: 180px; | |
286 | + left: 0; | |
287 | + box-sizing: border-box; | |
288 | + padding: 40px; | |
289 | + .item { | |
290 | + border-bottom: 1px solid #e2e2e2; | |
291 | + margin-bottom: 30px; | |
292 | + } | |
293 | + .phone_title { | |
294 | + font-size: 34px; | |
295 | + font-weight: bold; | |
296 | + margin-bottom: 28px; | |
297 | + } | |
298 | + .flex { | |
299 | + display: flex; | |
300 | + align-items: center; | |
301 | + justify-content: space-between; | |
302 | + margin-bottom: 22px; | |
303 | + } | |
304 | + .code { | |
305 | + border: 0; | |
306 | + background: transparent; | |
307 | + font-size: 28px; | |
308 | + margin-bottom: 32px; | |
309 | + width: 100%; | |
310 | + } | |
311 | + .phone { | |
312 | + width: 50%; | |
313 | + margin: 0; | |
314 | + } | |
315 | + .getcode { | |
316 | + color: #5789ff; | |
317 | + font-size: 28px; | |
318 | + padding: 10px; | |
319 | + } | |
320 | + .submit { | |
321 | + width: 438px; | |
322 | + height: 78px; | |
323 | + background: #3385ff; | |
324 | + border-radius: 37px; | |
325 | + border-radius: 39px; | |
326 | + border: 0; | |
327 | + font-size: 34px; | |
328 | + color: #ffffff; | |
329 | + margin: 0 auto; | |
330 | + margin-top: 120px; | |
331 | + display: block; | |
332 | + } | |
333 | + } | |
334 | +} | |
335 | + ::v-deep .van-search { | |
336 | + background: transparent; | |
337 | + padding: 0; | |
338 | + width: 100%; | |
339 | +} | |
340 | + ::v-deep .van-search__content { | |
341 | + padding: 0; | |
342 | +} | |
343 | +.schoolBoxF { | |
344 | + width: 100vw; | |
345 | + height: 100vh; | |
346 | + position: absolute; | |
347 | + top: 0; | |
348 | + left: 0; | |
349 | + background-color: #fff; | |
350 | +} | |
351 | +</style> | ... | ... |
... | ... | @@ -0,0 +1,74 @@ |
1 | +/* 认证学校*/ | |
2 | +<template> | |
3 | + <div> | |
4 | + <div class="fontBox"></div> | |
5 | + <div class="card"> | |
6 | + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> | |
7 | + <div @click="switchClass">{{v.schoolName}}</div> | |
8 | + <div class="cardItem_blue" @click="switchSchool">重新认证</div> | |
9 | + </div> | |
10 | + </div> | |
11 | + | |
12 | + <!-- <van-popup style="background: transparent;" get-container="body" v-model="showSchool"> | |
13 | + <group-penson></group-penson> | |
14 | + </van-popup> --> | |
15 | + </div> | |
16 | +</template> | |
17 | + | |
18 | +<script> | |
19 | +import schoolAdd from '@/views/Travel/component/schoolAdd' | |
20 | +import groupPenson from '@/views/Travel/component/groupPenson' | |
21 | +export default { | |
22 | + components: { schoolAdd , groupPenson}, | |
23 | + data() { | |
24 | + return { | |
25 | + schoolList: [ | |
26 | + {isAuth: true, schoolName: "绍兴市鲁迅小学"}, | |
27 | + // {isAuth: false, schoolName: "测试学校"}, | |
28 | + {isAuth: true, schoolName: "柯桥学校"}, | |
29 | + ], | |
30 | + showSchool: false | |
31 | + } | |
32 | + }, | |
33 | + methods: { | |
34 | + //切换学校 | |
35 | + switchSchool() { | |
36 | + localStorage.setItem('backRZ',true) | |
37 | + this.$router.push({name: localStorage.getItem('prePage') }) | |
38 | + }, | |
39 | + //选择班级 | |
40 | + switchClass() { | |
41 | + this.$router.push({name: 'classAttestation'}) | |
42 | + } | |
43 | + } | |
44 | +} | |
45 | +</script> | |
46 | + | |
47 | +<style lang="scss" scoped> | |
48 | +.fontBox { | |
49 | + width: 100vw; | |
50 | + height: 3vw; | |
51 | + display: flex; | |
52 | + align-items: center; | |
53 | + padding: 0 4vw; | |
54 | + box-sizing: border-box; | |
55 | + background-color: #F5F6FA; | |
56 | + font-size: 3.5vw; | |
57 | + color: #999999; | |
58 | +} | |
59 | +.card { | |
60 | + padding: 7vw 5vw 0; | |
61 | + box-sizing: border-box; | |
62 | + | |
63 | + .cardItem { | |
64 | + display: flex; | |
65 | + justify-content: space-between; | |
66 | + margin-bottom: 10vw; | |
67 | + font-size: 3.8vw; | |
68 | + | |
69 | + .cardItem_blue { | |
70 | + color:#3074FF | |
71 | + } | |
72 | + } | |
73 | +} | |
74 | +</style> | |
0 | 75 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,73 @@ |
1 | +/* 关注学校*/ | |
2 | +<template> | |
3 | + <div> | |
4 | + <div class="fontBox">请选择关注学校</div> | |
5 | + <div class="card"> | |
6 | + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> | |
7 | + <div>{{v}}</div> | |
8 | + <div class="cardItem_blue" @click="switchSchool(v)">切换</div> | |
9 | + </div> | |
10 | + </div> | |
11 | + | |
12 | + <van-popup style="background: transparent;" get-container="body" v-model="showSchool"> | |
13 | + <!-- <school-add></school-add> --> | |
14 | + <group-penson></group-penson> | |
15 | + </van-popup> | |
16 | + </div> | |
17 | +</template> | |
18 | + | |
19 | +<script> | |
20 | +import schoolAdd from '@/views/Travel/component/schoolAdd' | |
21 | +import groupPenson from '@/views/Travel/component/groupPenson' | |
22 | +export default { | |
23 | + components: { schoolAdd , groupPenson}, | |
24 | + data() { | |
25 | + return { | |
26 | + schoolList: [], | |
27 | + showSchool: false | |
28 | + } | |
29 | + }, | |
30 | + mounted() { | |
31 | + this.getList() | |
32 | + }, | |
33 | + methods: { | |
34 | + //切换学校 | |
35 | + switchSchool(v) { | |
36 | + localStorage.setItem('schoolNamesChoose',v) | |
37 | + this.$router.push({name : localStorage.getItem('prePage')}) | |
38 | + }, | |
39 | + getList() { | |
40 | + this.schoolList = JSON.parse(localStorage.getItem('schoolNames')) | |
41 | + } | |
42 | + } | |
43 | +} | |
44 | +</script> | |
45 | + | |
46 | +<style lang="scss" scoped> | |
47 | +.fontBox { | |
48 | + width: 100vw; | |
49 | + height: 8vw; | |
50 | + display: flex; | |
51 | + align-items: center; | |
52 | + padding: 0 4vw; | |
53 | + box-sizing: border-box; | |
54 | + background-color: #F5F6FA; | |
55 | + font-size: 3.5vw; | |
56 | + color: #999999; | |
57 | +} | |
58 | +.card { | |
59 | + padding: 7vw 5vw 0; | |
60 | + box-sizing: border-box; | |
61 | + | |
62 | + .cardItem { | |
63 | + display: flex; | |
64 | + justify-content: space-between; | |
65 | + margin-bottom: 10vw; | |
66 | + font-size: 3.8vw; | |
67 | + | |
68 | + .cardItem_blue { | |
69 | + color:#3074FF | |
70 | + } | |
71 | + } | |
72 | +} | |
73 | +</style> | |
0 | 74 | \ No newline at end of file | ... | ... |