Compare commits

...

2 Commits

Author SHA1 Message Date
tangyi b3a00f704e 咨询师页面 2022-03-05 22:20:31 +08:00
tangyi 01302f836f 咨询师页面 2022-03-05 22:20:03 +08:00
4 changed files with 1165 additions and 15591 deletions

15145
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,14 +8,11 @@
<!-- 轮播图 -->
<div class="banner detail-banner">
<div class="detail-photo">
<span><img src="../../assets/images/home/expert/expert-list.jpg" ></span>
<span><img :src="host + expertDetail.avatar" ></span>
<div class="detail-txt">
<h1>赵晓<span>专家咨询师</span></h1>
<h1>{{expertDetail.name}}<span>{{expertDetail.tags_text}}</span></h1>
<p>
<span>中科院心理所</span>
<span>硕士</span>
<span>从业5年</span>
<span>熟悉新高考</span>
<span v-for="(item,index) in expertDetail.keywords_list" :key="index">{{item}}</span>
</p>
</div>
</div>
@ -27,51 +24,31 @@
<span>咨询理念</span>
<img src="../../assets/images/home/expert/abstract-right.png" >
</h2>
<p>这里展示咨询理念的文字内容这里展示咨询理念的 文字内容这里展示咨询理念的文字内容这里展示 咨询理念的文字内容这里展示理</p>
<p>{{expertDetail.slogan}}</p>
</div>
<div class="detail-content detail-section">
<div class="expert-body">
<h2>个人简介</h2>
<span>
<p>期从事高考志愿填报研究工作尤其是在准确定位考生定量分析院校录取数据方面有独到见解创立了3/8线差法是各大网站及电视台教育频道的常邀嘉宾多次接受有关期刊杂志专访长期从事高考志愿填报研究工作</p>
<p>{{expertDetail.summary}}</p>
</span>
</div>
<div class="expert-region">
<h2>服务区域</h2>
<p>
全国尤其擅长河南省北京市河北省内蒙古自治区的志愿填报
<span>{{expertDetail.service_area_text}}</span>
<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">
<div class="case-img"><img src="../../assets/images/home/expert/detail.jpg" alt=""></div>
<h3><span>案例1</span>完美的与湖北工业相遇</h3>
<p><span>录取结果</span><span>604超专业线4分湖北工业大学电子工程 专业</span></p>
<p><span>专业定位</span><span>兴趣纬度</span> </p>
<p><span>兴趣类型</span><span>这里展示兴趣类型的文字内容这里展示兴趣类型的文字内容这里展示兴趣类型的文 字内容.</span></p>
</div>
<div class="expert-case-item">
<div class="case-img"><img src="../../assets/images/home/expert/detail.jpg" alt=""></div>
<h3><span>案例1</span>完美的与湖北工业相遇</h3>
<p><span>录取结果</span><span>604超专业线4分湖北工业大学电子工程 专业</span></p>
<p><span>专业定位</span><span>兴趣纬度</span> </p>
<p><span>兴趣类型</span><span>这里展示兴趣类型的文字内容这里展示兴趣类型的文字内容这里展示兴趣类型的文 字内容.</span></p>
</div>
<div class="expert-case-item">
<div class="case-img"><img src="../../assets/images/home/expert/detail.jpg" alt=""></div>
<h3><span>案例1</span>完美的与湖北工业相遇</h3>
<p><span>录取结果</span><span>604超专业线4分湖北工业大学电子工程 专业</span></p>
<p><span>专业定位</span><span>兴趣纬度</span> </p>
<p><span>兴趣类型</span><span>这里展示兴趣类型的文字内容这里展示兴趣类型的文字内容这里展示兴趣类型的文 字内容.</span></p>
</div>
<div class="expert-case-item">
<div class="case-img"><img src="../../assets/images/home/expert/detail.jpg" alt=""></div>
<h3><span>案例1</span>完美的与湖北工业相遇</h3>
<p><span>录取结果</span><span>604超专业线4分湖北工业大学电子工程 专业</span></p>
<p><span>专业定位</span><span>兴趣纬度</span> </p>
<p><span>兴趣类型</span><span>这里展示兴趣类型的文字内容这里展示兴趣类型的文字内容这里展示兴趣类型的文 字内容.</span></p>
<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>
<p v-if="item.location_remarks"><span>专业定位</span><span>{{item.location_remarks}}</span> </p>
<p v-if="item.other_remarks"><span>兴趣类型</span><span>{{item.other_remarks}}</span></p>
</div>
</div>
</div>
@ -82,23 +59,84 @@
<script>
export default {
name: "edit-detail",
name: "expert-detail",
data() {
return {
isScrollTop: false
isScrollTop: false,
expertDetail: [],
expertCase: [],
id: ''
}
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
this.id = this.$route.query.id;
},
mounted() {
this.getDetailData();
this.getExpertCase();
},
computed: {
},
methods: {
//
getDetailData() {
let that = this;
this.axios
.post(this.HOME + "/api/consumer/expert-info", {
id: that.id
})
.then(function (res) {
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;
if (scrollTop >= 5) {
@ -113,6 +151,7 @@
}
}
},
},
destroyed() {
window.removeEventListener("scroll", this.eventScrollTop);

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,13 @@
<template>
<<<<<<< HEAD
<div class="content my-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 class="content">
<!-- 头部 -->
<div :class="{'header':true,'scroll white':isScrollTop,'white':true}">
@ -33,70 +42,218 @@
</li>
</ul>
</div>
>>>>>>> 31ac1df69ae7462dac9a9171cb8e6856291e7c2a
</div>
<!-- 咨询师列表 -->
<div class="expert-list-all section">
<ul class="expert-list">
<li>
<div class="expert-list-con">
<div class="expert-list-img">
<img :src="this.host+userData.avatar" alt="" />
</div>
<div class="expert-list-txt">
<div class="title">
<h2>{{ userData.name }}</h2>
<span v-if="userData.title">{{ userData.title }}</span>
</div>
<div class="integral">
<span>公益积分{{ userData.score }}</span>
<span>好评度{{ userData.comment_score }}</span>
</div>
<div class="honor">
<span
v-for="(itemk, indexk) in userData.keywords_list"
:key="indexk"
>{{ itemk }}</span
>
</div>
<div class="slogan">{{ userData.summary }}</div>
</div>
</div>
<div class="expert-list-btns">
<div :class="{ btn: true }">向TA提问</div>
<div class="btn">查看详情</div>
</div>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "edit-list",
data(){
return {
isScrollTop: false,
isReceive: 1, //
current: 0,
isConfirm: false,
expertData: [
{name:'赵晓',title:'金牌咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{name:'赵晓',title:'专家咨询师',imgsrc:'../../assets/images/home/index/expert.png',integral:'985',score:'8.5',honor:[{title:'中科院心理科'},{title:'硕士'},{title:'从业5年'},{title:'熟悉高考'}],slogan:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'}
],
}
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
},
methods:{
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;
}
}
},
goPage(path){
this.$router.push(path);
}
export default {
name: "edit-list",
data() {
return {
isScrollTop: false,
isReceive: 1, //
current: 0,
isConfirm: false,
userData:{},
expertData: [
{
name: "赵晓",
title: "金牌咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
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);
}
}
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
name: "赵晓",
title: "专家咨询师",
imgsrc: "../../assets/images/home/index/expert.png",
integral: "985",
score: "8.5",
honor: [
{ title: "中科院心理科" },
{ title: "硕士" },
{ title: "从业5年" },
{ title: "熟悉高考" },
],
slogan: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
],
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
this.checkExperInfo();
},
methods: {
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;
}
}
},
goPage(path) {
this.$router.push(path);
},
checkExperInfo() {
let that = this;
this.axios
.post(this.HOME + "/api/user/center-info", {})
.then(function (res) {
console.log(res.data.data.expert);
that.userData = res.data.data.expert;
console.log( that.userData);
});
},
},
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>
<<<<<<< HEAD
.expert-list>li{
}
.my-content{
padding-top: 1rem;
}
=======
.expert-list{
margin-top: 1.2rem;
}
>>>>>>> 31ac1df69ae7462dac9a9171cb8e6856291e7c2a
</style>