master
parent
605627780c
commit
020e92879e
|
@ -736,6 +736,10 @@ textarea {
|
|||
background-repeat: no-repeat;
|
||||
background-size: .22rem .12rem;
|
||||
background-position: center right;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.addr-select>div{
|
||||
width: 100%;
|
||||
|
|
|
@ -10,7 +10,6 @@ Vue.prototype.HOME = '/api'
|
|||
|
||||
axios.interceptors.request.use(config => {
|
||||
if (config.url!="/api/api/user/login-by-Phone"&&config.url!="/api/api/common/send-sms-captcha") {
|
||||
|
||||
if (!localStorage.userData) {
|
||||
window.alert("请登陆")
|
||||
router.replace('/');
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div class="ask pull-content list-section">
|
||||
<div class="ask-top">
|
||||
<span><img src="../../../assets/images/home/expert/expert-list.jpg" ></span>
|
||||
<span><img :src="host + expertDetail.avatar" ></span>
|
||||
<p>请使用以下两种方式加入钉钉专属服务群,我 在您的专属服务群回答您的问题。</p>
|
||||
</div>
|
||||
<div class="ask-mode-item">
|
||||
|
@ -17,12 +17,12 @@
|
|||
<div class="ask-mode-list">
|
||||
<div class="ask-mode-txt" v-show="isActive">
|
||||
<p>下载二维码并用钉钉扫一扫进入专属群</p>
|
||||
<img src="../../../assets/images/home/expert/ewm.jpg" alt="">
|
||||
<img :src="host + expertDetail.im_group_qr">
|
||||
<span>点击下载二维码</span>
|
||||
</div>
|
||||
<div class="ask-mode-txt" v-show="!isActive">
|
||||
<p>专属群DingTalk链接<span>(复制此链接,在浏览器地址栏粘贴后打开钉钉, 自动进入专属群)</span></p>
|
||||
<div class="mode-links">{{linkUrl}}</div>
|
||||
<div class="mode-links">{{expertDetail.im_group_link}}</div>
|
||||
<span @click="copyUrl()">点击复制此链接</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,30 +37,49 @@
|
|||
return {
|
||||
isScrollTop: false,
|
||||
isActive: true,
|
||||
linkUrl: 'dingtalk://dingtalkclient/page/link?pc_slide=true&url=https%3A%2F%2Fh5.dingtalk.com%2Fservice-group%2Findex.html%3FjoinGroupCode%3Dp3cAnJVnxMMiPvkT1zJLiiup35T4nkdE3uNFJIiiUkGhZSCsiSL0qydvCuolCftWNT7C%23%2Fjoin-group'
|
||||
id:'',
|
||||
expertDetail:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.id = this.$route.query.id;
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getDetailData();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 获取专家详情
|
||||
getDetailData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-info", {
|
||||
id: that.id
|
||||
})
|
||||
.then(function (res) {
|
||||
console.log(res,111111);
|
||||
that.expertDetail = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 复制链接
|
||||
copyUrl(){
|
||||
let input = document.createElement("input"); // 直接构建input
|
||||
input.value = this.linkUrl; // 设置内容
|
||||
document.body.appendChild(input); // 添加临时实例
|
||||
input.select(); // 选择实例内容
|
||||
document.execCommand("Copy"); // 执行复制
|
||||
document.body.removeChild(input); // 删除临时实例
|
||||
alert("链接复制成功")
|
||||
if(this.expertDetail.im_group_link != ''){
|
||||
let input = document.createElement("input"); // 直接构建input
|
||||
input.value = this.expertDetail.im_group_link; // 设置内容
|
||||
document.body.appendChild(input); // 添加临时实例
|
||||
input.select(); // 选择实例内容
|
||||
document.execCommand("Copy"); // 执行复制
|
||||
document.body.removeChild(input); // 删除临时实例
|
||||
alert("链接复制成功")
|
||||
}
|
||||
},
|
||||
|
||||
// 滚动改变样式
|
||||
eventScrollTop() {
|
||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.id = this.$route.params.id;
|
||||
this.id = this.$route.query.id;
|
||||
},
|
||||
mounted() {
|
||||
this.getDetailData();
|
||||
|
@ -80,6 +80,19 @@
|
|||
|
||||
},
|
||||
methods: {
|
||||
// 获取专家详情
|
||||
getDetailData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-info", {
|
||||
id: that.id
|
||||
})
|
||||
.then(function (res) {
|
||||
that.expertDetail = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动显示头部
|
||||
eventScrollTop() {
|
||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
|
@ -94,18 +107,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// 获取专家详情
|
||||
getDetailData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-info", {
|
||||
id: that.id
|
||||
})
|
||||
.then(function (res) {
|
||||
// console.log(res.data.data,111111);
|
||||
that.expertDetail = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="content main-content">
|
||||
<div class="content main-content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{'header':true,'scroll white':isScrollTop}">
|
||||
<div class="back"></div>
|
||||
|
@ -7,16 +7,16 @@
|
|||
</div>
|
||||
<!-- 轮播图 -->
|
||||
<div class="banner">
|
||||
<img src="../../../assets/images/home/expert/banner.jpg" alt="">
|
||||
<img :src="host + bannerSrc?host + bannerSrc:''">
|
||||
</div>
|
||||
<!-- 领取咨询机会 -->
|
||||
<div class="expert-receive" @click="goPage('/information')" v-if="isReceive==0">
|
||||
<img src="../../../assets/images/home/expert/notice-01.png" alt="">
|
||||
<img src="../../../assets/images/home/expert/notice-01.png">
|
||||
<p>完善信息,立即领取免费咨询卡(1小时)</p>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="expert-receive expert-receive-01" v-if="isReceive==1">
|
||||
<img src="../../../assets/images/home/expert/notice-02.png" alt="">
|
||||
<img src="../../../assets/images/home/expert/notice-02.png">
|
||||
<p>您已领取一小时免费咨询权益,可向专家进行提问</p>
|
||||
</div>
|
||||
<!-- 导航 -->
|
||||
|
@ -24,27 +24,18 @@
|
|||
<ul class="expert-nav-item">
|
||||
<li :class="{'active':current==index}" v-for="(item,index) in navData" :key="index" @click="changeNav(index)">{{item.title}}</li>
|
||||
</ul>
|
||||
<!-- 城市 -->
|
||||
<div class="addr-select">
|
||||
<div @click="openAddr()">{{addrData[addrIndex].title}}</div>
|
||||
<div @click="openAddr()">{{addrData[addrIndex].name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 地址弹出框 -->
|
||||
<div class="addr-select-bg" v-show="isAddr" @click="isAddr=!isAddr"></div>
|
||||
<div class="addr-select-item" v-show="isAddr">
|
||||
<div class="addr-btns">
|
||||
<span>请选择城市</span>
|
||||
<span @click="isAddr=!isAddr">取消</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)" v-for="(item,index) in addrData" :key="index">{{item.title}}<img v-show="index==addrIndex" src="../../../assets/images/home/expert/yes.png"></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 咨询师列表 -->
|
||||
<div class="expert-list-all section">
|
||||
<ul class="expert-list">
|
||||
<li v-for="(item,index) in expertData" :key="index">
|
||||
<div class="expert-list-con" @click="goPage('/expert/detail')">
|
||||
<div class="expert-list-img"><img :src="host + item.avatar" alt=""></div>
|
||||
<div class="expert-list-con" @click="toDetail(item.id)">
|
||||
<div class="expert-list-img"><img :src="host + item.avatar"></div>
|
||||
<div class="expert-list-txt">
|
||||
<div class="title">
|
||||
<h2>{{item.name}}</h2>
|
||||
|
@ -61,12 +52,29 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="expert-list-btns">
|
||||
<div :class="{'btn':true,'noservice':isReceive==0}" @click="toAsk()">向TA提问</div>
|
||||
<div :class="{'btn':true,'noservice':isReceive==0}" @click="toAsk(item.id)">向TA提问</div>
|
||||
<div class="btn" @click="toDetail(item.id)">查看详情</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 地址弹出框 -->
|
||||
<div class="addr-select-bg" v-show="isAddr" @click="isAddr=!isAddr"></div>
|
||||
<div class="addr-select-item" v-show="isAddr">
|
||||
<div class="addr-btns">
|
||||
<span>请选择城市</span>
|
||||
<span @click="isAddr=!isAddr">取消</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)" v-for="(item,index) in addrData" :key="index">
|
||||
{{item.name}}
|
||||
<img v-show="index==addrIndex" src="../../../assets/images/home/expert/yes.png">
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 领取咨询卡弹出框 -->
|
||||
<div class="my-confirm-bg" v-show="isConfirm" @click="isConfirm=!isConfirm"></div>
|
||||
<div class="my-confirm" v-show="isConfirm">
|
||||
<p>您还未领取免费咨询卡,请前往领取!</p>
|
||||
|
@ -75,65 +83,54 @@
|
|||
<span @click="closeEV()">取消</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部 -->
|
||||
<tabbar :current="2"></tabbar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from '../../../components/tabbar.vue'
|
||||
export default {
|
||||
name: "expert",
|
||||
export default {
|
||||
name: "expert",
|
||||
components: {
|
||||
tabbar
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
name: '',
|
||||
isReceive: 1, //是否领取咨询机会
|
||||
current: 0,
|
||||
isConfirm: false,
|
||||
navData: [
|
||||
{title:'所有专家'},
|
||||
{title:'最近活跃'},
|
||||
{title:'多元升学'}
|
||||
],
|
||||
|
||||
addrData:[
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'}
|
||||
],
|
||||
bannerSrc: '', //banner图地址
|
||||
navData: [{
|
||||
title: '所有专家'
|
||||
}, {
|
||||
title: '最近活跃'
|
||||
}, {
|
||||
title: '多元升学'
|
||||
}],
|
||||
expertData: [], //专家列表
|
||||
addrData: [],
|
||||
addrIndex: 0,
|
||||
isAddr: false, //城市列表是否显示
|
||||
addrValue:'', //选择城市编号
|
||||
|
||||
expertData: [],
|
||||
}
|
||||
addrValue: '', //选择城市编号
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
mounted() {
|
||||
this.getExpertData()
|
||||
this.getBanner();
|
||||
this.getExpertData();
|
||||
this.getAddrData();
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
// 导航切换
|
||||
changeNav(index){
|
||||
switch(index) {
|
||||
changeNav(index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
this.current = 0;
|
||||
break;
|
||||
|
@ -148,30 +145,95 @@
|
|||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 获取banner
|
||||
getBanner() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/dictionary/get-slide-list", {
|
||||
position: "h5_expert_banner",
|
||||
})
|
||||
.then(function(res) {
|
||||
that.bannerSrc = res.data.data[0].src;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取专家列表
|
||||
getExpertData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-list", {
|
||||
page: "1",
|
||||
size: "100",
|
||||
})
|
||||
.then(function(res) {
|
||||
that.expertData = res.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取城市列表
|
||||
getAddrData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/area/index", {
|
||||
pcode: 86
|
||||
})
|
||||
.then(function(res) {
|
||||
that.addrData = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 城市选择
|
||||
openAddr(){
|
||||
this.isAddr=!this.isAddr;
|
||||
openAddr() {
|
||||
this.isAddr = !this.isAddr;
|
||||
},
|
||||
getAddrValue(index,item){
|
||||
this.addrValue = item.title;
|
||||
getAddrValue(index, item) {
|
||||
this.addrValue = item.code;
|
||||
this.addrIndex = index;
|
||||
this.isAddr=false;
|
||||
this.isAddr = false;
|
||||
},
|
||||
|
||||
|
||||
// 关闭提示框
|
||||
closeEV() {
|
||||
this.isConfirm = false;
|
||||
},
|
||||
|
||||
|
||||
// 向TA提问
|
||||
toAsk(){
|
||||
if(this.isReceive == 1){
|
||||
this.$router.push('/expert/ask');
|
||||
}else if(this.isReceive == 0){
|
||||
toAsk(id) {
|
||||
if (this.isReceive == 1) {
|
||||
this.$router.push({
|
||||
path: '/expert/ask',
|
||||
name: 'expert-ask',
|
||||
query: {
|
||||
id: id
|
||||
},
|
||||
});
|
||||
} else if (this.isReceive == 0) {
|
||||
this.isConfirm = true;
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭提示框
|
||||
closeEV(){
|
||||
this.isConfirm = false;
|
||||
|
||||
// 跳转到详情页
|
||||
toDetail(id) {
|
||||
this.$router.push({
|
||||
path: '/expert/detail',
|
||||
name: 'expert-detail',
|
||||
query: {
|
||||
id: id
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
// 页面跳转
|
||||
goPage(path) {
|
||||
this.$router.push(path);
|
||||
},
|
||||
|
||||
// 滚动显示头部
|
||||
eventScrollTop() {
|
||||
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
|
@ -186,34 +248,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// 获取专家列表
|
||||
getExpertData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-list", {
|
||||
page: "1",
|
||||
size: "10",
|
||||
})
|
||||
.then(function (res) {
|
||||
console.log(res.data.data,121212);
|
||||
that.expertData = res.data.data.list;
|
||||
});
|
||||
},
|
||||
// 跳转到详情页
|
||||
toDetail(id) {
|
||||
this.$router.push({
|
||||
path: '/expert/detail',
|
||||
name: 'expert-detail',
|
||||
params: {
|
||||
id: id
|
||||
},
|
||||
})
|
||||
},
|
||||
// 页面跳转
|
||||
goPage(path){
|
||||
this.$router.push(path);
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
|
@ -226,12 +261,12 @@
|
|||
deactivated() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.banner,
|
||||
.banner img{
|
||||
.banner img {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -1,230 +1,219 @@
|
|||
<template>
|
||||
<div class="content main-content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop }">
|
||||
<div class="back"></div>
|
||||
<div class="header-title">首页</div>
|
||||
</div>
|
||||
<!-- 轮播图 -->
|
||||
<div class="banner-wrap">
|
||||
<div class="swiper-container" ref="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide">
|
||||
<img :src="host + bannerSrc" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-pagination" ref="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 领取咨询卡 -->
|
||||
<div
|
||||
class="index-receive"
|
||||
@click="goPage('/information')"
|
||||
v-if="consult_amount == 0"
|
||||
>
|
||||
<img src="../../assets/images/home/index/receive.jpg" alt="" />
|
||||
<span>完善信息,立即领取免费咨询卡(1小时)</span>
|
||||
</div>
|
||||
<!-- 专家 -->
|
||||
<div class="index-expert section">
|
||||
<div class="index-title">
|
||||
<h2>专家<em>团队</em></h2>
|
||||
<span @click="goPage('/expert')">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-expert-list">
|
||||
<li v-for="(item, index) in expertData" :key="index">
|
||||
<div class="expert-img">
|
||||
<img :src="host + item.avatar" alt="" />
|
||||
</div>
|
||||
<div class="expert-name">
|
||||
{{ item.name }}<span>{{ item.keywords_list[1] }}</span>
|
||||
</div>
|
||||
<div class="expert-honor">
|
||||
<span>{{ item.keywords_list[0] }}</span>
|
||||
<span>{{ item.keywords_list[1] }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 计划 -->
|
||||
<div class="index-plan">
|
||||
<ul class="index-plan-list">
|
||||
<li v-for="(item, index) in planData" :key="index">
|
||||
<img src="../../assets/images/home/index/plan-01.png" alt="" />
|
||||
<p>{{ item.title }}</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 测评 -->
|
||||
<div class="index-evaluation section">
|
||||
<div class="index-title">
|
||||
<h2>专业<em>测评</em></h2>
|
||||
<span @click="goPage('/evaluation')">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-evaluation-list">
|
||||
<li
|
||||
@click="cpUrl()"
|
||||
v-for="(item, index) in evaluationData"
|
||||
:key="index"
|
||||
>
|
||||
<div class="evaluation-img">
|
||||
<img
|
||||
src="../../assets/images/home/index/evaluation-01.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<p>{{ item.title }}</p>
|
||||
<div class="evaluation-btn" @click="goPage()">进入测评</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 直播 -->
|
||||
<div class="index-live section">
|
||||
<div class="index-title">
|
||||
<h2>有谱<em>直播</em></h2>
|
||||
<span @click="goPage()">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-live-list">
|
||||
<li><img src="../../assets/images/home/index/live-01.png" alt="" /></li>
|
||||
<li><img src="../../assets/images/home/index/live-02.png" alt="" /></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 头条 -->
|
||||
<div class="index-headlines section">
|
||||
<div class="index-title">
|
||||
<h2>有谱<em>头条</em></h2>
|
||||
<span @click="goPage()">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-headlines-list">
|
||||
<li v-for="(item, index) in headlinesData" :key="index">
|
||||
<p>{{ item.title }}</p>
|
||||
<span>{{ item.time }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<tabbar :current="1"></tabbar>
|
||||
</div>
|
||||
<div class="content main-content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop }">
|
||||
<div class="back"></div>
|
||||
<div class="header-title">首页</div>
|
||||
</div>
|
||||
<!-- 轮播图 -->
|
||||
<div class="banner-wrap">
|
||||
<div class="swiper-container" ref="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide">
|
||||
<img :src="host + bannerSrc" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-pagination" ref="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 领取咨询卡 -->
|
||||
<div class="index-receive" @click="goPage('/information')" v-if="consult_amount == 0">
|
||||
<img src="../../assets/images/home/index/receive.jpg" />
|
||||
<span>完善信息,立即领取免费咨询卡(1小时)</span>
|
||||
</div>
|
||||
<!-- 专家 -->
|
||||
<div class="index-expert section">
|
||||
<div class="index-title">
|
||||
<h2>专家<em>团队</em></h2>
|
||||
<span @click="goPage('/expert')">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-expert-list">
|
||||
<li v-for="(item, index) in expertData" :key="index">
|
||||
<div class="expert-img">
|
||||
<img :src="host + item.avatar"/>
|
||||
</div>
|
||||
<div class="expert-name">
|
||||
{{item.name}}<span>{{item.keywords_list[1]}}</span>
|
||||
</div>
|
||||
<div class="expert-honor">
|
||||
<span>{{item.keywords_list[0]}}</span>
|
||||
<span>{{item.keywords_list[1]}}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 计划 -->
|
||||
<div class="index-plan">
|
||||
<ul class="index-plan-list">
|
||||
<li>
|
||||
<img src="../../assets/images/home/index/plan-01.png"/>
|
||||
<p>强基计划</p>
|
||||
</li>
|
||||
<li>
|
||||
<img src="../../assets/images/home/index/plan-02.png"/>
|
||||
<p>综合评价</p>
|
||||
</li>
|
||||
<li>
|
||||
<img src="../../assets/images/home/index/plan-03.png"/>
|
||||
<p>专项计划</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 测评 -->
|
||||
<div class="index-evaluation section">
|
||||
<div class="index-title">
|
||||
<h2>专业<em>测评</em></h2>
|
||||
<span @click="goPage('/evaluation')">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-evaluation-list">
|
||||
<li>
|
||||
<div class="evaluation-img">
|
||||
<img src="../../assets/images/home/index/evaluation-01.png"/>
|
||||
</div>
|
||||
<p>霍兰德职业兴趣测评</p>
|
||||
<div class="evaluation-btn" @click="toEvaluation()">进入测评</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="evaluation-img">
|
||||
<img src="../../assets/images/home/index/evaluation-02.png"/>
|
||||
</div>
|
||||
<p>MBIT职业性格测试</p>
|
||||
<div class="evaluation-btn" @click="toEvaluation()">进入测评</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 直播 -->
|
||||
<div class="index-live section">
|
||||
<div class="index-title">
|
||||
<h2>有谱<em>直播</em></h2>
|
||||
<span @click="goPage()">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-live-list">
|
||||
<li><img src="../../assets/images/home/index/live-01.png"/></li>
|
||||
<li><img src="../../assets/images/home/index/live-02.png"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 头条 -->
|
||||
<div class="index-headlines section">
|
||||
<div class="index-title">
|
||||
<h2>有谱<em>头条</em></h2>
|
||||
<span @click="goPage()">查看更多</span>
|
||||
</div>
|
||||
<ul class="index-headlines-list">
|
||||
<li v-for="(item, index) in headlinesData" :key="index">
|
||||
<p><a href="https://wwww.baidu.com">{{ item.title }}</a></p>
|
||||
<span>{{ item.time }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<tabbar :current="1"></tabbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tabbar from "../../components/tabbar.vue";
|
||||
export default {
|
||||
name: "index",
|
||||
components: {
|
||||
tabbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
isReceive: 0, //是否完善资料
|
||||
bannerSrc: "",
|
||||
expertData: [
|
||||
{
|
||||
name: "赵晓",
|
||||
imgSrc: "",
|
||||
year: "从业5年",
|
||||
honor: [{ title: "硕士" }, { title: "中科院" }],
|
||||
},
|
||||
{
|
||||
name: "赵晓",
|
||||
imgSrc: "",
|
||||
year: "从业3年",
|
||||
honor: [{ title: "硕士" }, { title: "中科院" }],
|
||||
},
|
||||
{
|
||||
name: "赵晓",
|
||||
imgSrc: "",
|
||||
year: "从业8年",
|
||||
honor: [{ title: "硕士" }, { title: "中科院" }],
|
||||
},
|
||||
],
|
||||
planData: [
|
||||
{ imgSrc: "", title: "强基计划" },
|
||||
{ imgSrc: "", title: "综合评价" },
|
||||
{ imgSrc: "", title: "专项计划" },
|
||||
],
|
||||
evaluationData: [
|
||||
{ imgSrc: "", title: "霍兰德职业兴趣测评" },
|
||||
{ imgSrc: "", title: "MBIT职业性格测试" },
|
||||
],
|
||||
headlinesData: [
|
||||
{ title: "全国各省市最好大学+王牌专业盘点", time: "2022年2月12日" },
|
||||
{
|
||||
title: "批次、批次线、大类招生到底是什么??20个名词帮 你快速了解",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title: "教育部公布2021年度全国高等学校名单,共计3012所",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title: "人民日报权威解读:热门专业和相似专业如何区分!",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title:
|
||||
"比普通批低100多分!从高一准备到高三报考,2022 年强基计划最新报考指南",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.consult_amount = JSON.parse(localStorage.userData).consult_amount;
|
||||
},
|
||||
mounted() {
|
||||
this.getBanner();
|
||||
this.getExpertData();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
cpUrl() {
|
||||
this.$router.push({
|
||||
path: "/evaluation",
|
||||
});
|
||||
},
|
||||
getBanner() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/dictionary/get-slide-list", {
|
||||
position: "h5_home_banner",
|
||||
})
|
||||
.then(function (res) {
|
||||
that.bannerSrc = res.data.data[0].src;
|
||||
});
|
||||
},
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取专家列表
|
||||
getExpertData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-list", {
|
||||
page: "1",
|
||||
size: "3",
|
||||
})
|
||||
.then(function (res) {
|
||||
console.log(res.data.data);
|
||||
that.expertData = res.data.data.list;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
import tabbar from "../../components/tabbar.vue";
|
||||
export default {
|
||||
name: "index",
|
||||
components: {
|
||||
tabbar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
isReceive: 0, //是否完善资料
|
||||
bannerSrc: "",
|
||||
expertData: [], //专家列表
|
||||
headlinesData: [{
|
||||
title: "全国各省市最好大学+王牌专业盘点",
|
||||
time: "2022年2月12日"
|
||||
},
|
||||
{
|
||||
title: "批次、批次线、大类招生到底是什么??20个名词帮 你快速了解",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title: "教育部公布2021年度全国高等学校名单,共计3012所",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title: "人民日报权威解读:热门专业和相似专业如何区分!",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
{
|
||||
title: "比普通批低100多分!从高一准备到高三报考,2022 年强基计划最新报考指南",
|
||||
time: "2022年2月12日",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.consult_amount = JSON.parse(localStorage.userData).consult_amount;
|
||||
},
|
||||
mounted() {
|
||||
this.getBanner();
|
||||
this.getExpertData();
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// 测试跳转
|
||||
toEvaluation() {
|
||||
this.$router.push({
|
||||
path: "/evaluation",
|
||||
});
|
||||
},
|
||||
|
||||
// 获取banner
|
||||
getBanner() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/dictionary/get-slide-list", {
|
||||
position: "h5_home_banner",
|
||||
})
|
||||
.then(function(res) {
|
||||
that.bannerSrc = res.data.data[0].src;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 获取专家列表
|
||||
getExpertData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/consumer/expert-list", {
|
||||
page: "1",
|
||||
size: "3",
|
||||
})
|
||||
.then(function(res) {
|
||||
console.log(res.data.data);
|
||||
that.expertData = res.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转页面
|
||||
goPage(path){
|
||||
this.$router.push(path);
|
||||
},
|
||||
|
||||
// 滚动显示头部
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -1,232 +1,187 @@
|
|||
<template>
|
||||
<div class="content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop, white: true }">
|
||||
<div class="back"></div>
|
||||
<div class="header-title">登录</div>
|
||||
</div>
|
||||
<div class="login pull-content list-section">
|
||||
<div class="login-txt">
|
||||
<div class="logo">
|
||||
<img src="../assets/images/login/logo.png" alt="" />
|
||||
</div>
|
||||
<div class="company">有谱志愿</div>
|
||||
<div class="phone-number" v-if="mode == 1">
|
||||
<span>手机号</span>
|
||||
<input type="text" v-model="phoneNumber" placeholder="请输入手机号" />
|
||||
</div>
|
||||
<div class="agreement">
|
||||
<span
|
||||
:class="{ checked: isAgreement }"
|
||||
@click="isAgreement = !isAgreement"
|
||||
><img
|
||||
v-show="isAgreement"
|
||||
src="../assets/images/login/yes.png"
|
||||
alt=""
|
||||
/></span>
|
||||
<p>
|
||||
我已阅读并同意<span>《有谱志愿用户协议》</span>、<span>《隐私政策》</span>,未注册将引导完成账号注册
|
||||
</p>
|
||||
</div>
|
||||
<div class="login-btns">
|
||||
<span @click="nailLogin()" v-if="mode == 0" class="nail-btn"
|
||||
><img src="../assets/images/login/nail.png" />钉钉授权登录</span
|
||||
>
|
||||
<span @click="phoneLogin()" v-if="mode == 1">获取验证码</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-mode">
|
||||
<div class="mode-title"><span></span>其他登录方式<span></span></div>
|
||||
<ul class="mode-item">
|
||||
<li>
|
||||
<span @click="changeMode(0)"
|
||||
><img src="../assets/images/login/nail.png"
|
||||
/></span>
|
||||
<p :class="{ active: mode == 0 }">当前登录方式</p>
|
||||
</li>
|
||||
<li>
|
||||
<span @click="changeMode(1)"
|
||||
><img src="../assets/images/login/phone.png"
|
||||
/></span>
|
||||
<p :class="{ active: mode == 1 }">当前登录方式</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 阅读协议弹窗 -->
|
||||
<div
|
||||
class="my-confirm-bg"
|
||||
v-show="openAgreement"
|
||||
@click="openAgreement = !openAgreement"
|
||||
></div>
|
||||
<div class="my-confirm my-confirm2" v-show="openAgreement">
|
||||
<p>您还未阅读并同意授权</p>
|
||||
<div class="confirm-btns">
|
||||
<span @click="openAgreement = false">确认</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 钉钉授权登录弹窗 -->
|
||||
<div
|
||||
class="addr-select-bg"
|
||||
v-show="openEmpower"
|
||||
@click="openEmpower = !openEmpower"
|
||||
></div>
|
||||
<div class="nail-popup" v-show="openEmpower">
|
||||
<div class="nail-popup-title">
|
||||
<span><img src="../assets/images/login/logo.png" alt="" /></span>
|
||||
<p>有谱志愿</p>
|
||||
<em>申请</em>
|
||||
</div>
|
||||
<p>获取您的钉钉昵称</p>
|
||||
<div class="nick-name">
|
||||
<span>钉钉昵称</span>
|
||||
<p>张三<img src="../assets/images/login/green-yes.png" alt="" /></p>
|
||||
</div>
|
||||
<div class="nail-popup-btns">
|
||||
<span @click="isEmpower()">同意</span>
|
||||
<span @click="noEmpower()">拒绝</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 手机验证弹窗 -->
|
||||
<div
|
||||
class="my-confirm-bg"
|
||||
v-show="openPhoneTips"
|
||||
@click="openPhoneTips = !openPhoneTips"
|
||||
></div>
|
||||
<div class="my-confirm my-confirm2" v-show="openPhoneTips">
|
||||
<!-- <p>{{ tipsMsg }}</p> -->
|
||||
<div class="confirm-btns">
|
||||
<span @click="openPhoneTips = false">确认</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop, white: true }">
|
||||
<div class="back"></div>
|
||||
<div class="header-title">登录</div>
|
||||
</div>
|
||||
<div class="login pull-content list-section">
|
||||
<div class="login-txt">
|
||||
<div class="logo">
|
||||
<img src="../assets/images/login/logo.png" alt="" />
|
||||
</div>
|
||||
<div class="company">有谱志愿</div>
|
||||
<div class="phone-number" v-if="mode == 1">
|
||||
<span>手机号</span>
|
||||
<input type="text" v-model="phoneNumber" placeholder="请输入手机号" />
|
||||
</div>
|
||||
<div class="agreement">
|
||||
<span :class="{ checked: isAgreement }" @click="isAgreement = !isAgreement"><img
|
||||
v-show="isAgreement" src="../assets/images/login/yes.png" alt="" /></span>
|
||||
<p>
|
||||
我已阅读并同意<span>《有谱志愿用户协议》</span>、<span>《隐私政策》</span>,未注册将引导完成账号注册
|
||||
</p>
|
||||
</div>
|
||||
<div class="login-btns">
|
||||
<span @click="nailLogin()" v-if="mode == 0" class="nail-btn"><img
|
||||
src="../assets/images/login/nail.png" />钉钉授权登录</span>
|
||||
<span @click="phoneLogin()" v-if="mode == 1">获取验证码</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-mode">
|
||||
<div class="mode-title"><span></span>其他登录方式<span></span></div>
|
||||
<ul class="mode-item">
|
||||
<li>
|
||||
<span @click="changeMode(0)"><img src="../assets/images/login/nail.png" /></span>
|
||||
<p :class="{ active: mode == 0 }">当前登录方式</p>
|
||||
</li>
|
||||
<li>
|
||||
<span @click="changeMode(1)"><img src="../assets/images/login/phone.png" /></span>
|
||||
<p :class="{ active: mode == 1 }">当前登录方式</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 阅读协议弹窗 -->
|
||||
<div class="my-confirm-bg" v-show="openAgreement" @click="openAgreement = !openAgreement"></div>
|
||||
<div class="my-confirm my-confirm2" v-show="openAgreement">
|
||||
<p>您还未阅读并同意授权</p>
|
||||
<div class="confirm-btns">
|
||||
<span @click="openAgreement = false">确认</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 钉钉授权登录弹窗 -->
|
||||
<div class="addr-select-bg" v-show="openEmpower" @click="openEmpower = !openEmpower"></div>
|
||||
<div class="nail-popup" v-show="openEmpower">
|
||||
<div class="nail-popup-title">
|
||||
<span><img src="../assets/images/login/logo.png" alt="" /></span>
|
||||
<p>有谱志愿</p>
|
||||
<em>申请</em>
|
||||
</div>
|
||||
<p>获取您的钉钉昵称</p>
|
||||
<div class="nick-name">
|
||||
<span>钉钉昵称</span>
|
||||
<p>张三<img src="../assets/images/login/green-yes.png" alt="" /></p>
|
||||
</div>
|
||||
<div class="nail-popup-btns">
|
||||
<span @click="isEmpower()">同意</span>
|
||||
<span @click="noEmpower()">拒绝</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 手机验证弹窗 -->
|
||||
<div class="my-confirm-bg" v-show="openPhoneTips" @click="openPhoneTips = !openPhoneTips"></div>
|
||||
<div class="my-confirm my-confirm2" v-show="openPhoneTips">
|
||||
<!-- <p>{{ tipsMsg }}</p> -->
|
||||
<div class="confirm-btns">
|
||||
<span @click="openPhoneTips = false">确认</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "login",
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
mode: 1, //登录方式
|
||||
openAgreement: false, //阅读协议弹窗
|
||||
isAgreement: false, //阅读协议状态
|
||||
openEmpower: false, //钉钉授权状态
|
||||
openPhoneTips: false, //验证手机号弹出框
|
||||
phoneNumber: "13608235524",
|
||||
phone: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 钉钉授权登录
|
||||
nailLogin() {
|
||||
if (this.isAgreement) {
|
||||
this.openEmpower = true;
|
||||
} else {
|
||||
this.openAgreement = true;
|
||||
}
|
||||
},
|
||||
// 手机号登录
|
||||
phoneLogin() {
|
||||
let that = this;
|
||||
var reg_tel =
|
||||
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
||||
if (this.phoneNumber == "") {
|
||||
alert("请填写您的手机号码!");
|
||||
export default {
|
||||
name: "login",
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
mode: 1, //登录方式
|
||||
openAgreement: false, //阅读协议弹窗
|
||||
isAgreement: true, //阅读协议状态
|
||||
openEmpower: false, //钉钉授权状态
|
||||
openPhoneTips: false, //验证手机号弹出框
|
||||
phoneNumber: "",
|
||||
phone: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 钉钉授权登录
|
||||
nailLogin() {
|
||||
if (this.isAgreement) {
|
||||
this.openEmpower = true;
|
||||
} else {
|
||||
this.openAgreement = true;
|
||||
}
|
||||
},
|
||||
// 手机号登录
|
||||
phoneLogin() {
|
||||
let that = this;
|
||||
var reg_tel =
|
||||
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
||||
if (this.phoneNumber == "") {
|
||||
alert("请填写您的手机号码!");
|
||||
|
||||
return false;
|
||||
} else if (!reg_tel.test(this.phoneNumber)) {
|
||||
alert("请正确填写您的手机号码!");
|
||||
return false;
|
||||
}
|
||||
this.axios
|
||||
.post(this.HOME + "/api/common/send-sms-captcha", {
|
||||
phone: this.phoneNumber,
|
||||
type: "login",
|
||||
})
|
||||
.then(function () {
|
||||
that.$router.push({
|
||||
path: "/verification",
|
||||
query: {
|
||||
phone: that.phoneNumber,
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
return false;
|
||||
} else if (!reg_tel.test(this.phoneNumber)) {
|
||||
alert("请正确填写您的手机号码!");
|
||||
return false;
|
||||
}
|
||||
this.axios
|
||||
.post(this.HOME + "/api/common/send-sms-captcha", {
|
||||
phone: this.phoneNumber,
|
||||
type: "login",
|
||||
})
|
||||
.then(function() {
|
||||
that.$router.push({
|
||||
path: "/verification",
|
||||
query: {
|
||||
phone: that.phoneNumber,
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
// 同意钉钉授权
|
||||
isEmpower() {
|
||||
this.openEmpower = false;
|
||||
},
|
||||
//拒绝钉钉授权
|
||||
noEmpower() {
|
||||
this.openEmpower = false;
|
||||
},
|
||||
// 改变登录方式
|
||||
changeMode(mode) {
|
||||
this.mode = mode;
|
||||
},
|
||||
doLogin() {
|
||||
if (this.username.match(/^\s*$/)) {
|
||||
alert("请输入用户名");
|
||||
return;
|
||||
}
|
||||
if (this.password.match(/^\s*$/)) {
|
||||
alert("请输入密码");
|
||||
return;
|
||||
}
|
||||
this.login({
|
||||
cellphone: this.username,
|
||||
password: this.password,
|
||||
success: (res) => {
|
||||
// console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.$router.go(-1);
|
||||
} else {
|
||||
alert(res.data);
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
// 滚动改变样式
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive进入时触发
|
||||
activated() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive离开时触发
|
||||
deactivated() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
};
|
||||
// 同意钉钉授权
|
||||
isEmpower() {
|
||||
this.openEmpower = false;
|
||||
},
|
||||
//拒绝钉钉授权
|
||||
noEmpower() {
|
||||
this.openEmpower = false;
|
||||
},
|
||||
// 改变登录方式
|
||||
changeMode(mode) {
|
||||
this.mode = mode;
|
||||
},
|
||||
// 滚动改变样式
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive进入时触发
|
||||
activated() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive离开时触发
|
||||
deactivated() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -1,192 +1,179 @@
|
|||
<template>
|
||||
<div class="content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop, white: true }">
|
||||
<div class="back" @click="$router.go(-1)">
|
||||
<img src="../../assets/images/home/expert/back.png" alt="" />
|
||||
</div>
|
||||
<div class="header-title">手机验证码</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<!-- 头部 -->
|
||||
<div :class="{ header: true, 'scroll white': isScrollTop, white: true }">
|
||||
<div class="back" @click="$router.go(-1)">
|
||||
<img src="../../assets/images/home/expert/back.png" alt="" />
|
||||
</div>
|
||||
<div class="header-title">手机验证码</div>
|
||||
</div>
|
||||
|
||||
<div class="verification pull-content list-section">
|
||||
<div class="verification-txt">
|
||||
<p>输入验证码</p>
|
||||
<span>验证码已发送至 +86 {{ phoneData }}</span>
|
||||
<div class="result">
|
||||
<div class="security-code-wrap">
|
||||
<label for="code">
|
||||
<ul class="security-code-container">
|
||||
<li
|
||||
class="field-wrap"
|
||||
v-for="(item, index) in number"
|
||||
:key="index"
|
||||
>
|
||||
<i class="char-field">{{ value[index] || placeholder }}</i>
|
||||
</li>
|
||||
</ul>
|
||||
</label>
|
||||
<input
|
||||
ref="input"
|
||||
class="input-code"
|
||||
@keyup="handleInput($event)"
|
||||
v-model="value"
|
||||
id="code"
|
||||
name="code"
|
||||
type="tel"
|
||||
:maxlength="number"
|
||||
autocorrect="off"
|
||||
autocomplete="off"
|
||||
autocapitalize="off"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<span v-show="!show">{{ count }}秒后可重新获取验证码</span>
|
||||
<div v-show="show" @click="getCode()" class="getCode">获取验证码</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="verification pull-content list-section">
|
||||
<div class="verification-txt">
|
||||
<p>输入验证码</p>
|
||||
<span>验证码已发送至 +86 {{ phoneData }}</span>
|
||||
<div class="result">
|
||||
<div class="security-code-wrap">
|
||||
<label for="code">
|
||||
<ul class="security-code-container">
|
||||
<li class="field-wrap" v-for="(item, index) in number" :key="index">
|
||||
<i class="char-field">{{ value[index] || placeholder }}</i>
|
||||
</li>
|
||||
</ul>
|
||||
</label>
|
||||
<input ref="input" class="input-code" @keyup="handleInput($event)" v-model="value" id="code"
|
||||
name="code" type="tel" :maxlength="number" autocorrect="off" autocomplete="off"
|
||||
autocapitalize="off" />
|
||||
</div>
|
||||
</div>
|
||||
<span v-show="!show">{{count}}秒后可重新获取验证码</span>
|
||||
<div v-show="show" @click="getCode()" class="getCode">获取验证码</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "login-verification",
|
||||
props: {
|
||||
number: {
|
||||
type: Number,
|
||||
default: 6,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "-",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
phoneData: "", //手机号
|
||||
verification: "", //验证码
|
||||
value: "",
|
||||
show: false, //显示获取验证码
|
||||
count: "", //剩余时间
|
||||
timer: null,
|
||||
};
|
||||
},
|
||||
beforeCreate() {},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.phoneData = this.$route.query.phone
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT;
|
||||
this.show = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.count--;
|
||||
} else {
|
||||
this.show = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
hideKeyboard() {
|
||||
// 输入完成隐藏键盘
|
||||
var that = this;
|
||||
document.activeElement.blur(); // ios隐藏键盘
|
||||
this.$refs.input.blur(); // android隐藏键盘
|
||||
export default {
|
||||
name: "login-verification",
|
||||
props: {
|
||||
number: {
|
||||
type: Number,
|
||||
default: 6,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "-",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isScrollTop: false,
|
||||
phoneData: "", //手机号
|
||||
verification: "", //验证码
|
||||
value: "",
|
||||
show: false, //显示获取验证码
|
||||
count: "", //剩余时间
|
||||
timer: null,
|
||||
};
|
||||
},
|
||||
beforeCreate() {},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
this.phoneData = this.$route.query.phone
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT;
|
||||
this.show = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.count--;
|
||||
} else {
|
||||
this.show = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.axios
|
||||
.post(this.HOME + "/api/user/login-by-Phone", {
|
||||
phone: this.$route.query.phone,
|
||||
sms_code: this.value,
|
||||
})
|
||||
.then(function (res) {
|
||||
localStorage.userData = JSON.stringify(res.data.data);
|
||||
if (res.data.code == 0) {
|
||||
that.$router.push({
|
||||
path: "/index", });
|
||||
} else {
|
||||
window.alert(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$emit("input", this.value);
|
||||
},
|
||||
handleInput() {
|
||||
this.$refs.input.value = this.value;
|
||||
if (this.value.length >= this.number) {
|
||||
this.hideKeyboard();
|
||||
}
|
||||
this.handleSubmit();
|
||||
},
|
||||
// 倒计时60s
|
||||
getCode() {
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT;
|
||||
this.show = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.count--;
|
||||
} else {
|
||||
this.show = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
this.axios
|
||||
.post(this.HOME + "/api/common/send-sms-captcha", {
|
||||
phone: this.$route.query.phone,
|
||||
type: "login",
|
||||
})
|
||||
.then(function () {})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
// 滚动改变样式
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive进入时触发
|
||||
activated() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive离开时触发
|
||||
deactivated() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
hideKeyboard() {
|
||||
// 输入完成隐藏键盘
|
||||
var that = this;
|
||||
document.activeElement.blur(); // ios隐藏键盘
|
||||
this.$refs.input.blur(); // android隐藏键盘
|
||||
|
||||
this.axios
|
||||
.post(this.HOME + "/api/user/login-by-Phone", {
|
||||
phone: this.$route.query.phone,
|
||||
sms_code: this.value,
|
||||
})
|
||||
.then(function(res) {
|
||||
localStorage.userData = JSON.stringify(res.data.data);
|
||||
if (res.data.code == 0) {
|
||||
that.$router.push({
|
||||
path: "/index",
|
||||
});
|
||||
} else {
|
||||
window.alert(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleSubmit() {
|
||||
this.$emit("input", this.value);
|
||||
},
|
||||
handleInput() {
|
||||
this.$refs.input.value = this.value;
|
||||
if (this.value.length >= this.number) {
|
||||
this.hideKeyboard();
|
||||
}
|
||||
this.handleSubmit();
|
||||
},
|
||||
// 倒计时60s
|
||||
getCode() {
|
||||
const TIME_COUNT = 60;
|
||||
if (!this.timer) {
|
||||
this.count = TIME_COUNT;
|
||||
this.show = false;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||
this.count--;
|
||||
} else {
|
||||
this.show = true;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
}, 1000);
|
||||
this.axios
|
||||
.post(this.HOME + "/api/common/send-sms-captcha", {
|
||||
phone: this.$route.query.phone,
|
||||
type: "login",
|
||||
})
|
||||
.then(function() {})
|
||||
.catch(function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
// 滚动改变样式
|
||||
eventScrollTop() {
|
||||
let scrollTop =
|
||||
document.body.scrollTop || document.documentElement.scrollTop;
|
||||
if (scrollTop >= 5) {
|
||||
if (this.isScroll) {
|
||||
this.isScroll = false;
|
||||
this.isScrollTop = true;
|
||||
}
|
||||
} else {
|
||||
if (!this.isScroll) {
|
||||
this.isScroll = true;
|
||||
this.isScrollTop = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive进入时触发
|
||||
activated() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
//keep-alive离开时触发
|
||||
deactivated() {
|
||||
window.removeEventListener("scroll", this.eventScrollTop);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -10,51 +10,58 @@
|
|||
<li>
|
||||
<span><em>*</em>姓名</span>
|
||||
<p>
|
||||
<input type="text" value="" placeholder="请输入姓名">
|
||||
<input type="text" value="" v-model="name" placeholder="请输入姓名">
|
||||
</p>
|
||||
</li>
|
||||
<li @click="openAddr()">
|
||||
<span><em>*</em>考籍</span>
|
||||
<p>
|
||||
<input type="text" readonly="readonly" :value="addrData[addrIndex].title" placeholder="请选择考生所在省份">
|
||||
<input type="text" readonly="readonly" :value="addrData[addrIndex].name" placeholder="请选择考生所在省份">
|
||||
<img src="../../../assets/images/home/expert/arrow-right.png" >
|
||||
</p>
|
||||
</li>
|
||||
<li @click="openSex()">
|
||||
<span><em>*</em>性别</span>
|
||||
<p>
|
||||
<input type="text" readonly="readonly" :value="sexData[sexIndex].title" placeholder="请输入性别">
|
||||
<input type="text" readonly="readonly" :value="sexData[sexIndex].title" placeholder="请选择性别">
|
||||
<img src="../../../assets/images/home/expert/arrow-right.png" >
|
||||
</p>
|
||||
</li>
|
||||
<li @click="openCategory()">
|
||||
<span><em>*</em>考生类型</span>
|
||||
<p>
|
||||
<input type="text" readonly="readonly" :value="categoryData[categoryIndex].title" placeholder="请输入姓名">
|
||||
<input type="text" readonly="readonly" :value="categoryData[categoryIndex].title" placeholder="请选择考生姓名">
|
||||
<img src="../../../assets/images/home/expert/arrow-right.png" >
|
||||
</p>
|
||||
</li>
|
||||
<li @click="openDate()">
|
||||
<span><em>*</em>高考年份</span>
|
||||
<p>
|
||||
<input type="text" readonly="readonly" :value="dateArray[dateIndex]" placeholder="请选择高考年份">
|
||||
<img src="../../../assets/images/home/expert/arrow-right.png" >
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<span><em>*</em>选科组合</span>
|
||||
<div class="course-list">
|
||||
<span :class="{'checked':index==checkedIndex}" v-for="(item,index) in courseData" :key="index" @click="changeCourse(index)">{{item.title}}</span>
|
||||
<span :class="{'checked':item.isActive}" v-for="(item,index) in subjectArray" :key="index" @click="onChangeA(index,item.id)">{{item.name}}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span>预估/模考成绩</span>
|
||||
<p>
|
||||
<input type="text" value="" placeholder="请填写预估/模考成绩(非必填)">
|
||||
<input type="text" v-model="achievementExpect" placeholder="请填写预估/模考成绩(非必填)">
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<span>预估/模考省内排名</span>
|
||||
<p>
|
||||
<input type="text" value="" placeholder="请填写预估/模考省内排名(非必填)">
|
||||
<input type="text" v-model="provinceRanking" placeholder="请填写预估/模考省内排名(非必填)">
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="information-btn" @click="setInformationEV()">确认</div>
|
||||
<div class="information-btn" @click="getStudentInfo()">确认</div>
|
||||
<!-- 地址弹出框 -->
|
||||
<div class="addr-select-bg" v-show="isAddr" @click="isAddr=!isAddr"></div>
|
||||
<div class="addr-select-item" v-show="isAddr">
|
||||
|
@ -63,7 +70,7 @@
|
|||
<span @click="isAddr=!isAddr">取消</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)" v-for="(item,index) in addrData" :key="index">{{item.title}}<img v-show="index==addrIndex" src="../../../assets/images/home/expert/yes.png"></li>
|
||||
<li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)" v-for="(item,index) in addrData" :key="index">{{item.name}}<img v-show="index==addrIndex" src="../../../assets/images/home/expert/yes.png"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 性别弹出框 -->
|
||||
|
@ -77,6 +84,17 @@
|
|||
<li :class="{'checked':index == sexIndex}" @click="getSexValue(index,item)" v-for="(item,index) in sexData" :key="index">{{item.title}}<img v-show="index==sexIndex" src="../../../assets/images/home/expert/yes.png"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 日期弹出框 -->
|
||||
<div class="addr-select-bg" v-show="isDate" @click="isDate=!isDate"></div>
|
||||
<div class="addr-select-item" v-show="isDate">
|
||||
<div class="addr-btns">
|
||||
<span>请选择高考日期</span>
|
||||
<span @click="isDate=!isDate">取消</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li :class="{'checked':index == dateIndex}" @click="getDateValue(index,item)" v-for="(item,index) in dateArray" :key="index">{{item}}<img v-show="index==dateIndex" src="../../../assets/images/home/expert/yes.png"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 考生类别弹出框 -->
|
||||
<div class="addr-select-bg" v-show="isCategory" @click="isCategory=!isCategory"></div>
|
||||
<div class="addr-select-item" v-show="isCategory">
|
||||
|
@ -103,28 +121,13 @@
|
|||
data(){
|
||||
return {
|
||||
isScrollTop: false,
|
||||
|
||||
addrData:[
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'},
|
||||
{title:'北京'},
|
||||
{title:'上海'},
|
||||
{title:'广州'},
|
||||
{title:'四川'}
|
||||
],
|
||||
name:'',
|
||||
addrData:[], //考籍列表
|
||||
addrIndex: 0,
|
||||
isAddr: false, //城市列表是否显示
|
||||
addrValue:'', //选择城市编号
|
||||
addrValue:'', //考籍城市编号
|
||||
|
||||
studentName: '', //考生姓名
|
||||
|
||||
sexData:[
|
||||
{title:'男'},
|
||||
|
@ -134,6 +137,11 @@
|
|||
isSex: false, //性别列表是否显示
|
||||
sexValue:'', //选择性别
|
||||
|
||||
dateArray:[],
|
||||
dateIndex: 0,
|
||||
isDate: false, //时间列表是否显示
|
||||
dateValue:'', //选择时间
|
||||
|
||||
categoryData:[
|
||||
{title:'普通高考生'},
|
||||
{title:'艺考生'},
|
||||
|
@ -143,33 +151,78 @@
|
|||
isCategory: false, //性别列表是否显示
|
||||
categoryValue:'', //选择性别
|
||||
|
||||
courseData: [
|
||||
{title:'物理'},
|
||||
{title:'化学'},
|
||||
{title:'生物'},
|
||||
{title:'政治'},
|
||||
{title:'历史'},
|
||||
{title:'地理'}
|
||||
],
|
||||
|
||||
checkedIndex: -1,
|
||||
isSeekCard: false
|
||||
isSeekCard: false,
|
||||
|
||||
achievementExpect:'',//预估成绩
|
||||
provinceRanking: '' ,//预估排名
|
||||
|
||||
// 学科
|
||||
subjectArray: [],
|
||||
subjectValue: [],
|
||||
subjectIndex: 0,
|
||||
|
||||
numberArr: [],
|
||||
temporaryCode:[],//暂存编号
|
||||
limitArr:[],//多选一数组
|
||||
count:0,
|
||||
userObj:'',
|
||||
lenNum:0,//最少最多
|
||||
iscount:true,
|
||||
ispopu:false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isScroll = true;
|
||||
window.addEventListener("scroll", this.eventScrollTop);
|
||||
|
||||
this.getAddrData();
|
||||
this.getDate();
|
||||
this.getSubjectArray();
|
||||
},
|
||||
mounted() {
|
||||
this.getAddrData();
|
||||
this.getDate();
|
||||
this.getSubjectArray();
|
||||
},
|
||||
methods:{
|
||||
// 获取城市列表
|
||||
getAddrData() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/area/index", {
|
||||
pcode: 86
|
||||
})
|
||||
.then(function(res) {
|
||||
that.addrData = res.data.data;
|
||||
});
|
||||
},
|
||||
|
||||
// 获取考试时间
|
||||
getDate(){
|
||||
const date = new Date();
|
||||
let year = Math.trunc(date.getFullYear());
|
||||
let end = year + 10;
|
||||
let newArray=[];
|
||||
for(let i=year; i<= end; i++){
|
||||
newArray.push(i);
|
||||
}
|
||||
this.dateArray = newArray;
|
||||
},
|
||||
|
||||
// 城市选择
|
||||
openAddr(){
|
||||
this.isAddr=!this.isAddr;
|
||||
},
|
||||
getAddrValue(index,item){
|
||||
this.addrValue = item.title;
|
||||
this.addrValue = item.code;
|
||||
this.addrIndex = index;
|
||||
this.isAddr=false;
|
||||
// 查询科目
|
||||
this.getSubjectArray();
|
||||
console.log(this.addrData[this.addrIndex],3636)
|
||||
},
|
||||
|
||||
// 选择性别
|
||||
openSex(){
|
||||
this.isSex=!this.isSex;
|
||||
|
@ -179,6 +232,17 @@
|
|||
this.sexIndex = index;
|
||||
this.isSex=false;
|
||||
},
|
||||
|
||||
// 选择时间
|
||||
openDate(){
|
||||
this.isDate=!this.isDate;
|
||||
},
|
||||
getDateValue(index,item){
|
||||
this.dateValue = item;
|
||||
this.dateIndex = index;
|
||||
this.isDate=false;
|
||||
},
|
||||
|
||||
//选择考生类别
|
||||
openCategory(){
|
||||
this.isCategory=!this.isCategory;
|
||||
|
@ -193,9 +257,149 @@
|
|||
changeCourse(index){
|
||||
this.checkedIndex = index
|
||||
},
|
||||
// 提交
|
||||
setInformationEV(){
|
||||
this.isSeekCard = !this.isSeekCard;
|
||||
|
||||
// 获取选科组合列表
|
||||
getSubjectArray() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/dictionary/subjects", {
|
||||
type: 0
|
||||
})
|
||||
.then(function(res) {
|
||||
console.log(res,222)
|
||||
let list = res.data.data;
|
||||
let newArray = [];
|
||||
let baiArr = that.addrData[that.addrIndex].subject_white.split(',');
|
||||
list.forEach(item=>{
|
||||
baiArr.forEach(item1=>{
|
||||
if(item.id==item1){
|
||||
let obj = {
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
isActive:false
|
||||
}
|
||||
newArray.push(obj);
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
that.subjectArray =newArray;
|
||||
console.log(that.subjectArray,123)
|
||||
});
|
||||
},
|
||||
|
||||
// 选科组合选择事件
|
||||
onChangeA(index,id) {
|
||||
let stuJect = this.data.userObj.student.student_subject.split(',');
|
||||
let arrList = [];
|
||||
stuJect.forEach(item=>{
|
||||
this.data.subjectArray.forEach(item1=>{
|
||||
if(item==item1.id){
|
||||
item1.isActive = true;
|
||||
}
|
||||
})
|
||||
arrList.push(item*1);
|
||||
});
|
||||
// // 有限制的科目
|
||||
// if(this.data.limitArr.length && this.data.temporaryCode.length!=3){
|
||||
// // 判断限制的科目在,选择的科目数组里是否存在
|
||||
// let isc = this.data.limitArr.filter(item=>this.data.temporaryCode.indexOf(item) > -1);
|
||||
// if(isc.length){
|
||||
// let existli = this.data.limitArr.indexOf(id);
|
||||
// if(existli==-1){
|
||||
// this.data.subjectArray[indexes].isActive = !this.data.subjectArray[indexes].isActive
|
||||
// if(existtemp!=-1) {
|
||||
// // 再次点击已经存在的科目,删除
|
||||
// this.data.temporaryCode.splice(existtemp,1);
|
||||
// } else {
|
||||
// this.data.temporaryCode.push(id);
|
||||
// }
|
||||
// this.setData({
|
||||
// subjectArray:this.data.subjectArray
|
||||
// })
|
||||
// } else {
|
||||
// if(existtemp!=-1) {
|
||||
// this.data.subjectArray[indexes].isActive = !this.data.subjectArray[indexes].isActive
|
||||
// // 再次点击已经存在的科目,删除
|
||||
// this.data.temporaryCode.splice(existtemp,1);
|
||||
// this.setData({
|
||||
// subjectArray:this.data.subjectArray
|
||||
// })
|
||||
// } else {
|
||||
// // 存在,就不能再选
|
||||
// dd.showToast({content:'选科冲突',type: 'none',duration:2000});
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// this.data.subjectArray[indexes].isActive = !this.data.subjectArray[indexes].isActive
|
||||
// if(existtemp!=-1) {
|
||||
// // 再次点击已经存在的科目,删除
|
||||
// this.data.temporaryCode.splice(existtemp,1);
|
||||
// } else {
|
||||
// // 可继续选择
|
||||
// this.data.temporaryCode.push(id);
|
||||
// }
|
||||
// this.setData({
|
||||
// subjectArray:this.data.subjectArray
|
||||
// })
|
||||
// }
|
||||
// } else if(this.data.temporaryCode.length!=3) {
|
||||
// this.data.subjectArray[indexes].isActive = !this.data.subjectArray[indexes].isActive
|
||||
// // 没有限制的科目
|
||||
// if(existtemp!=-1) {
|
||||
// // 再次点击已经存在的科目,删除
|
||||
// this.data.temporaryCode.splice(existtemp,1);
|
||||
// } else {
|
||||
// // 添加选中的科目
|
||||
// this.data.temporaryCode.push(id);
|
||||
// }
|
||||
// this.setData({
|
||||
// subjectArray:this.data.subjectArray
|
||||
// })
|
||||
// } else {
|
||||
// // 没有限制的科目
|
||||
// if(existtemp!=-1) {
|
||||
// this.data.subjectArray[indexes].isActive = !this.data.subjectArray[indexes].isActive
|
||||
// // 再次点击已经存在的科目,删除
|
||||
// this.data.temporaryCode.splice(existtemp,1);
|
||||
// this.setData({
|
||||
// subjectArray:this.data.subjectArray
|
||||
// })
|
||||
// } else {
|
||||
// dd.showToast({content:`最多选${this.data.lenNum}科`,type: 'none',duration:2000});
|
||||
// }
|
||||
// }
|
||||
// this.subjectArray[index].isActive=true;
|
||||
console.log(index,id)
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 获取考生信息
|
||||
getStudentInfo() {
|
||||
let that = this;
|
||||
this.axios
|
||||
.post(this.HOME + "/api/area/index", {
|
||||
student_name: that.studentName,//姓名
|
||||
student_gender: that.sexIndex==0 ? 1 : 2,//性别
|
||||
student_native: that.addrData[that.addrIndex].code, //考籍(省级)编号
|
||||
student_native_str: that.addrData[that.addrIndex].name,//考籍(省级)名称
|
||||
|
||||
student_subject: this.temporaryCode.join(','),//选科组合(选科ID,多个用英文逗号分割)
|
||||
|
||||
student_exam_year: that.dateValue,//高考年份
|
||||
|
||||
is_art: that.dateIndex==1?1:0,//是否是艺考生
|
||||
is_PE:that.dateIndex==2?1:0,//是否是体考生
|
||||
achievement_expect: this.data.achievementExpect,//预估或模考成绩
|
||||
province_ranking: this.data.provinceRanking,//预估/省内排名
|
||||
achievement_high: '',//高考成绩,-1表示未考(用户留空时默认传值为-1)
|
||||
})
|
||||
.then(function(res) {
|
||||
// that.isSeekCard = true;
|
||||
console.log(res,123)
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转
|
||||
|
|
Loading…
Reference in New Issue