首页,咨询师列表页修改

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

View File

@ -58,11 +58,20 @@
let that = this; let that = this;
this.axios this.axios
.post(this.HOME + "/api/consumer/expert-info", { .post(this.HOME + "/api/consumer/expert-info", {
id: that.id id: that.id,
}) })
.then(function (res) { .then(function (res) {
console.log(res,111111); let list = res.data.data;
that.expertDetail = 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> <span>尤其擅长{{expertDetail.service_area_main_text}}的志愿填报</span>
</p> </p>
</div> </div>
<div class="expert-case"> <div class="expert-case" v-if="expertCase.length>0">
<h2>咨询案例</h2> <h2>咨询案例</h2>
<div class="expert-case-list"> <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> <div class="case-img"><img :src="host + item.cover" alt=""></div>
<h3><span>案例{{index+1}}</span>{{item.title}}</h3> <h3><span>案例{{index+1}}</span>{{item.title}}</h3>
<p v-if="item.result_remarks"><span>录取结果</span><span>{{item.result_remarks}}</span></p> <p v-if="item.result_remarks"><span>录取结果</span><span>{{item.result_remarks}}</span></p>
@ -75,6 +75,7 @@
}, },
mounted() { mounted() {
this.getDetailData(); this.getDetailData();
this.getExpertCase();
}, },
computed: { computed: {
@ -88,7 +89,50 @@
id: that.id id: that.id
}) })
.then(function (res) { .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;
}); });
}, },

View File

