master
Lee-1203 2022-03-04 20:26:35 +08:00
parent 605627780c
commit 020e92879e
9 changed files with 994 additions and 800 deletions

View File

@ -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%;

View File

@ -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('/');

View File

@ -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;

View File

@ -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);

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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)
});
},
//