首页,咨询师列表页修改

master
Lee-1203 2022-03-05 13:51:00 +08:00
parent 7a89ea596e
commit aec17529bd
6 changed files with 210 additions and 74 deletions

View File

@ -523,7 +523,7 @@ textarea {
min-height: 2rem;
}
.expert-name{
padding: .15rem .12rem 0;
padding: .15rem .08rem 0;
font-size: .28rem;
line-height: 1.5;
overflow: hidden;
@ -531,24 +531,27 @@ textarea {
.expert-name>span{
font-size: .24rem;
color: #ff7716;
line-height: 1.8;
float: right;
}
.expert-honor{
padding: 0 .12rem;
display: flex;
flex-wrap: wrap;
padding: 0 .08rem;
margin-top: .02rem;
}
.expert-honor>span{
display: inline-block;
padding: 0 .1rem;
margin-left: .06rem;
padding: 0 .025rem;
border-radius: .04rem;
background-color: #e9eaf1;
font-size: .24rem;
font-size: .21rem;
color: #878787;
line-height: 1.8;
margin: .05rem 0;
margin-right: .04rem;
}
.expert-honor>span:first-child{
margin-left: 0;
.expert-honor>span:last-child{
margin-right: 0;
}
/* 计划 */
.index-plan{

View File

@ -58,11 +58,20 @@
let that = this;
this.axios
.post(this.HOME + "/api/consumer/expert-info", {
id: that.id
id: that.id,
})
.then(function (res) {
console.log(res,111111);
that.expertDetail = res.data.data;
let list = res.data.data;
let newArray = [];
let array = {
id: list.id,
name: list.name,
avatar: list.avatar,
im_group_link: list.im_group_link,
im_group_qr: list.im_group_qr,
}
newArray = array;
that.expertDetail = newArray;
});
},

View File

@ -40,10 +40,10 @@
<span>尤其擅长{{expertDetail.service_area_main_text}}的志愿填报</span>
</p>
</div>
<div class="expert-case">
<div class="expert-case" v-if="expertCase.length>0">
<h2>咨询案例</h2>
<div class="expert-case-list">
<div class="expert-case-item" v-for="(item,index) in expertDetail.mainCaseList" :key="index">
<div class="expert-case-item" v-for="(item,index) in expertCase" :key="index">
<div class="case-img"><img :src="host + item.cover" alt=""></div>
<h3><span>案例{{index+1}}</span>{{item.title}}</h3>
<p v-if="item.result_remarks"><span>录取结果</span><span>{{item.result_remarks}}</span></p>
@ -75,6 +75,7 @@
},
mounted() {
this.getDetailData();
this.getExpertCase();
},
computed: {
@ -88,10 +89,53 @@
id: that.id
})
.then(function (res) {
that.expertDetail = res.data.data;
let list = res.data.data;
let newArray = [];
let array = {
id: list.id,
name: list.name,
avatar: list.avatar,
tags_text: list.tags_text,
slogan: list.slogan,
summary: list.summary,
service_area_text: list.service_area_text,
im_group_link: list.im_group_link,
im_group_qr: list.im_group_qr,
service_area_main_text: list.service_area_main_text
}
newArray = array;
that.expertDetail = newArray;
});
},
//
getExpertCase(){
let that = this;
this.axios
.post(this.HOME + "/api/expert/get-expert-case-list", {
page: 1,
size: 100,
expert_id: that.id,
is_main: 1
})
.then(function (res) {
let list = res.data.data.list;
let newArray = [];
list.forEach(item=>{
let obj = {
cover:item.cover,
title: item.title,
result_remarks: item.result_remarks,
location_remarks: item.location_remarks,
other_remarks: item.other_remarks,
account_remarks: item.account_remarks,
}
newArray.push(obj);
})
that.expertCase = newArray;
});
},
//
eventScrollTop() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;

View File

