咨询师端接口调用

master
Lee-1203 2022-03-05 22:07:52 +08:00
parent 4c74ce1119
commit 31ac1df69a
10 changed files with 257 additions and 193 deletions

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title>有谱志愿</title>
<style> <style>
.load { .load {
width: 0.6rem; width: 0.6rem;
@ -23,8 +23,7 @@
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript <strong></strong>
enabled. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->

View File

@ -182,6 +182,12 @@ textarea {
.login-mode{ .login-mode{
width: 100%; width: 100%;
margin-top: 2rem; margin-top: 2rem;
background-color: #FFFFFF;
position: fixed;
bottom: .4rem;
}
.login-mode.noPositin{
position: static;
} }
.mode-title{ .mode-title{
display: flex; display: flex;
@ -348,7 +354,7 @@ textarea {
.security-code-container { .security-code-container {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 3.48rem; width: 5.32rem;
} }
.field-wrap { .field-wrap {
list-style: none; list-style: none;

View File

@ -13,10 +13,10 @@
<img v-else-if="headImg" :src="host + headImg"> <img v-else-if="headImg" :src="host + headImg">
</div> </div>
<button class="cover-btn" @change="imgIny($event)"> <div class="cover-btn">
<input class="inputB" @change="imgIny($event)" type="file" /> <input class="inputB" @change="imgIny($event)" type="file" />
上传 上传
</button> </div>
</div> </div>
<ul class="case-msg"> <ul class="case-msg">
<li> <li>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="content my-content"> <div class="content">
<!-- 头部 --> <!-- 头部 -->
<div :class="{'header':true,'scroll white':isScrollTop,'white':true}"> <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="back" @click="$router.go(-1)"><img src="../../assets/images/home/expert/back.png" alt=""></div>
@ -96,5 +96,7 @@
</script> </script>
<style scoped> <style scoped>
.expert-list{
margin-top: 1.2rem;
}
</style> </style>

View File

@ -19,7 +19,7 @@
<span @click="toEntrance()"></span> <span @click="toEntrance()"></span>
</div> </div>
</div> </div>
<div class="evaluation-item"> <!-- <div class="evaluation-item">
<h2>MBTI职业性格测试完整版</h2> <h2>MBTI职业性格测试完整版</h2>
<div class="evaluation-txt"> <div class="evaluation-txt">
<span><img src="../../../assets/images/home/evaluation/evaluation-02.png" alt=""></span> <span><img src="../../../assets/images/home/evaluation/evaluation-02.png" alt=""></span>
@ -78,7 +78,7 @@
<span>测评人数<em>134</em></span> <span>测评人数<em>134</em></span>
<span @click="toEntrance()"></span> <span @click="toEntrance()"></span>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
<div class="addr-select-bg" v-show="isTips" @click="isTips=!isTips"></div> <div class="addr-select-bg" v-show="isTips" @click="isTips=!isTips"></div>
@ -112,6 +112,10 @@
created() { created() {
this.isScroll = true; this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop); window.addEventListener("scroll", this.eventScrollTop);
},
mounted() {
this.isFirst = (JSON.parse(localStorage.getItem("isFirst")));
}, },
methods:{ methods:{
toEntrance(){ toEntrance(){
@ -123,7 +127,8 @@
}, },
// //
noTips(){ noTips(){
this.isFirst = !this.isFirst; this.isFirst = false;
localStorage.isFirst = JSON.stringify(this.isFirst);
this.$router.push('/evaluation/entrance'); this.$router.push('/evaluation/entrance');
}, },
// //

View File

@ -10,12 +10,12 @@
<img :src="host + bannerSrc"> <img :src="host + bannerSrc">
</div> </div>
<!-- 领取咨询机会 --> <!-- 领取咨询机会 -->
<div class="expert-receive" @click="goPage('/information')" v-if="isReceive==0"> <div class="expert-receive" @click="goPage('/information')" v-if="consult_amount==0">
<img src="../../../assets/images/home/expert/notice-01.png"> <img src="../../../assets/images/home/expert/notice-01.png">
<p>完善信息立即领取免费咨询卡(1小时)</p> <p>完善信息立即领取免费咨询卡(1小时)</p>
<span></span> <span></span>
</div> </div>
<div class="expert-receive expert-receive-01" v-if="isReceive==1"> <div class="expert-receive expert-receive-01" v-if="consult_amount==1">
<img src="../../../assets/images/home/expert/notice-02.png"> <img src="../../../assets/images/home/expert/notice-02.png">
<p>您已领取一小时免费咨询权益可向专家进行提问</p> <p>您已领取一小时免费咨询权益可向专家进行提问</p>
</div> </div>
@ -52,7 +52,7 @@
</div> </div>
</div> </div>
<div class="expert-list-btns"> <div class="expert-list-btns">
<div :class="{'btn':true,'noservice':isReceive==0}" @click="toAsk(item.id)">TA</div> <div :class="{'btn':true,'noservice':consult_amount==0}" @click="toAsk(item.id)">TA</div>
<div class="btn" @click="toDetail(item.id)"></div> <div class="btn" @click="toDetail(item.id)"></div>
</div> </div>
</li> </li>
@ -103,7 +103,7 @@
data() { data() {
return { return {
isScrollTop: false, isScrollTop: false,
isReceive: 1, // consult_amount: 0, //
current: 0, current: 0,
isConfirm: false, isConfirm: false,
bannerSrc: '', //banner bannerSrc: '', //banner
@ -128,6 +128,7 @@
created() { created() {
this.isScroll = true; this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop); window.addEventListener("scroll", this.eventScrollTop);
this.consult_amount = (JSON.parse(localStorage.getItem("centerUserData"))).consult_amount;
}, },
mounted() { mounted() {
this.getBanner(); this.getBanner();
@ -242,7 +243,7 @@
// TA // TA
toAsk(id) { toAsk(id) {
if (this.isReceive == 1) { if (this.consult_amount == 1) {
this.$router.push({ this.$router.push({
path: '/expert/ask', path: '/expert/ask',
name: 'expert-ask', name: 'expert-ask',
@ -250,7 +251,7 @@
id: id id: id
}, },
}); });
} else if (this.isReceive == 0) { } else if (this.consult_amount == 0) {
this.isConfirm = true; this.isConfirm = true;
} }
}, },

View File

@ -120,7 +120,7 @@
data() { data() {
return { return {
isScrollTop: false, isScrollTop: false,
isReceive: 0, // consult_amount: 0, //
bannerSrc: "", bannerSrc: "",
expertData: [], // expertData: [], //
headlinesData: [{ headlinesData: [{
@ -149,7 +149,7 @@
created() { created() {
this.isScroll = true; this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop); window.addEventListener("scroll", this.eventScrollTop);
this.consult_amount = JSON.parse(localStorage.userData).consult_amount; this.consult_amount = (JSON.parse(localStorage.getItem("centerUserData"))).consult_amount;
}, },
mounted() { mounted() {
this.getBanner(); this.getBanner();

View File

@ -23,12 +23,11 @@
</p> </p>
</div> </div>
<div class="login-btns"> <div class="login-btns">
<span @click="nailLogin()" v-if="mode == 0" class="nail-btn"><img <span @click="nailLogin()" v-if="mode == 0" class="nail-btn"><img src="../assets/images/login/nail.png" />钉钉授权登录</span>
src="../assets/images/login/nail.png" />钉钉授权登录</span>
<span @click="phoneLogin()" v-if="mode == 1"></span> <span @click="phoneLogin()" v-if="mode == 1"></span>
</div> </div>
</div> </div>
<div class="login-mode"> <div :class="{'login-mode':true,'noPositin':noPositin}" v-if="mode==0">
<div class="mode-title"><span></span>其他登录方式<span></span></div> <div class="mode-title"><span></span>其他登录方式<span></span></div>
<ul class="mode-item"> <ul class="mode-item">
<li> <li>
@ -92,13 +91,31 @@
openPhoneTips: false, // openPhoneTips: false, //
phoneNumber: "", phoneNumber: "",
phone: "", phone: "",
noPositin: false,
defaultPhoneHeight : '0', //
nowPhoneHeight : '0', //
}; };
}, },
created() { created() {
this.isScroll = true; this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop); window.addEventListener("scroll", this.eventScrollTop);
}, },
mounted() {}, mounted(){
this.defaultPhoneHeight = window.innerHeight
window.onresize = ()=>{
this.nowPhoneHeight = window.innerHeight
}
},
watch: {
nowPhoneHeight:function(){
if(this.defaultPhoneHeight != this.nowPhoneHeight){
this.noPositin = true;
}else{
this.noPositin = false;
}
}
},
methods: { methods: {
// //
nailLogin() { nailLogin() {
@ -170,6 +187,7 @@
}, },
destroyed() { destroyed() {
window.removeEventListener("scroll", this.eventScrollTop); window.removeEventListener("scroll", this.eventScrollTop);
window.onresize = null;
}, },
//keep-alive //keep-alive
activated() { activated() {

View File

@ -55,6 +55,7 @@
show: false, // show: false, //
count: "", // count: "", //
timer: null, timer: null,
userType: 0,
}; };
}, },
beforeCreate() {}, beforeCreate() {},
@ -83,8 +84,10 @@
computed: {}, computed: {},
methods: { methods: {
getUserData() { getUserData() {
let that = this;
this.axios.post(this.HOME + "/api/user/center-info").then(function(res) { this.axios.post(this.HOME + "/api/user/center-info").then(function(res) {
console.log(res.data.data) console.log(res.data.data,1234)
that.userType = res.data.data.type;
localStorage.centerUserData = JSON.stringify(res.data.data); localStorage.centerUserData = JSON.stringify(res.data.data);
}); });
}, },
@ -102,10 +105,8 @@
.then(function(res) { .then(function(res) {
localStorage.userData = JSON.stringify(res.data.data); localStorage.userData = JSON.stringify(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {
that.getUserData() that.getUserData();
that.$router.push({ that.goPages();
path: "/index",
});
} else { } else {
window.alert(res.msg); window.alert(res.msg);
} }
@ -114,6 +115,21 @@
console.log(error); console.log(error);
}); });
}, },
//
goPages(){
console.log(this.userType,252525)
if(this.userType == 1){
this.$router.push({
path: "/consultant",
});
}else{
this.$router.push({
path: "/index",
});
}
},
handleSubmit() { handleSubmit() {
this.$emit("input", this.value); this.$emit("input", this.value);
}, },

View File

@ -2,7 +2,8 @@
<div class="content"> <div class="content">
<!-- 头部 --> <!-- 头部 -->
<div :class="{'header':true,'scroll white':isScrollTop,'white':true}"> <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="back" @click="$router.go(-1)"><img src="../../../assets/images/home/expert/back.png" alt="">
</div>
<div class="header-title">完善考生信息</div> <div class="header-title">完善考生信息</div>
</div> </div>
<div class="information pull-content list-section"> <div class="information pull-content list-section">
@ -30,7 +31,8 @@
<li @click="openCategory()"> <li @click="openCategory()">
<span><em>*</em>考生类型</span> <span><em>*</em>考生类型</span>
<p> <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"> <img src="../../../assets/images/home/expert/arrow-right.png">
</p> </p>
</li> </li>
@ -44,7 +46,8 @@
<li> <li>
<span><em>*</em>选科组合</span> <span><em>*</em>选科组合</span>
<div class="course-list"> <div class="course-list">
<span :class="{'checked':item.isActive}" v-for="(item,index) in subjectArray" :key="index" @click="onChange(index,item.id)">{{item.name}}</span> <span :class="{'checked':item.isActive}" v-for="(item,index) in subjectArray" :key="index"
@click="onChange(index,item.id)">{{item.name}}</span>
</div> </div>
</li> </li>
<li> <li>
@ -70,7 +73,8 @@
<span @click="isAddr=!isAddr"></span> <span @click="isAddr=!isAddr"></span>
</div> </div>
<ul> <ul>
<li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)" v-for="(item,index) in addrData" :key="index"> <li :class="{'checked':index == addrIndex}" @click="getAddrValue(index,item)"
v-for="(item,index) in addrData" :key="index">
{{item.name}} {{item.name}}
<img v-show="index == addrIndex" src="../../../assets/images/home/expert/yes.png"> <img v-show="index == addrIndex" src="../../../assets/images/home/expert/yes.png">
</li> </li>
@ -84,7 +88,9 @@
<span @click="isSex=!isSex"></span> <span @click="isSex=!isSex"></span>
</div> </div>
<ul> <ul>
<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> <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> </ul>
</div> </div>
<!-- 日期弹出框 --> <!-- 日期弹出框 -->
@ -95,7 +101,9 @@
<span @click="isDate=!isDate"></span> <span @click="isDate=!isDate"></span>
</div> </div>
<ul> <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> <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> </ul>
</div> </div>
<!-- 考生类别弹出框 --> <!-- 考生类别弹出框 -->
@ -106,7 +114,9 @@
<span @click="isCategory=!isCategory"></span> <span @click="isCategory=!isCategory"></span>
</div> </div>
<ul> <ul>
<li :class="{'checked':index == categoryIndex}" @click="getCategoryValue(index,item)" v-for="(item,index) in categoryData" :key="index">{{item.title}}<img v-show="index==categoryIndex" src="../../../assets/images/home/expert/yes.png"></li> <li :class="{'checked':index == categoryIndex}" @click="getCategoryValue(index,item)"
v-for="(item,index) in categoryData" :key="index">{{item.title}}<img v-show="index==categoryIndex"
src="../../../assets/images/home/expert/yes.png"></li>
</ul> </ul>
</div> </div>
<!-- 咨询卡弹出框 --> <!-- 咨询卡弹出框 -->
@ -133,9 +143,12 @@
studentName: '', // studentName: '', //
sexData:[ sexData: [{
{title:'男'}, title: '男'
{title:'女'} },
{
title: '女'
}
], ],
sexIndex: 0, sexIndex: 0,
isSex: false, // isSex: false, //
@ -146,10 +159,15 @@
isDate: false, // isDate: false, //
dateValue: '', // dateValue: '', //
categoryData:[ categoryData: [{
{title:'普通高考生'}, title: '普通高考生'
{title:'艺考生'}, },
{title:'体考生'} {
title: '艺考生'
},
{
title: '体考生'
}
], ],
categoryIndex: 0, categoryIndex: 0,
isCategory: false, // isCategory: false, //
@ -304,8 +322,10 @@
if (existSubid == -1) { if (existSubid == -1) {
if (this.addrData[this.addrIndex].subject_radio_group_list.length) { if (this.addrData[this.addrIndex].subject_radio_group_list.length) {
// id // id
let limitSubid = this.addrData[this.addrIndex].subject_radio_group_list[0].findIndex(item=>item==subId); let limitSubid = this.addrData[this.addrIndex].subject_radio_group_list[0].findIndex(
let date = this.temporaryCode.findIndex(item => this.addrData[this.addrIndex].subject_radio_group_list[0].indexOf(item) > -1) item => item == subId);
let date = this.temporaryCode.findIndex(item => this.addrData[this.addrIndex]
.subject_radio_group_list[0].indexOf(item) > -1)
if (limitSubid != -1 && date != -1) { if (limitSubid != -1 && date != -1) {
// idid // idid
console.log('选择科目冲突'); console.log('选择科目冲突');
@ -339,7 +359,9 @@
// //
this.temporaryCode = []; this.temporaryCode = [];
// //
this.subjectArray.forEach(item=>{item.isActive = false;}) this.subjectArray.forEach(item => {
item.isActive = false;
})
// //
this.setSubList(index, subId); this.setSubList(index, subId);
} }
@ -352,13 +374,16 @@
this.temporaryCode.push(id); this.temporaryCode.push(id);
console.log(this.temporaryCode, '数据'); console.log(this.temporaryCode, '数据');
}, },
// //
setStudentInfo() { setStudentInfo() {
let that = this; let that = this;
if (that.temporaryCode.length != that.addrData[that.addrIndex].subject_max) { if (that.temporaryCode.length != that.addrData[that.addrIndex].subject_max) {
console.log('弹框提示,必须选择多少个科目'); console.log('弹框提示,必须选择多少个科目');
} else { } else {
let data = { let that = this;
this.axios
.post(this.HOME + "/api/user/edit-student-info", {
student_name: that.studentName, // student_name: that.studentName, //
student_gender: that.sexIndex == 0 ? 1 : 2, // student_gender: that.sexIndex == 0 ? 1 : 2, //
student_native: that.addrData[that.addrIndex].code, // student_native: that.addrData[that.addrIndex].code, //
@ -370,28 +395,20 @@
achievement_expect: that.achievementExpect, // achievement_expect: that.achievementExpect, //
province_ranking: that.provinceRanking, /// province_ranking: that.provinceRanking, ///
achievement_high: '', //-1-1 achievement_high: '', //-1-1
})
.then(function(res) {
that.getUserData();
that.isSeekCard = true;
console.log(res, 123)
});
} }
console.log(data,2525)
} },
// let that = this; getUserData() {
// this.axios this.axios.post(this.HOME + "/api/user/center-info").then(function(res) {
// .post(this.HOME + "/api/area/index", { console.log(res.data.data)
// student_name: that.studentName,// localStorage.centerUserData = JSON.stringify(res.data.data);
// 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: that.achievementExpect,//
// province_ranking: that.provinceRanking,///
// achievement_high: '',//-1-1
// })
// .then(function(res) {
// // that.isSeekCard = true;
// console.log(res,123)
// });
}, },
// //