@ -7,7 +7,7 @@
</div> </div>
<!-- 轮播图 --> <!-- 轮播图 -->
<div class="banner"> <div class="banner">
<img :src="host + bannerSrc?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="isReceive==0">
@ -26,7 +26,7 @@
</ul> </ul>
<!-- 城市 --> <!-- 城市 -->
<div class="addr-select"> <div class="addr-select">
<div @click="openAddr()">{{addrData[addrIndex].name}}</div> <div @click="openAddr()">{{addrArray[addrIndex]?addrArray[addrIndex]:''}}</div>
</div> </div>
</div> </div>
@ -67,9 +67,13 @@
<span @click="isAddr=!isAddr"></span> <span @click="isAddr=!isAddr"></span>
</div> </div>
<ul> <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"> <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>
</ul> </ul>
</div> </div>
@ -99,7 +103,6 @@
data() { data() {
return { return {
isScrollTop: false, isScrollTop: false,
name: '',
isReceive: 1, // isReceive: 1, //
current: 0, current: 0,
isConfirm: false, isConfirm: false,
@ -112,10 +115,14 @@
title: '多元升学' title: '多元升学'
}], }],
expertData: [], // expertData: [], //
addrData: [],
addrIndex: 0, addrArray:[], //
addrData: [], //
addrIndex: -1,
isAddr: false, // isAddr: false, //
addrValue: '', // addrValue: '' , //
isPluralism: 0, //
} }
}, },
created() { created() {
@ -124,7 +131,6 @@
}, },
mounted() { mounted() {
this.getBanner(); this.getBanner();
this.getExpertData();
this.getAddrData(); this.getAddrData();
}, },
methods: { methods: {
@ -133,15 +139,15 @@
switch (index) { switch (index) {
case 0: case 0:
this.current = 0; this.current = 0;
this.isPluralism = 0;
break; break;
case 1: case 1:
this.current = 1; this.current = 1;
this.isPluralism = 0;
break; break;
case 2: case 2:
this.current = 2; this.current = 2;
break; this.isPluralism = 1;
case 3:
this.current = 3;
break; break;
} }
}, },
@ -166,9 +172,26 @@
.post(this.HOME + "/api/consumer/expert-list", { .post(this.HOME + "/api/consumer/expert-list", {
page: "1", page: "1",
size: "100", size: "100",
province_code: that.addrValue,
is_pluralism: that.isPluralism
}) })
.then(function(res) { .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,19 +204,34 @@
pcode: 86 pcode: 86
}) })
.then(function(res) { .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() { openAddr() {
this.isAddr = !this.isAddr; this.isAddr = !this.isAddr;
}, },
//
getAddrValue(index, item) { getAddrValue(index, item) {
this.addrValue = item.code; this.addrValue = item.code;
this.addrIndex = index; this.addrIndex = index;
this.isAddr = false; this.isAddr = false;
this.getExpertData();
}, },
// //

View File

@ -33,11 +33,11 @@
<img :src="host + item.avatar"/> <img :src="host + item.avatar"/>
</div> </div>
<div class="expert-name"> <div class="expert-name">
{{item.name}}<span>{{item.keywords_list[1]}}</span> {{item.name}}<span>{{item.work_time}}</span>
</div> </div>
<div class="expert-honor"> <div class="expert-honor">
<span>{{item.keywords_list[0]}}</span> <span>{{item.home_keywords_list[0]}}</span>
<span>{{item.keywords_list[1]}}</span> <span>{{item.home_keywords_list[1]}}</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -184,10 +184,24 @@
.post(this.HOME + "/api/consumer/expert-list", { .post(this.HOME + "/api/consumer/expert-list", {
page: "1", page: "1",
size: "3", size: "3",
is_home: 1,
}) })
.then(function(res) { .then(function(res) {
console.log(res.data.data); let list = res.data.data.list;
that.expertData = 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> <li>
<span><em>*</em>姓名</span> <span><em>*</em>姓名</span>
<p> <p>
<input type="text" value="" v-model="name" placeholder="请输入姓名"> <input type="text" value="" v-model="studentName" placeholder="请输入姓名">
</p> </p>
</li> </li>
<li @click="openAddr()"> <li @click="openAddr()">
<span><em>*</em>考籍</span> <span><em>*</em>考籍</span>
<p> <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" > <img src="../../../assets/images/home/expert/arrow-right.png" >
</p> </p>
</li> </li>
@ -30,7 +30,7 @@
<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 +44,7 @@
<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="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> </div>
</li> </li>
<li> <li>
@ -70,7 +70,10 @@
<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">{{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> </ul>
</div> </div>
<!-- 性别弹出框 --> <!-- 性别弹出框 -->
@ -121,7 +124,8 @@
data(){ data(){
return { return {
isScrollTop: false, isScrollTop: false,
name:'',
addrArray:[], //
addrData:[], // addrData:[], //
addrIndex: 0, addrIndex: 0,
isAddr: false, // isAddr: false, //
@ -179,7 +183,6 @@
mounted() { mounted() {
this.getAddrData(); this.getAddrData();
this.getDate(); this.getDate();
// this.getSubjectArray();
}, },
methods:{ methods:{
// //
@ -190,7 +193,23 @@
pcode: 86 pcode: 86
}) })
.then(function(res) { .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(); that.getSubjectArray();
}); });
}, },
@ -205,6 +224,7 @@
newArray.push(i); newArray.push(i);
} }
this.dateArray = newArray; this.dateArray = newArray;
this.dateValue = this.dateArray[this.dateIndex];
}, },
// //
@ -250,10 +270,6 @@
this.isCategory=false; this.isCategory=false;
}, },
//
changeCourse(index){
this.checkedIndex = index
},
// //
getSubjectArray() { getSubjectArray() {
@ -263,7 +279,6 @@
type: -1 type: -1
}) })
.then(function(res) { .then(function(res) {
console.log(res,222)
let list = res.data.data; let list = res.data.data;
let newArray = []; let newArray = [];
let baiArr = that.addrData[that.addrIndex].subject_white.split(','); let baiArr = that.addrData[that.addrIndex].subject_white.split(',');
@ -281,42 +296,55 @@
}) })
that.subjectArray =newArray; that.subjectArray =newArray;
console.log(that.subjectArray,123)
}); });
}, },
// //
onChangeA(index,id) { onChange(index,number) {
console.log(index,id) // let that = this;
let id = number;
let indexes = index + 1;
console.log(indexes,id,123)
}, },
// //
getStudentInfo() { getStudentInfo() {
let that = this; let that =this;
this.axios let data = {
.post(this.HOME + "/api/area/index", {
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, //
student_native_str: that.addrData[that.addrIndex].name,// student_native_str: that.addrData[that.addrIndex].name,//
// student_subject: this.temporaryCode.join(','),//ID
student_subject: this.temporaryCode.join(','),//ID
student_exam_year: that.dateValue,// student_exam_year: that.dateValue,//
is_art: that.dateIndex==1?1:0,// is_art: that.dateIndex==1?1:0,//
is_PE:that.dateIndex==2?1:0,// is_PE:that.dateIndex==2?1:0,//
achievement_expect: this.data.achievementExpect,// achievement_expect: that.achievementExpect,//
province_ranking: this.data.provinceRanking,/// province_ranking: that.provinceRanking,///
achievement_high: '',//-1-1 achievement_high: '',//-1-1
}) }
.then(function(res) { console.log(data)
// that.isSeekCard = true; // let that = this;
console.log(res,123) // 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)
// });
}, },
// //