@ -7,7 +7,7 @@
</div>
<!-- 轮播图 -->
<div class="banner">
<img :src="host + bannerSrc?host + bannerSrc:''">
<img :src="host + bannerSrc">
</div>
<!-- 领取咨询机会 -->
<div class="expert-receive" @click="goPage('/information')" v-if="isReceive==0">
@ -26,7 +26,7 @@
</ul>
<!-- 城市 -->
<div class="addr-select">
<div @click="openAddr()">{{addrData[addrIndex].name}}</div>
<div @click="openAddr()">{{addrArray[addrIndex]?addrArray[addrIndex]:''}}</div>
</div>
</div>
@ -67,9 +67,13 @@
<span @click="isAddr=!isAddr"></span>
</div>
<ul>
<li :class="{'checked':addrIndex == -1}" @click="getAddrValue(-1,'')">
全部
<img v-show="addrIndex == -1" 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">
<img v-show="index == addrIndex" src="../../../assets/images/home/expert/yes.png">
</li>
</ul>
</div>
@ -99,7 +103,6 @@
data() {
return {
isScrollTop: false,
name: '',
isReceive: 1, //
current: 0,
isConfirm: false,
@ -112,10 +115,14 @@
title: '多元升学'
}],
expertData: [], //
addrData: [],
addrIndex: 0,
addrArray:[], //
addrData: [], //
addrIndex: -1,
isAddr: false, //
addrValue: '', //
addrValue: '' , //
isPluralism: 0, //
}
},
created() {
@ -124,7 +131,6 @@
},
mounted() {
this.getBanner();
this.getExpertData();
this.getAddrData();
},
methods: {
@ -133,15 +139,15 @@
switch (index) {
case 0:
this.current = 0;
this.isPluralism = 0;
break;
case 1:
this.current = 1;
this.isPluralism = 0;
break;
case 2:
this.current = 2;
break;
case 3:
this.current = 3;
this.isPluralism = 1;
break;
}
},
@ -166,9 +172,26 @@
.post(this.HOME + "/api/consumer/expert-list", {
page: "1",
size: "100",
province_code: that.addrValue,
is_pluralism: that.isPluralism
})
.then(function(res) {
that.expertData = res.data.data.list;
let list = res.data.data.list;
let newArray = [];
list.forEach(item=>{
let obj = {
id: item.id,
avatar: item.avatar,
name: item.name,
tags_text: item.tags_text,
slogan: item.slogan,
keywords_list: item.keywords_list,
score: item.score,
comment_score: item.comment_score
}
newArray.push(obj);
})
that.expertData = newArray;
});
},
@ -181,21 +204,36 @@
pcode: 86
})
.then(function(res) {
that.addrData = res.data.data;
let list = res.data.data;
let newArray = [];
let newObj = [];
list.forEach(item=>{
let obj = {
code: item.code,
name: item.name,
}
newArray.push(obj.name);
newObj.push(obj);
})
that.addrArray = newArray;
that.addrData = newObj;
that.getExpertData();
});
},
//
//
openAddr() {
this.isAddr = !this.isAddr;
},
//
getAddrValue(index, item) {
this.addrValue = item.code;
this.addrIndex = index;
this.isAddr = false;
this.getExpertData();
},
//
closeEV() {
this.isConfirm = false;
@ -216,7 +254,7 @@
this.isConfirm = true;
}
},
//
toDetail(id) {
this.$router.push({

View File

@ -33,11 +33,11 @@
<img :src="host + item.avatar"/>
</div>
<div class="expert-name">
{{item.name}}<span>{{item.keywords_list[1]}}</span>
{{item.name}}<span>{{item.work_time}}</span>
</div>
<div class="expert-honor">
<span>{{item.keywords_list[0]}}</span>
<span>{{item.keywords_list[1]}}</span>
<span>{{item.home_keywords_list[0]}}</span>
<span>{{item.home_keywords_list[1]}}</span>
</div>
</li>
</ul>
@ -184,10 +184,24 @@
.post(this.HOME + "/api/consumer/expert-list", {
page: "1",
size: "3",
is_home: 1,
})
.then(function(res) {
console.log(res.data.data);
that.expertData = res.data.data.list;
let list = res.data.data.list;
console.log(list,123)
let newArray = [];
list.forEach(item=>{
let obj = {
id: item.id,
work_time:item.work_time,
avatar: item.avatar,
name: item.name,
keywords_list: item.keywords_list,
home_keywords_list: item.home_keywords_list
}
newArray.push(obj);
})
that.expertData = newArray;
});
},

View File

@ -10,13 +10,13 @@
<li>
<span><em>*</em>姓名</span>
<p>
<input type="text" value="" v-model="name" placeholder="请输入姓名">
<input type="text" value="" v-model="studentName" placeholder="请输入姓名">
</p>
</li>
<li @click="openAddr()">
<span><em>*</em>考籍</span>
<p>
<input type="text" readonly="readonly" :value="addrData[addrIndex].name" placeholder="请选择考生所在省份">
<input type="text" readonly="readonly" :value="addrArray[addrIndex]" placeholder="请选择考生所在省份">
<img src="../../../assets/images/home/expert/arrow-right.png" >
</p>
</li>
@ -30,7 +30,7 @@
<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>
@ -44,7 +44,7 @@
<li>
<span><em>*</em>选科组合</span>
<div class="course-list">
<span :class="{'checked':item.isActive}" v-for="(item,index) in subjectArray" :key="index" @click="onChangeA(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>
</li>
<li>
@ -70,7 +70,10 @@
<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>
<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>
<!-- 性别弹出框 -->
@ -121,7 +124,8 @@
data(){
return {
isScrollTop: false,
name:'',
addrArray:[], //
addrData:[], //
addrIndex: 0,
isAddr: false, //
@ -179,7 +183,6 @@
mounted() {
this.getAddrData();
this.getDate();
// this.getSubjectArray();
},
methods:{
//
@ -190,7 +193,23 @@
pcode: 86
})
.then(function(res) {
that.addrData = res.data.data;
let list = res.data.data;
let newArray = [];
let newObj = [];
list.forEach(item=>{
let obj = {
code: item.code,
name: item.name,
subject_white: item.subject_white,
subject_radio_group: item.subject_radio_group,
subject_radio_group_list:item.subject_radio_group_list,
subject_max:item.subject_max
}
newArray.push(obj.name);
newObj.push(obj);
})
that.addrArray = newArray;
that.addrData = newObj;
that.getSubjectArray();
});
},
@ -205,6 +224,7 @@
newArray.push(i);
}
this.dateArray = newArray;
this.dateValue = this.dateArray[this.dateIndex];
},
//
@ -250,10 +270,6 @@
this.isCategory=false;
},
//
changeCourse(index){
this.checkedIndex = index
},
//
getSubjectArray() {
@ -263,7 +279,6 @@
type: -1
})
.then(function(res) {
console.log(res,222)
let list = res.data.data;
let newArray = [];
let baiArr = that.addrData[that.addrIndex].subject_white.split(',');
@ -281,42 +296,55 @@
})
that.subjectArray =newArray;
console.log(that.subjectArray,123)
});
},
//
onChangeA(index,id) {
console.log(index,id)
onChange(index,number) {
// let that = this;
let id = number;
let indexes = index + 1;
console.log(indexes,id,123)
},
//
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)
});
let that =this;
let data = {
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: that.achievementExpect,//
province_ranking: that.provinceRanking,///
achievement_high: '',//-1-1
}
console.log(data)
// 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: that.achievementExpect,//
// province_ranking: that.provinceRanking,///
// achievement_high: '',//-1-1
// })
// .then(function(res) {
// // that.isSeekCard = true;
// console.log(res,123)
// });
},
//