diff --git a/src/App.vue b/src/App.vue index 521ab57..40c2c56 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,7 @@ <template> <div id="app" :class="isElder?'elder':''"> - <keep-alive> - <router-view v-if="this.$route.meta.keepAlive" @setElder="setElder" /> - </keep-alive> - <router-view v-if="!this.$route.meta.keepAlive" @setElder="setElder" /> + <router-view @setElder="setElder" /> </div> </template> <script> diff --git a/src/assets/Travel/change.png b/src/assets/Travel/change.png new file mode 100644 index 0000000..1d9841d Binary files /dev/null and b/src/assets/Travel/change.png differ diff --git a/src/assets/Travel/noSchool.png b/src/assets/Travel/noSchool.png new file mode 100644 index 0000000..19c7ad3 Binary files /dev/null and b/src/assets/Travel/noSchool.png differ diff --git a/src/router/index.js b/src/router/index.js index e04d54e..7941ed7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -28,6 +28,10 @@ import payneed from '@/views/Service/payneed.vue' //购买须知 import protocol from '@/views/Service/protocol.vue' //用户协议 +import schoolFollow from '@/views/Travel/schoolFollow.vue' //已关注学校列表 +import schoolAttestation from '@/views/Travel/schoolAttestation.vue' //已认证学校列表 +import classAttestation from '@/views/Travel/classAttestation.vue' //已集团权限年级班级列表 + Vue.use(VueRouter) const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace]; VueRouter.prototype.push = function push(to) { @@ -212,6 +216,31 @@ const routes = [{ title: '用户协议' } }, + { + path: '/schoolFollow', + name: 'schoolFollow', + component: schoolFollow, + meta: { + title: '关注学校' + } + }, + { + path: '/schoolAttestation', + name: 'schoolAttestation', + component: schoolAttestation, + meta: { + title: '已认证学校' + } + }, + { + path: '/classAttestation', + name: 'classAttestation', + component: classAttestation, + meta: { + title: '集团认领' + } + }, + ] const router = new VueRouter({ mode: 'hash', diff --git a/src/store/index.js b/src/store/index.js index 332b916..9ee33f0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,12 +4,15 @@ import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ - state: { - }, - mutations: { - }, - actions: { - }, - modules: { - } -}) + state: { + schoolName: [] + + }, + mutations: { + changeSchool(state, params) { + state.schoolName = params + } + }, + actions: {}, + modules: {} +}) \ No newline at end of file diff --git a/src/views/Home/Home.vue b/src/views/Home/Home.vue index 604771e..3f4a275 100644 --- a/src/views/Home/Home.vue +++ b/src/views/Home/Home.vue @@ -5,7 +5,10 @@ <div> <img class="head" :src="headImgUrl?headImgUrl:defaultHead" alt=""> <div class="right"> - <p class="name">{{userInfo.nickName}}</p> + <!-- <p class="name">{{nicknameUser}}</p> --> + <div class="name"><span>{{nicknameUser}}</span> + <div class="school" v-show="schoolNamesChoose" @click="changeSchool">{{schoolNamesChoose}}<img src="@/assets/Travel/change.png" /></div> + </div> <p class="phone">{{userInfo.phone}}</p> </div> </div> @@ -19,6 +22,11 @@ <van-icon class="icon" name="orders-o" /> <span>集团权限</span> </div> + <!-- <div class="pic"> + <img src="@/assets/home/bg2.png"/> + <span>已认证</span> + <van-icon name="arrow" /> + </div> --> <van-icon name="arrow" /> </div> <div class="item" @click="handleMyCard"> @@ -55,7 +63,6 @@ import HomeChildList from '@/views/Home/component/HomeChildList' import HomeOrder from '@/views/Home/component/HomeOrder' import HomeScan from '@/views/Home/component/HomeScan' import Tabbar4 from '@/component/Tabbar4' -import { Dialog } from 'vant' export default { data () { return { @@ -75,8 +82,10 @@ export default { headImgUrl: '', defaultHead: require('@/assets/head.png'), isShow: false, + isElder: false, showChildList: false, - isElder: false + showSchool: false, + schoolNamesChoose: '' } }, @@ -85,10 +94,17 @@ export default { if (isElder) { this.isElder = true } + this.schoolNamesChoose = localStorage.getItem('schoolNamesChoose') ? localStorage.getItem('schoolNamesChoose') : '' this.centerNo = localStorage.getItem('centerNo'); this.getUserInfo() + this.againRZ() }, + computed: { + schoolNames () { + return this.$store.state.schoolName + } + }, methods: { // 研学码 handleYanxue () { @@ -114,7 +130,7 @@ export default { // 点击长辈版 handelElder () { if (this.isElder) { - Dialog.confirm({ + this.$dialog.confirm({ title: '长辈版', message: '超大字号,看的更清楚,长辈版,专为长辈设计', confirmButtonColor: '#ee0a24', @@ -130,7 +146,7 @@ export default { // on cancel }); } else { - Dialog.confirm({ + this.$dialog.confirm({ title: '长辈版', message: '超大字号,看的更清楚,长辈版,专为长辈设计', confirmButtonColor: '#3385FF', @@ -164,9 +180,20 @@ export default { onSuccess: res => { console.log('getUserInfo', res) if (res.data.code == 200) { - let userInfo = res.data.data.userInfo - this.userInfo = userInfo + let userInfo = res.data.data.userInfo; + this.userInfo = userInfo; localStorage.setItem('userInfo', JSON.stringify(userInfo)) + if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') { + localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames)) + this.$store.commit('changeSchool', userInfo.schoolNames) + if (!localStorage.getItem('schoolNamesChoose')) { + localStorage.setItem('schoolNamesChoose', userInfo.schoolNames[0]) + this.schoolNamesChoose = userInfo.schoolNames[0] + } + } else { + localStorage.setItem('schoolNames', []) + this.$store.commit('changeSchool', []) + } } this.showChildList = true @@ -185,6 +212,27 @@ export default { }, complete () { this.getUserInfo() + }, + //切换学校 + changeSchool () { + this.$router.push({ name: 'schoolFollow' }) + }, + //集团回调关闭页面 + closeJT () { + this.showSchool = false + }, + //查看是否有集团认证 + getRZ () { + // this.showSchool = true + this.$router.push({ name: 'schoolAttestation' }) + }, + //回跳重新认证 + againRZ () { + let backRZ = localStorage.getItem('backRZ') + if (backRZ == 'true') { + this.showSchool = true + localStorage.setItem('backRZ', false) + } } }, components: { @@ -209,7 +257,6 @@ export default { background-position: center; .top { display: flex; - flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 40px 28px; @@ -225,14 +272,31 @@ export default { .right { height: 96px; margin-left: 24px; - display: flex; - align-content: space-around; - flex-wrap: wrap; color: #fff; .name { - font-size: 34px; + font-size: 33px; font-weight: bold; width: 100%; + margin-bottom: 15px; + display: flex; + .school { + max-width: 400px; + border-radius: 30px; + font-size: 26px; + font-weight: normal; + margin-left: 20px; + padding: 0 20px; + box-sizing: border-box; + background-color: #d82b2b; + display: flex; + align-items: center; + + img { + width: 30px; + height: 30px; + margin-left: 5px; + } + } } .phone { font-size: 26px; @@ -266,6 +330,21 @@ export default { font-size: 30px; } } + .pic { + display: flex; + align-items: center; + margin-right: 5px; + + span { + font-size: 27px; + color: #333333; + } + img { + width: 30px; + height: 30px; + margin-right: 5px; + } + } } } } diff --git a/src/views/Home/component/AddChildPopupGroup.vue b/src/views/Home/component/AddChildPopupGroup.vue index 2a50c73..537758d 100644 --- a/src/views/Home/component/AddChildPopupGroup.vue +++ b/src/views/Home/component/AddChildPopupGroup.vue @@ -1,9 +1,9 @@ <template> <div> - <div class="addchild_group" v-if="step==1"> + <div class="addchild_group" v-if="step==2"> <img class="bg" src="@/assets/home/bg2.png" alt=""> - <p class="title">添加学生</p> - <p class="des">完善相关信息可帮助获得最佳使用体验 </p> + <p class="title">激活认证</p> + <p class="des">完善认证信息可帮助获得最佳使用体验</p> <div class="phone_content"> <div class="item"> <p class="phone_title">手机号</p> @@ -16,44 +16,31 @@ <p class="phone_title">验证码</p> <input class="code" type="text" v-model="code" placeholder="请输入验证码"> </div> - <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button> - </div> - </div> - <div class="addchild_group" v-if="step==2"> - <img class="bg" src="@/assets/home/bg2.png" alt=""> - <p class="title">已查询到{{claimChildList.length}}位学生信息</p> - <p class="des">请仔细确认学生信息后再认领</p> - <div class="child_content"> - <div class="child_box"> - <div class="child_item" v-for="(item,index) in claimChildList" :key="index"> - <p><span>姓名</span>{{item.travelerName}}</p> - <p><span>阶段</span>{{item.travelerType==1?'小学':item.travelerType==2?'初中':'高中'}}</p> - <p><span>所在地区</span>{{item.province+item.city+item.area}}</p> - <p><span>学校</span>{{item.schoolName}}</p> - <p><span>入学年份</span>{{item.enrollYear}}</p> - <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox> - </div> - </div> - <button class="submit" @click="claimChild">认领</button> + <button class="submit" @click="checkPhoneAndCode">完成</button> </div> </div> - <div class="addchild_group" v-if="step==3"> + <div class="addchild_group" v-if="step==1"> <img class="bg" src="@/assets/home/bg2.png" alt=""> <p class="title">添加学生信息</p> - <p class="des">如验证号码非学校预留号码,请按步骤自行添加完善学生信息。</p> + <p class="des">完善相关信息可帮助获得最佳使用体验</p> <div class="content"> <div class="name">学生信息</div> - <div class="item"> + <div class="item" style="width:48%;display:inline-flex;margin-right:4%;"> <input type="text" placeholder="请输入学生姓名" v-model="studentName"> </div> + <div class="item" @click="handleYear" style="width:48%;display:inline-flex;"> + <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p> + <img src="@/assets/more.png" alt=""> + </div> <div class="item" @click="showUserTypeSelect=true" style="width:48%;display:inline-flex;margin-right:4%;"> <p :class="!userType?'nodata':''">{{userType?userType:'当前阶段'}}</p> <img src="@/assets/more.png" alt=""> </div> - <div class="item" @click="handleYear" style="width:48%;display:inline-flex;"> - <p :class="!year||yearDisable?'nodata':''">{{year?year:'入学年份'}}</p> + <div class="item" @click="showUserClassSelect=true" style="width:48%;display:inline-flex;"> + <p :class="!classType?'nodata':''">{{classType?classType:'班级'}}</p> <img src="@/assets/more.png" alt=""> </div> + <div class="item" @click="showAreaSelect=true"> <p :class="!area?'nodata':''">{{area?area:'请选择地区'}}</p> <img src="@/assets/more.png" alt=""> @@ -74,6 +61,9 @@ <van-popup v-model="showAreaSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true"> <van-area title="地区" :area-list="areaList" @cancel="showAreaSelect = false" @confirm="selectAreaOver" /> </van-popup> + <van-popup v-model="showUserClassSelect" round position="bottom" get-container="body" :safe-area-inset-bottom="true"> + <van-picker title="班级" show-toolbar :columns="classTypeArr" value-key="label" @cancel="showUserClassSelect = false" @confirm="selectClassTypeOver" /> + </van-popup> <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true"> <div v-if="chooseSchoolisShow"> @@ -89,17 +79,15 @@ import chooseSchool from '@/views/Service/component/chooseSchool' var codeInterval; export default { components: { chooseSchool }, + props: ['step', 'travelerNum'], data () { return { - step: 1, phone: '', codeText: '获取验证码',//获取验证码按钮文字 code: '',//验证码 studentName: '', showDialog: true, - claimChildList: [], - year: '',//入学年份 yearDisable: false, showYearSelect: false, @@ -108,16 +96,176 @@ export default { userType: '', userTypeVal: '',//所处阶段1-小学 2-初中 3-高中 showUserTypeSelect: false, - userTypeArr: [{ - label: '小学', - value: 1 + userTypeArr: [ + { + label: '幼儿园', + value: 0 + }, { + label: '小学', + value: 1 + }, { + label: '初中', + value: 2 + }, { + label: '高中', + value: 3 + }], + + classType: '', + classTypeVal: '',//班级 + showUserClassSelect: false, + classTypeArr: [{ + label: '1班', + value: '1班' + }, { + label: '2班', + value: '2班' + }, { + label: '3班', + value: '3班' + }, { + label: '4班', + value: '4班' + }, { + label: '5班', + value: '5班' + }, { + label: '6班', + value: '6班' + }, { + label: '7班', + value: '7班' + }, { + label: '8班', + value: '8班' + }, { + label: '9班', + value: '9班' + }, { + label: '10班', + value: '10班' + }, { + label: '11班', + value: '11班' + }, { + label: '12班', + value: '12班' + }, { + label: '13班', + value: '13班' + }, { + label: '14班', + value: '14班' + }, { + label: '15班', + value: '15班' + }, { + label: '16班', + value: '16班' + }, { + label: '17班', + value: '17班' + }, { + label: '18班', + value: '18班' + }, { + label: '19班', + value: '19班' + }, { + label: '20班', + value: '20班' + }, { + label: '21班', + value: '21班' + }, { + label: '22班', + value: '22班' + }, { + label: '23班', + value: '23班' + }, { + label: '24班', + value: '24班' + }, { + label: '25班', + value: '25班' + }, { + label: '26班', + value: '26班' + }, { + label: '27班', + value: '27班' + }, { + label: '28班', + value: '28班' + }, { + label: '29班', + value: '29班' + }, { + label: '30班', + value: '30班' + }, { + label: '31班', + value: '31班' + }, { + label: '32班', + value: '32班' + }, { + label: '33班', + value: '33班' + }, { + label: '34班', + value: '34班' + }, { + label: '35班', + value: '35班' + }, { + label: '36班', + value: '36班' + }, { + label: '37班', + value: '37班' }, { - label: '初中', - value: 2 + label: '38班', + value: '38班' }, { - label: '高中', - value: 3 - }], + label: '39班', + value: '39班' + }, { + label: '40班', + value: '40班' + }, { + label: '41班', + value: '41班' + }, { + label: '42班', + value: '42班' + }, { + label: '43班', + value: '43班' + }, { + label: '44班', + value: '44班' + }, { + label: '45班', + value: '45班' + }, { + label: '46班', + value: '46班' + }, { + label: '47班', + value: '47班' + }, { + label: '48班', + value: '48班' + }, { + label: '49班', + value: '49班' + }, { + label: '50班', + value: '50班' + } + ], area: '', areaCode: '', @@ -169,20 +317,20 @@ export default { }, onSuccess: res => { this.$toast.clear() - if (res.success) { - let i = 60; - codeInterval = setInterval(() => { - if (i == 0) { - this.codeText = `获取验证码`; - clearInterval(codeInterval); - return; - } - this.codeText = `重试(${i})`; - i-- - }, 1000) - } else { - this.$toast.fail(res.message) - } + if (res.success) { + let i = 60; + codeInterval = setInterval(() => { + if (i == 0) { + this.codeText = `获取验证码`; + clearInterval(codeInterval); + return; + } + this.codeText = `重试(${i})`; + i-- + }, 1000) + } else { + this.$toast.fail(res.message) + } }, onFail: err => { console.log('err', err) @@ -209,7 +357,7 @@ export default { forbidClick: true }) this.mgop({ - api: 'mgop.sz.hswsy.checkPhoneAndCode', // 必须 + api: 'mgop.sz.hswsy.checkPhone', // 必须 host: 'https://mapi.zjzwfw.gov.cn/', dataType: 'JSON', type: 'POST', @@ -220,69 +368,12 @@ export default { data: { "code": this.code, "phone": this.phone, - "unionId": localStorage.getItem('centerNo') - }, - onSuccess: res => { - this.$toast.clear() - if (res.data.code == 200) { - if (res.data.data.length == 0) { - // 白名单无用户 - this.step = 3; - } else { - // 白名单有用户 - let claimChildList = res.data.data - for (let i in claimChildList) { - claimChildList[i].checked = false - } - this.claimChildList = claimChildList - this.step = 2; - } - } else { - this.$toast.fail(res.data?.message) - } - }, - onFail: err => { - console.log('err', err) - } - }); - }, - - - // 认领孩子 - claimChild () { - const claimChildList = this.claimChildList; - let claimChildId = '' - for (let i in claimChildList) { - if (claimChildList[i].checked) { - if (claimChildId == '') { - claimChildId = claimChildList[i].travelerNum - } else { - claimChildId = claimChildId + ',' + claimChildList[i].travelerNum - } - } - } - this.$toast.loading({ - message: '加载中...', - duration: 0, - forbidClick: true - }) - this.mgop({ - api: 'mgop.sz.hswsy.claimChildren', // 必须 - host: 'https://mapi.zjzwfw.gov.cn/', - dataType: 'JSON', - type: 'POST', - appKey: 'fuxgnukl+2001895516+edccpx', // 必须 - headers: { - // 'isTestUrl': '1' - }, - data: { - "loginMobile": this.phone, - "subUserNums": claimChildId + "travelerNum": this.travelerNum }, onSuccess: res => { this.$toast.clear() if (res.data.code == 200) { - this.$toast.success('认领成功') + this.$toast.success('认证成功') this.$emit('complete') } else { this.$toast.fail(res.data?.message) @@ -294,7 +385,6 @@ export default { }); }, - // 初始化入学年份选项 initYearArr () { // 页面创建时执行 @@ -324,6 +414,12 @@ export default { this.userTypeVal = value.value; this.showUserTypeSelect = false; }, + //班级选择 + selectClassTypeOver (value) { + this.classType = value.label; + this.classTypeVal = value.value; + this.showUserClassSelect = false; + }, // 获取地区列表 GetSysAreaList () { this.mgop({ @@ -389,6 +485,9 @@ export default { else if (!this.userType) { this.$toast('请选择阶段'); } + else if (!this.classType) { + this.$toast('请选择班级'); + } else if (!this.year) { this.$toast('请选择入学年份'); } @@ -400,7 +499,7 @@ export default { } else { let postData = { contactsName: this.studentName, - contactsMobile: this.phone, + contactsMobile: this.userInfo?.phone, contactsType: 1, province: this.area.split(',')[0],//省份 city: this.area.split(',')[1],//城市 @@ -408,7 +507,8 @@ export default { schoolName: this.school,//学校名称 enrollYear: this.year,//入学年份 travelerType: this.userTypeVal,//1-小学 2-初中 3-高中 - loginMobile: this.userInfo?.phone + loginMobile: this.userInfo?.phone, + className: this.classType //班级 } this.$toast.loading({ message: '加载中', diff --git a/src/views/Home/component/HomeChildList.vue b/src/views/Home/component/HomeChildList.vue index a480421..870f901 100644 --- a/src/views/Home/component/HomeChildList.vue +++ b/src/views/Home/component/HomeChildList.vue @@ -3,9 +3,9 @@ <div class="stu_info" v-for="(item,index) in childList" :key="index" @click="handleStudentDetail(index)"> <div class="title"> <p>学生信息</p> - <!-- <button @click="handleYanxue(index)">出示研学码</button> --> + <button v-if="item.whiteFlag!=1||item.isBing!=1" @click.stop="Certification(index)">激活认证</button> </div> - <img v-if="item.whiteFlag" class="img_auth" src="@/assets/home/auth.png" alt=""> + <img v-if="item.whiteFlag==1&&item.isBing==1" class="img_auth" src="@/assets/home/auth.png" alt=""> <div class="item"> <van-icon name="manager" /><span>{{item.travelerName}}</span> </div> @@ -21,7 +21,7 @@ 添加学生信息 </div> <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> - <AddChildPopupGroup @complete="complete"></AddChildPopupGroup> + <AddChildPopupGroup @complete="complete" :step="step" :travelerNum="travelerNum"></AddChildPopupGroup> </van-popup> </div> </template> @@ -39,17 +39,20 @@ export default { return { showAddChildPopupGroup: false,//新增孩子弹出框 childList: [],//孩子列表 + step: 1, + travelerNum: '' } }, mounted () { this.getChildList() }, methods: { - // 研学码 - // handleYanxue (index) { - // localStorage.setItem('bindYanxueCodeChildInfo',JSON.stringify(this.childList[index])) - // this.$router.push({ name: 'YanxueCode' }) - // }, + // 激活认证 + Certification (index) { + this.step = 2 + this.travelerNum = this.childList[index].travelerNum + this.showAddChildPopupGroup = true + }, // 进入学生详情页 handleStudentDetail (index) { localStorage.setItem('StudentDetialInfo', JSON.stringify(this.childList[index])) @@ -78,7 +81,18 @@ export default { console.log('getUserInfo', res) this.$toast.clear() if (res.data.code == 200) { - this.childList = res.data.data.userInfo.subUsers + const userInfo = res.data.data.userInfo + this.childList = userInfo.subUsers + if (userInfo.schoolNames || userInfo.schoolNames == [] || userInfo.schoolNames == 'null') { + localStorage.setItem('schoolNames', JSON.stringify(userInfo.schoolNames)) + this.$store.commit('changeSchool', userInfo.schoolNames) + if (localStorage.getItem('schoolNamesChoose')) { + localStorage.setItem('schoolNamesChoose', userInfo.schoolNames[0]) + } + } else { + localStorage.setItem('schoolNames', []) + this.$store.commit('changeSchool', []) + } } }, onFail: err => { @@ -86,8 +100,9 @@ export default { } }); }, - addStudent(){ - this.showAddChildPopupGroup=true + addStudent () { + this.step = 1 + this.showAddChildPopupGroup = true }, complete () { this.showAddChildPopupGroup = false; @@ -201,12 +216,12 @@ export default { </style> <style lang="scss"> .elder { - .home_child_list .stu_info{ + .home_child_list .stu_info { height: auto; - .title p{ + .title p { font-size: 40px; } - .item{ + .item { font-size: 38px; } } diff --git a/src/views/Service/AbroadDetail.vue b/src/views/Service/AbroadDetail.vue index b68a1da..50f7129 100644 --- a/src/views/Service/AbroadDetail.vue +++ b/src/views/Service/AbroadDetail.vue @@ -95,13 +95,13 @@ <img class="notime" v-if="packageArr.length==0" src="@/assets/service/notime.png" alt=""> <van-tabs class="tabs top_border" v-model="active" swipeable :ellipsis="false" color="#4092FF" scrollspy sticky> - <van-tab title="商品详情"> + <van-tab title="产品详情"> <div class="tag_item" v-if="detailData.productFeatures"> - <p class="tag_title">商品特色</p> + <p class="tag_title">产品特色</p> <p class="tag_text" v-html="detailData.productFeatures"></p> </div> <div class="tag_item" v-if="detailData.productDescription"> - <p class="tag_title">商品描述</p> + <p class="tag_title">产品描述</p> <div class="content_box"> <div class="content_all" :class="isOpen ? 'open' : ''"> <p v-html="detailData.productDescription"></p> @@ -347,7 +347,7 @@ export default { } else { let message = res.data.message; if (!message) { - message = '商品不存在' + message = '产品不存在' } this.$toast.fail(message) } diff --git a/src/views/Service/EditContact.vue b/src/views/Service/EditContact.vue index 509c1f6..3db46e4 100644 --- a/src/views/Service/EditContact.vue +++ b/src/views/Service/EditContact.vue @@ -31,25 +31,35 @@ export default { phone: '', gender: '', travelerIdCard: '', - travelerNum: '' + travelerNum: '', + isAdd: false,//是否为新增家长(新增学生不在此页面) } }, mounted () { let editContact = JSON.parse(localStorage.getItem('editContact')) - - this.userType = editContact?.userType - this.userTypeName = editContact?.userType == 1 ? '学生' : '家长' - if (editContact?.travelerIdCard) { - this.travelerIdCard = editContact?.travelerIdCard - } - if (editContact?.travelerMobile) { - this.phone = editContact?.travelerMobile - } - if (editContact?.travelerName) { - this.travelerName = editContact?.travelerName + if (this.$route.query.add) { + console.log('新增家长') + this.userType = 2; + this.userTypeName = '家长' + this.isAdd = true; + } else { + this.userType = editContact?.userType + this.userTypeName = editContact?.userType == 1 ? '学生' : '家长' + if (editContact?.travelerIdCard) { + this.travelerIdCard = editContact?.travelerIdCard + } + if (editContact?.travelerMobile) { + this.phone = editContact?.travelerMobile + } + if (editContact?.travelerName) { + this.travelerName = editContact?.travelerName + } + if (editContact?.gender) { + this.gender = String(editContact?.gender) + } + this.userType = editContact?.userType + this.travelerNum = editContact?.travelerNum } - this.userType = editContact?.userType - this.travelerNum = editContact?.travelerNum }, methods: { // 确认 @@ -77,13 +87,15 @@ export default { let userInfo = localStorage.getItem('userInfo') userInfo = userInfo ? JSON.parse(userInfo) : userInfo; let postData = { - userNum: this.travelerNum, contactsName: this.travelerName, contactsMobile: this.phone, contactsIdCard: this.travelerIdCard, contactsType: this.userType, gender: Number(this.gender), loginMobile: userInfo?.phone + }; + if (!this.isAdd) {//新增学生或家长 + postData.userNum = this.travelerNum; } this.$toast.loading({ message: '加载中', diff --git a/src/views/Service/SelectContact.vue b/src/views/Service/SelectContact.vue index 90735e1..97bc008 100644 --- a/src/views/Service/SelectContact.vue +++ b/src/views/Service/SelectContact.vue @@ -1,31 +1,36 @@ <template> <div id="selectContact"> + <div class="control"> + <div class="add_btn" @click="showAddChildPopupGroup=true"> + <van-icon name="add-o" /> + 新增学生 + </div> + <div class="add_btn" @click="addContact"> + <van-icon name="add-o" /> + 新增家长 + </div> + </div> <div class="box"> <template v-for="(item,index) in contactList"> <div class="contact_item" v-if="!hideParent&&item.userType!=1||item.userType==1" :key="index"> - <van-icon class="edit" name="edit" @click="editContact(index)" /> + <van-checkbox class="checkbox" v-model="item.checked" shape="square"></van-checkbox> <div class="info"> <p class="name">{{item.travelerName}}<span v-if="!item.travelerIdCard||!item.gender">需完善</span></p> <p class="des">{{item.userType==1?'学生':'家长'}}·{{item.travelerMobile}}</p> </div> - <van-checkbox v-if="item.userType==1" class="checkbox" v-model="item.checked" shape="square"></van-checkbox> - <van-checkbox v-else class="checkbox" v-model="item.checked" @change="checkboxChange" shape="square"></van-checkbox> + <van-icon class="edit" name="edit" @click="editContact(index)" /> </div> </template> - <div class="add_btn" @click="showAddChildPopupGroup=true"> - <van-icon name="add-o" /> - 新增出行学生 - </div> + </div> <van-button class="btn" type="primary" @click="selectContact">确定</van-button> <van-popup style="background: transparent;" get-container="body" v-model="showAddChildPopupGroup"> - <AddChildPopupGroup @complete="complete"></AddChildPopupGroup> + <AddChildPopupGroup @complete="complete" step='1'></AddChildPopupGroup> </van-popup> </div> </template> <script> import AddChildPopupGroup from '@/views/Home/component/AddChildPopupGroup' -import { Dialog } from 'vant'; export default { data () { return { @@ -92,11 +97,16 @@ export default { userType: contactItem.userType, travelerIdCard: contactItem.travelerIdCard, travelerNum: contactItem.travelerNum, - travelerName: contactItem.travelerName + travelerName: contactItem.travelerName, + gender: contactItem.gender, } localStorage.setItem('editContact', JSON.stringify(editContact)) this.$router.push({ name: 'EditContact' }) }, + // 添加家长 + addContact () { + this.$router.push({ name: 'EditContact', query: { add: 1 } }) + }, complete () { this.showAddChildPopupGroup = false; this.getContactList() @@ -114,28 +124,36 @@ export default { selectedArr.push({ travelerName: contactList[i].travelerName, travelerMobile: contactList[i].travelerMobile, - travelerNum: contactList[i].travelerNum + travelerNum: contactList[i].travelerNum, + userType: contactList[i].userType, }) } } } console.log(this.limit, selectedArr.length) + // 判断出行人数是否符合 if (this.limit && this.limit != selectedArr.length) { this.$toast(`请选择${this.limit}位出行人`) return; } - // console.log(selectedArr) - localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr)) - this.$router.back() - }, - checkboxChange (e) { - if (e == true) { - Dialog.alert({ + // 判断是否选择学生 + let hasStudent = false; + for (let i in selectedArr) { + if (selectedArr[i].userType == 1) { + hasStudent = true + } + } + if (!hasStudent) { + this.$dialog.alert({ title: '温馨提示', message: '活动参与主体为学生本人,请选择出行学生!未绑定学生,请新增出行学生进行添加。', confirmButtonColor: '#3385FF' }) + return; } + // console.log(selectedArr) + localStorage.setItem('selectedContactArr', JSON.stringify(selectedArr)) + this.$router.back() } }, components: { @@ -150,26 +168,38 @@ export default { box-sizing: border-box; padding: 16px 0; background: #f6f7fa; - .box { + .control { width: 702px; margin: 0 auto; padding: 0 24px; - padding-bottom: 200px; box-sizing: border-box; background: #fff; border-radius: 16px; + margin-bottom: 24px; .add_btn { + display: inline-block; + width: 50%; line-height: 104px; font-size: 28px; color: #4092ff; text-align: center; } + } + .box { + width: 702px; + margin: 0 auto; + padding: 0 24px; + padding-bottom: 200px; + box-sizing: border-box; + background: #fff; + border-radius: 16px; + .contact_item { display: flex; align-items: center; justify-content: space-between; .edit { - padding: 20px 20px 20px 0; + padding: 20px 0px 20px 20px; font-size: 40px; color: #4092ff; } @@ -196,7 +226,7 @@ export default { } } .checkbox { - padding: 20px 0 20px 20px; + padding: 20px 20px 20px 0px; } } } @@ -229,10 +259,9 @@ export default { font-size: 40px; } } - .btn{ + .btn { font-size: 40px; } - } } </style> \ No newline at end of file diff --git a/src/views/Service/ServiceBaseKQ.vue b/src/views/Service/ServiceBaseKQ.vue index 52aa53b..ee023b1 100644 --- a/src/views/Service/ServiceBaseKQ.vue +++ b/src/views/Service/ServiceBaseKQ.vue @@ -112,7 +112,6 @@ export default { mounted () { console.log('base mounted') this.initService() - }, activated () { console.log('base activated') @@ -133,7 +132,6 @@ export default { }else if(list=='riverList'){ this.getRiverList() } - }, initService () { this.getUniList() @@ -415,7 +413,6 @@ export default { }, handleRedLink () { location.href = 'https://720yun.com/t/89vkzwd7pfw?scene_id=80780201' - } }, components: { diff --git a/src/views/Travel/classAttestation.vue b/src/views/Travel/classAttestation.vue new file mode 100644 index 0000000..cc1468c --- /dev/null +++ b/src/views/Travel/classAttestation.vue @@ -0,0 +1,124 @@ +/* 集团认领 年级班级*/ +<template> + <div> + <div class="fontBox">已认领</div> + <div class="card"> + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> + <div>2021级01班</div> + <div class="cardItem_grey" @click="switchSchool">取消认领</div> + </div> + </div> + <div class="fontBox">未认领</div> + <div class="treeCard"> + <van-collapse v-model="activeNames" v-for="(v,i) in treeList" :key='i'> + <van-collapse-item title="标题1" :name="i">内容</van-collapse-item> + </van-collapse> + </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, + // + treeList: [ + { + children: [ + {}, + {}, + ] + }, + {}, + {}, + ], + isShow: false, + activeNames: ['1'], + } + }, + methods: { + //切换学校 + switchSchool() { + // this.showSchool = true + }, + // + childrenClick() { + if(this.isShow) {this.isShow = false} + else { + this.isShow = true + } + }, + // + getClass() { + let phone = '18267566730' + let dataList = '绍兴市鲁迅小学' + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/claimSchool?loginMobile=${phone}&schoolNames=${dataList}`).then((res) => { + // this.$toast.clear() + // console.log(res.data) + // if (res.data.code == 200) { + // this.$toast.success('认证成功') + // this.$emit('closeJT') + // } else { + // this.$toast.fail(res.data?.message) + // } + // }) + } + } +} +</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.7vw; + font-weight: bold; + color: #0F1826; +} +.card { + padding: 7vw 5vw 0; + box-sizing: border-box; + + .cardItem { + display: flex; + justify-content: space-between; + margin-bottom: 9vw; + font-size: 3.8vw; + + .cardItem_blue { + color:#4092FF + } + .cardItem_grey { + color:#999999 + } + } + + .treeIem { + margin-bottom: 9vw; + font-size: 3.8vw; + } +} +.treeCard { + padding: 2vw 1vw 0; + box-sizing: border-box; +} +</style> \ No newline at end of file diff --git a/src/views/Travel/component/groupPenson.vue b/src/views/Travel/component/groupPenson.vue new file mode 100644 index 0000000..b8dbc71 --- /dev/null +++ b/src/views/Travel/component/groupPenson.vue @@ -0,0 +1,476 @@ +<template> + <div> + <div class="addchild_group" v-if="step==1"> + <img class="bg" src="@/assets/home/bg2.png" alt=""> + <p class="title">集团管理人员认证</p> + <p class="des">认证完成后可发起集团定制研学活动</p> + <div class="phone_content"> + <div class="item"> + <p class="phone_title">手机号</p> + <div class="flex"> + <input class="code phone" type="tel" maxlength="11" v-model="phone" placeholder="请输入您的手机号"> + <span class="getcode" @click="getCode">{{codeText}}</span> + </div> + </div> + <div class="item"> + <p class="phone_title">验证码</p> + <input class="code" type="text" v-model="code" placeholder="请输入验证码"> + </div> + <button class="submit" @click="checkPhoneAndCode">下一步(1/2)</button> + </div> + </div> + + <div class="addchild_group" v-if="step==2"> + <img class="bg" src="@/assets/home/bg2.png" alt=""> + <p class="title">已查询到相关信息</p> + <p class="des">请仔细确认个人信息后再认领</p> + <div class="child_content"> + <div class="school_box"> + <div class="box" v-for="(v,i) in schoolList" :key="i"> + <div class="box_list"> + <div class="box_name" style="margin:0 0 20px"> + <div class="greyFont">学校:</div> + <div>{{v.schoolName}}</div> + </div> + <!-- <div class="box_name" style="margin:12px 0 40px"> + <div class="greyFont">所在地区:</div> + <div>浙江绍兴 越城区</div> + </div> --> + </div> + <div class="box_check"> + <van-checkbox v-model="v.isAuth" shape="square"></van-checkbox> + </div> + </div> + </div> + <button class="submit" @click="claimChild">完成</button> + </div> + </div> + + <div class="addchild_group" v-if="step==3"> + <img class="bg" src="@/assets/home/bg2.png" alt=""> + <p class="title">暂无相关信息</p> + <p class="des">请确认预留手机号码是否正确</p> + <div class="content"> + <div class="pic"> + <img style="width:100%;height:100%" src="@/assets/Travel/noSchool.png" alt=""> + </div> + <button class="submit" style="margin-top:50px" @click="handleClose">完成</button> + </div> + </div> + + </div> +</template> + +<script> + +import chooseSchool from '@/views/Service/component/chooseSchool' +var codeInterval; +export default { + components: { chooseSchool }, + data () { + return { + step: 1, + publicName: '', + phone: '', + codeText: '获取验证码',//获取验证码按钮文字 + code: '',//验证码 + studentName: '', + showDialog: true, + + claimChildList: [], + + appId: '', + chooseSchoolisShow: false, + + checked: '', + schoolList: [ + + ] + } + }, + + mounted () { + let publicName = localStorage.getItem('publicName') + this.publicName = publicName + let userInfo = localStorage.getItem('userInfo') + this.userInfo = JSON.parse(userInfo); + }, + methods: { + // 获取验证码 + getCode () { + if (this.codeText != '获取验证码') return; + if (!this.phone) { + this.$toast('请输入手机号') + return; + } + if (!this.checkPhone(this.phone)) { + this.$toast('请输入正确的手机号') + return; + } + this.$toast.loading({ + message: '加载中', + duration: 0, + forbidClick: true + }) + this.http.getMsg({ + phone: this.phone + }).then((res) => { + this.$toast.clear() + if (res.success) { + let i = 60; + codeInterval = setInterval(() => { + if (i == 0) { + this.codeText = `获取验证码`; + clearInterval(codeInterval); + return; + } + this.codeText = `重试(${i})`; + i-- + }, 1000) + } else { + this.$toast.fail(res.message) + } + }) + }, + // 获取手机号白名单信息 + checkPhoneAndCode () { + if (!this.phone) { + this.$toast('请输入手机号') + return; + } + if (!this.checkPhone(this.phone)) { + this.$toast('请输入正确的手机号') + return; + } + if (!this.code) { + this.$toast('请输入验证码') + return; + } + this.$toast.loading({ + message: '加载中', + duration: 0, + forbidClick: true + }) + const userInfo = JSON.parse(localStorage.getItem('userInfo')) + + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/checkPhoneAndCode`, { + // "code": this.code, + // "phone": this.phone, + // "unionId": userInfo.unionId, + // 'requestFlag': 2 + // }).then((res) => { + // this.$toast.clear() + // if (res.data.code == 200) { + // if (res.data.data.length == 0) { + // // 白名单无用户 + // this.step = 3; + // } else { + // // 白名单有用户 + // this.schoolList = res.data.data + // this.step = 2; + // } + // } else { + // this.$toast.fail(res.data?.message) + // } + // }) + }, + + // 完成 + claimChild () { + const schoolList = this.schoolList + let dataList = '' + schoolList.forEach(item => { + if(item.isAuth) { + dataList = dataList + item.schoolName + ',' + } + }) + if(dataList) { + dataList = dataList.substring(0 , dataList.length-1); + } + console.log(dataList ) + this.$toast.loading({ + message: '加载中...', + duration: 0, + forbidClick: true + }) + // this.yxAxios.post(`${this.proxyUrl}/prod/user/info/claimSchool?loginMobile=${this.phone}&schoolNames=${dataList}`).then((res) => { + // this.$toast.clear() + // console.log(res.data) + // if (res.data.code == 200) { + // this.$toast.success('认证成功') + // this.$emit('closeJT') + // } else { + // this.$toast.fail(res.data?.message) + // } + // }) + }, + + handleClose () { + this.$emit('closeJT') + }, + checkPhone (phone) { + if ((/^1[3456789]\d{9}$/.test(phone))) { + return true + } else { + return false + } + }, + }, + destroyed () { + clearInterval(codeInterval); + }, +} +</script> +<style lang="scss" scoped> +.addchild_group { + width: 638px; + height: 836px; + background: #ffffff; + border-radius: 24px; + position: relative; + .bg { + width: 100%; + position: absolute; + top: 0; + left: 0; + } + .title { + position: relative; + width: 100%; + padding-top: 70px; + padding-bottom: 8px; + text-align: center; + font-size: 34px; + font-weight: bold; + color: #0857ff; + } + .des { + position: relative; + width: 100%; + box-sizing: border-box; + padding: 0 15%; + text-align: center; + font-size: 24px; + color: #6596ff; + } + .content { + width: 100%; + box-sizing: border-box; + padding: 0 40px; + position: absolute; + top: 236px; + left: 0; + .name { + width: 558px; + height: 50px; + font-size: 28px; + color: #000; + padding-left: 20px; + box-sizing: border-box; + } + .item { + width: 558px; + height: 72px; + border-radius: 36px; + background: #f7f7f7; + box-sizing: border-box; + font-size: 28px; + padding: 0 32px; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 28px; + p { + color: #333333; + &.nodata { + color: #999999; + } + } + img { + width: 40px; + } + input { + width: 100%; + background: transparent; + border: 0; + color: #333333; + padding: 0; + &::-webkit-input-placeholder { + color: #999999; + } + } + .btn { + width: 240px; + height: 55px; + float: right; + font-size: 28px; + background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%); + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), + 0px 8px 12px 0px rgba(89, 199, 171, 0.5); + border-radius: 34px; + border: transparent; + color: #333333; + } + } + .school_select { + font-size: 28px; + padding: 0 32px; + margin-bottom: 28px; + } + .submit { + width: 294px; + height: 72px; + border: 0; + background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%); + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), + 0px 8px 12px 0px rgba(87, 137, 255, 0.5); + border-radius: 34px; + font-size: 34px; + color: #ffffff; + margin: 0 auto; + display: block; + } + .pic { + width: 350px; + height: 350px; + margin: auto + } + } + .child_content { + position: relative; + margin-top: 40px; + .child_box { + height: 500px; + overflow: auto; + padding-left: 100px; + .child_item { + position: relative; + margin-bottom: 50px; + p { + font-size: 28px; + padding: 8px 0; + span { + display: inline-block; + width: 140px; + margin-right: 28px; + color: #999; + } + } + .checkbox { + position: absolute; + top: 115px; + right: 20px; + } + } + } + .school_box { + width: 100%; + height: 500px; + overflow: auto; + font-size: 3.7vw; + padding: 20px 60px 20px 90px ; + box-sizing: border-box; + + .box { + display: flex; + justify-content: space-between; + + .box_list { + .box_name { + display: flex; + + .greyFont { + // width: 160px; + width: 110px; + color: #999999; + } + } + } + .box_check { + + } + } + } + .submit { + width: 438px; + height: 78px; + background: #3385ff; + border-radius: 37px; + border-radius: 39px; + border: 0; + font-size: 34px; + color: #ffffff; + margin: 0 auto; + display: block; + } + } + .phone_content { + width: 100%; + position: absolute; + top: 180px; + left: 0; + box-sizing: border-box; + padding: 40px; + .item { + border-bottom: 1px solid #e2e2e2; + margin-bottom: 30px; + } + .phone_title { + font-size: 34px; + font-weight: bold; + margin-bottom: 28px; + } + .flex { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 22px; + } + .code { + border: 0; + background: transparent; + font-size: 28px; + margin-bottom: 32px; + width: 100%; + } + .phone { + width: 50%; + margin: 0; + } + .getcode { + color: #5789ff; + font-size: 28px; + padding: 10px; + } + .submit { + width: 438px; + height: 78px; + background: #3385ff; + border-radius: 37px; + border-radius: 39px; + border: 0; + font-size: 34px; + color: #ffffff; + margin: 0 auto; + margin-top: 120px; + display: block; + } + } +} + ::v-deep .van-search { + background: transparent; + padding: 0; + width: 100%; +} + ::v-deep .van-search__content { + padding: 0; +} +.schoolBoxF { + width: 100vw; + height: 100vh; + position: absolute; + top: 0; + left: 0; + background-color: #fff; +} +</style> diff --git a/src/views/Travel/component/schoolAdd.vue b/src/views/Travel/component/schoolAdd.vue new file mode 100644 index 0000000..4e89d5f --- /dev/null +++ b/src/views/Travel/component/schoolAdd.vue @@ -0,0 +1,351 @@ +<template> + <div> + <div class="addchild_group" v-if="step==1"> + <img class="bg" src="@/assets/home/bg2.png" alt=""> + <p class="title">选择学校</p> + <p class="des">请选择你关注的学校</p> + <div class="content"> + <!-- <div class="name">选择学校</div> --> + <div class="item"> + <input type="text" placeholder="请选择学校" readonly v-model="school"> + <button type="info" class="btn" @click="chooseSchool">选择学校</button> + </div> + <button class="submit" @click="submit">确定</button> + </div> + </div> + + <van-popup v-model="chooseSchoolisShow" round get-container="body" :safe-area-inset-bottom="true"> + <div v-if="chooseSchoolisShow"> + <chooseSchool v-model="chooseSchoolisShow" @schoolData='schoolData'></chooseSchool> + </div> + </van-popup> + </div> +</template> + +<script> + +import chooseSchool from '@/views/Service/component/chooseSchool' +export default { + components: { chooseSchool }, + data () { + return { + step: 1, + phone: '', + codeText: '获取验证码',//获取验证码按钮文字 + code: '',//验证码 + studentName: '', + userInfo: {}, + + searchSchool: '', + school: '', + schoolId: '', + + chooseSchoolisShow: false + } + }, + + mounted () { + let userInfo = localStorage.getItem('userInfo') + this.userInfo = JSON.parse(userInfo); + }, + methods: { + submit () { + if (!this.school) { + this.$toast('请选择学校'); + } else { + let postData = { + userNum: this.userInfo.centerNo, + contactsName: this.userInfo.nickName, + contactsMobile: this.userInfo.phone, + loginMobile: this.userInfo.phone, + schoolName: this.school, + contactsType: this.userInfo.userType, + } + this.$toast.loading({ + message: '加载中', + duration: 0, + forbidClick: true + }) + console.log(postData) + this.yxAxios.post(`${this.proxyUrl}/prod/user/info/addContacts`, postData).then((res) => { + this.$toast.clear() + if (res.data.code == 200) { + this.$toast.success('关注成功') + this.$emit('closeAdd') + this.getUserInfoXST() + } else { + this.$toast.fail(res.message) + } + }) + } + }, + //选择学校 + chooseSchool () { + // this.$router.push({name: 'chooseSchool'}) + this.chooseSchoolisShow = true + }, + schoolData (val) { + this.school = val.text; + this.schoolId = val.id; + }, + // 获取用户信息 + getUserInfoXST () { + this.$toast.loading({ + message: '加载中...', + duration: 0, + forbidClick: true + }) + let appid = '' + let publicName = localStorage.getItem('publicName') + if( publicName == 'XST'){ + appid = 'wx1c630c8773c482f1' + }else if (publicName == 'SXYX') { + appId = 'wx1305e88d2bc74073' + } else if (publicName == 'XST') { + appId = 'wx1c630c8773c482f1' + } else if (publicName == 'KQ') { + appId = 'wx1305e88d2bc74073' + } + + this.yxAxios.get(`${this.proxyUrl}/prod/api/wx/${appid}/getUserInfo?unionId=${localStorage.getItem('unionId')}`).then((res) => { + this.$toast.clear() + if (res.data.code == 200) { + localStorage.setItem('userInfo', JSON.stringify(res.data.data)) + + if(res.data.data.schoolNames || res.data.data.schoolNames == [] || res.data.data.schoolNames == 'null') { + localStorage.setItem('schoolNames',JSON.stringify(res.data.data.schoolNames)) + this.$store.commit('changeSchool', res.data.data.schoolNames) + if(!localStorage.getItem('schoolNamesChoose')) { + localStorage.setItem('schoolNamesChoose',res.data.data.schoolNames[0]) + } + }else { + localStorage.setItem('schoolNames',[]) + this.$store.commit('changeSchool', []) + } + } + }) + }, + }, +} +</script> +<style lang="scss" scoped> +.addchild_group { + width: 638px; + // height: 836px; + height: 496px; + background: #ffffff; + border-radius: 24px; + position: relative; + .bg { + width: 100%; + position: absolute; + top: 0; + left: 0; + } + .title { + position: relative; + width: 100%; + padding-top: 70px; + padding-bottom: 8px; + text-align: center; + font-size: 34px; + font-weight: bold; + color: #0857ff; + } + .des { + position: relative; + width: 100%; + box-sizing: border-box; + padding: 0 15%; + text-align: center; + font-size: 24px; + color: #6596ff; + } + .content { + width: 100%; + box-sizing: border-box; + padding: 0 40px; + position: absolute; + top: 236px; + left: 0; + .name { + width: 558px; + height: 50px; + font-size: 28px; + color: #000; + padding-left: 20px; + box-sizing: border-box; + } + .item { + width: 558px; + height: 72px; + border-radius: 36px; + background: #f7f7f7; + box-sizing: border-box; + font-size: 28px; + padding: 0 32px; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 28px; + p { + color: #333333; + &.nodata { + color: #999999; + } + } + img { + width: 40px; + } + input { + width: 100%; + background: transparent; + border: 0; + color: #333333; + padding: 0; + &::-webkit-input-placeholder { + color: #999999; + } + } + .btn { + width: 240px; + height: 55px; + float: right; + font-size: 28px; + background: linear-gradient(135deg, #cdf8cf 0%, #8af36f 100%); + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), + 0px 8px 12px 0px rgba(89, 199, 171, 0.5); + border-radius: 34px; + border: transparent; + color: #333333; + } + } + .school_select { + font-size: 28px; + padding: 0 32px; + margin-bottom: 28px; + } + .submit { + width: 294px; + height: 72px; + border: 0; + background: linear-gradient(135deg, #99c2ff 0%, #1f59ff 100%); + box-shadow: 0px 4px 8px 0px rgba(189, 189, 189, 0.5), + 0px 8px 12px 0px rgba(87, 137, 255, 0.5); + border-radius: 34px; + font-size: 34px; + color: #ffffff; + margin: 55px auto 0; + display: block; + } + } + .child_content { + position: relative; + margin-top: 40px; + .child_box { + height: 500px; + overflow: auto; + padding-left: 100px; + .child_item { + position: relative; + margin-bottom: 50px; + p { + font-size: 28px; + padding: 8px 0; + span { + display: inline-block; + width: 140px; + margin-right: 28px; + color: #999; + } + } + .checkbox { + position: absolute; + top: 115px; + right: 20px; + } + } + } + .submit { + width: 438px; + height: 78px; + background: #3385ff; + border-radius: 37px; + border-radius: 39px; + border: 0; + font-size: 34px; + color: #ffffff; + margin: 0 auto; + display: block; + } + } + .phone_content { + width: 100%; + position: absolute; + top: 180px; + left: 0; + box-sizing: border-box; + padding: 40px; + .item { + border-bottom: 1px solid #e2e2e2; + margin-bottom: 30px; + } + .phone_title { + font-size: 34px; + font-weight: bold; + margin-bottom: 28px; + } + .flex { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 22px; + } + .code { + border: 0; + background: transparent; + font-size: 28px; + margin-bottom: 32px; + width: 100%; + } + .phone { + width: 50%; + margin: 0; + } + .getcode { + color: #5789ff; + font-size: 28px; + padding: 10px; + } + .submit { + width: 438px; + height: 78px; + background: #3385ff; + border-radius: 37px; + border-radius: 39px; + border: 0; + font-size: 34px; + color: #ffffff; + margin: 0 auto; + margin-top: 120px; + display: block; + } + } +} + ::v-deep .van-search { + background: transparent; + padding: 0; + width: 100%; +} + ::v-deep .van-search__content { + padding: 0; +} +.schoolBoxF { + width: 100vw; + height: 100vh; + position: absolute; + top: 0; + left: 0; + background-color: #fff; +} +</style> diff --git a/src/views/Travel/schoolAttestation.vue b/src/views/Travel/schoolAttestation.vue new file mode 100644 index 0000000..6567c91 --- /dev/null +++ b/src/views/Travel/schoolAttestation.vue @@ -0,0 +1,74 @@ +/* 认证学校*/ +<template> + <div> + <div class="fontBox"></div> + <div class="card"> + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> + <div @click="switchClass">{{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: true, schoolName: "绍兴市鲁迅小学"}, + // {isAuth: false, schoolName: "测试学校"}, + {isAuth: true, schoolName: "柯桥学校"}, + ], + showSchool: false + } + }, + methods: { + //切换学校 + switchSchool() { + localStorage.setItem('backRZ',true) + this.$router.push({name: localStorage.getItem('prePage') }) + }, + //选择班级 + switchClass() { + this.$router.push({name: 'classAttestation'}) + } + } +} +</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> \ No newline at end of file diff --git a/src/views/Travel/schoolFollow.vue b/src/views/Travel/schoolFollow.vue new file mode 100644 index 0000000..a7906af --- /dev/null +++ b/src/views/Travel/schoolFollow.vue @@ -0,0 +1,73 @@ +/* 关注学校*/ +<template> + <div> + <div class="fontBox">请选择关注学校</div> + <div class="card"> + <div class="cardItem" v-for="(v,i) in schoolList" :key="i"> + <div>{{v}}</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',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> \ No newline at end of file -- libgit2 0.21.0