咨询师页面

master
tangyi 2022-03-05 22:20:03 +08:00
parent 4c74ce1119
commit 01302f836f
4 changed files with 1159 additions and 15626 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);

View File

@ -1,24 +1,32 @@
<template>
<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: 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="edit pull-content">
<div class="edit-list">
<div class="personal-item">
<p>姓名<span>{{name}}</span></p>
<p>等级<span>{{tags_text}}</span></p>
<p>
姓名<span>{{ name }}</span>
</p>
<p>
等级<span>{{ tags_text }}</span>
</p>
</div>
<!-- 形象照 -->
<div class="personal-item">
<p>形象照</p>
<div class="personal-txt">
<div class="personal-photo">
<img v-if="myAvatar" :src="host + myAvatar">
<img v-else-if="handImg" :src="host + handImg">
<span v-else>使16:17400425</span>
<img v-if="myAvatar" :src="host + myAvatar" />
<img v-else-if="handImg" :src="host + handImg" />
<span v-else
>上传图片的区域照片必须使用固定的宽高比16:17比如宽400像素高425像素或其它同等比例</span
>
</div>
<div class="edit-btn">
<input class="inputB" @change="imgIny($event)" type="file" />
@ -34,10 +42,10 @@
<!-- 文本显示 -->
<!-- <span>硕士</span> -->
<!-- 输入框 -->
<input class="personal-input" />
<input v-model="Characteristics[0]" class="personal-input" />
</div>
<!-- 按钮事件 -->
<div class="edit-btn">确认</div>
<div @click="CharacteristicsFun()" class="edit-btn">确认</div>
</div>
</div>
<div class="personal-item">
@ -47,10 +55,10 @@
<!-- 文本显示 -->
<!-- <span>硕士</span> -->
<!-- 输入框 -->
<input class="personal-input" />
<input v-model="Characteristics[1]" class="personal-input" />
</div>
<!-- 按钮事件 -->
<div class="edit-btn">确认</div>
<div @click="CharacteristicsFun()" class="edit-btn">确认</div>
</div>
</div>
<div class="personal-item">
@ -60,10 +68,10 @@
<!-- 文本显示 -->
<!-- <span>硕士</span> -->
<!-- 输入框 -->
<input class="personal-input" />
<input v-model="Characteristics[2]" class="personal-input" />
</div>
<!-- 按钮事件 -->
<div class="edit-btn">确认</div>
<div @click="CharacteristicsFun()" class="edit-btn">确认</div>
</div>
</div>
<div class="personal-item">
@ -73,10 +81,10 @@
<!-- 文本显示 -->
<!-- <span>硕士</span> -->
<!-- 输入框 -->
<input class="personal-input" />
<input v-model="Characteristics[3]" class="personal-input" />
</div>
<!-- 按钮事件 -->
<div class="edit-btn">确认</div>
<div @click="CharacteristicsFun()" class="edit-btn">确认</div>
</div>
</div>
<!-- 服务口号 -->
@ -84,9 +92,13 @@
<p>服务口号</p>
<div class="personal-txt">
<div class="personal-top">
<textarea class="kh-input" v-model="sloganData" placeholder="请输入服务口号"></textarea>
<textarea
class="kh-input"
v-model="sloganData"
placeholder="请输入服务口号"
></textarea>
</div>
<div class="edit-btn">确认</div>
<div @click="sloganDataFun()" class="edit-btn">确认</div>
</div>
</div>
<!-- 个人简介 start -->
@ -94,9 +106,12 @@
<p>个人简介</p>
<div class="personal-txt">
<div class="personal-top">
<textarea v-model="bodyData" placeholder="介绍您最闪光点不要少于200字不要多于300字"></textarea>
<textarea
v-model="bodyData"
placeholder="介绍您最闪光点不要少于200字不要多于300字"
></textarea>
</div>
<div class="edit-btn">确认</div>
<div @click="bodyDataFun()" class="edit-btn">确认</div>
</div>
</div>
<!-- 服务范围补充说明 -->
@ -104,9 +119,12 @@
<p>服务范围补充说明</p>
<div class="personal-txt">
<div class="personal-top">
<textarea v-model="explainData" placeholder="请填写补充说明"></textarea>
<textarea
v-model="explainData"
placeholder="请填写补充说明"
></textarea>
</div>
<div class="edit-btn">确认</div>
<div @click="explainDataFun()" class="edit-btn">确认</div>
</div>
</div>
@ -116,15 +134,30 @@
<div class="personal-txt">
<div class="city-item">
<div>重点服务省域1</div>
<input type="text" v-model="provinceData[cityIndex1].title" readonly="readonly" @click="openCity1()"/>
<input
type="text"
v-model="addRess[0].name"
readonly="readonly"
@click="openCity1()"
/>
</div>
<div class="city-item">
<div>重点服务省域2</div>
<input type="text" v-model="provinceData[cityIndex2].title" readonly="readonly" @click="openCity2()"/>
<input
type="text"
v-model="addRess[1].name"
readonly="readonly"
@click="openCity2()"
/>
</div>
<div class="city-item">
<div>重点服务省域3</div>
<input type="text" v-model="provinceData[cityIndex3].title" readonly="readonly" @click="openCity3()"/>
<input
type="text"
v-model="addRess[2].name"
readonly="readonly"
@click="openCity3()"
/>
</div>
</div>
</div>
@ -133,181 +166,319 @@
<p>服务价格您是专家级咨询师可自由定价</p>
<div class="personal-txt">
<div class="price-item">
<div> 北京上海</div>
<input type="text" v-model="priceData[priceIndex1].title" readonly="readonly" @click="openPrice1()"/>
<div>北京上海</div>
<input
type="text"
v-model="priceDataLst[0]"
readonly="readonly"
@click="openPrice1()"
/>
</div>
<div class="price-item">
<div>天津重庆江苏浙江广东福建</div>
<input type="text" v-model="priceData[priceIndex2].title" readonly="readonly" @click="openPrice2()"/>
<input
type="text"
v-model="priceDataLst[1]"
readonly="readonly"
@click="openPrice2()"
/>
</div>
<div class="price-item">
<div>辽宁河北山东海南湖北湖南</div>
<input type="text" v-model="priceData[priceIndex3].title" readonly="readonly" @click="openPrice3()"/>
<input
type="text"
v-model="priceDataLst[2]"
readonly="readonly"
@click="openPrice3()"
/>
</div>
<div class="price-item">
<div>其他省域(老高考)</div>
<input type="text" v-model="priceData[priceIndex4].title" readonly="readonly" @click="openPrice4()"/>
<input
type="text"
v-model="priceDataLst[3]"
readonly="readonly"
@click="openPrice4()"
/>
</div>
<div class="edit-btn">确认</div>
<div @click="priceDataLstFun()" class="edit-btn">确认</div>
</div>
</div>
</div>
</div>
<div class="preview-btns">
<span>预览列表页效</span>
<span>预览详情页效</span>
<span @click="navdetailLst()"></span>
<span @click="navdetail()"></span>
</div>
<!-- 地址弹出框1 -->
<div class="addr-select-bg" v-show="isCity1" @click="isCity1=!isCity1"></div>
<div
class="addr-select-bg"
v-show="isCity1"
@click="isCity1 = !isCity1"
></div>
<div class="addr-select-item" v-show="isCity1">
<div class="addr-btns">
<span>请选择城市</span>
<span @click="isCity1=!isCity1"></span>
<span @click="isCity1 = !isCity1"></span>
</div>
<ul>
<li :class="{'checked':index == cityIndex1}" @click="getCityValue1(index,item)" v-for="(item,index) in provinceData" :key="index">{{item.title}}<img v-show="index==cityIndex1" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == cityIndex1 }"
@click="getCityValue1(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name
}}<img
v-show="index == cityIndex1"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 地址弹出框2 -->
<div class="addr-select-bg" v-show="isCity2" @click="isCity2=!isCity2"></div>
<div
class="addr-select-bg"
v-show="isCity2"
@click="isCity2 = !isCity2"
></div>
<div class="addr-select-item" v-show="isCity2">
<div class="addr-btns">
<span>请选择城市</span>
<span @click="isCity2=!isCity2"></span>
<span @click="isCity2 = !isCity2"></span>
</div>
<ul>
<li :class="{'checked':index == cityIndex2}" @click="getCityValue2(index,item)" v-for="(item,index) in provinceData" :key="index">{{item.title}}<img v-show="index==cityIndex2" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == cityIndex2 }"
@click="getCityValue2(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name
}}<img
v-show="index == cityIndex2"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 地址弹出框3 -->
<div class="addr-select-bg" v-show="isCity3" @click="isCity3=!isCity3"></div>
<div
class="addr-select-bg"
v-show="isCity3"
@click="isCity3 = !isCity3"
></div>
<div class="addr-select-item" v-show="isCity3">
<div class="addr-btns">
<span>请选择城市</span>
<span @click="isCity3=!isCity3"></span>
<span @click="isCity3 = !isCity3"></span>
</div>
<ul>
<li :class="{'checked':index == cityIndex3}" @click="getCityValue3(index,item)" v-for="(item,index) in provinceData" :key="index">{{item.title}}<img v-show="index==cityIndex3" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == cityIndex3 }"
@click="getCityValue3(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name
}}<img
v-show="index == cityIndex3"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 价格弹出框1 -->
<div class="addr-select-bg" v-show="isPrice1" @click="isPrice1=!isPrice1"></div>
<div
class="addr-select-bg"
v-show="isPrice1"
@click="isPrice1 = !isPrice1"
></div>
<div class="addr-select-item" v-show="isPrice1">
<div class="addr-btns">
<span>请选择价格</span>
<span @click="isPrice1=!isPrice1"></span>
<span @click="isPrice1 = !isPrice1"></span>
</div>
<ul>
<li :class="{'checked':index == priceIndex1}" @click="getPriceValue1(index,item)" v-for="(item,index) in priceData" :key="index">{{item.title}}<img v-show="index==priceIndex1" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == priceIndex1 }"
@click="getPriceValue1(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item
}}<img
v-show="index == priceIndex1"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 价格弹出框2 -->
<div class="addr-select-bg" v-show="isPrice2" @click="isPrice2=!isPrice2"></div>
<div
class="addr-select-bg"
v-show="isPrice2"
@click="isPrice2 = !isPrice2"
></div>
<div class="addr-select-item" v-show="isPrice2">
<div class="addr-btns">
<span>请选择价格</span>
<span @click="isPrice2=!isPrice2"></span>
<span @click="isPrice2 = !isPrice2"></span>
</div>
<ul>
<li :class="{'checked':index == priceIndex2}" @click="getPriceValue2(index,item)" v-for="(item,index) in priceData" :key="index">{{item.title}}<img v-show="index==priceIndex2" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == priceIndex2 }"
@click="getPriceValue2(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item
}}<img
v-show="index == priceIndex2"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 价格弹出框3 -->
<div class="addr-select-bg" v-show="isPrice3" @click="isPrice3=!isPrice3"></div>
<div
class="addr-select-bg"
v-show="isPrice3"
@click="isPrice3 = !isPrice3"
></div>
<div class="addr-select-item" v-show="isPrice3">
<div class="addr-btns">
<span>请选择价格</span>
<span @click="isPrice3=!isPrice3"></span>
<span @click="isPrice3 = !isPrice3"></span>
</div>
<ul>
<li :class="{'checked':index == priceIndex3}" @click="getPriceValue3(index,item)" v-for="(item,index) in priceData" :key="index">{{item.title}}<img v-show="index==priceIndex3" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == priceIndex3 }"
@click="getPriceValue3(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item
}}<img
v-show="index == priceIndex3"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
<!-- 价格弹出框4 -->
<div class="addr-select-bg" v-show="isPrice4" @click="isPrice4=!isPrice4"></div>
<div
class="addr-select-bg"
v-show="isPrice4"
@click="isPrice4 = !isPrice4"
></div>
<div class="addr-select-item" v-show="isPrice4">
<div class="addr-btns">
<span>请选择价格</span>
<span @click="isPrice4=!isPrice4"></span>
<span @click="isPrice4 = !isPrice4"></span>
</div>
<ul>
<li :class="{'checked':index == priceIndex4}" @click="getPriceValue4(index,item)" v-for="(item,index) in priceData" :key="index">{{item.title}}<img v-show="index==priceIndex4" src="../../assets/images/home/expert/yes.png"></li>
<li
:class="{ checked: index == priceIndex4 }"
@click="getPriceValue4(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item
}}<img
v-show="index == priceIndex4"
src="../../assets/images/home/expert/yes.png"
/>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
export default {
name: "edit",
data(){
data() {
return {
isScrollTop: false,
name:'',
tags_text: '',
sloganData: '',
bodyData: '',
explainData: '',
name: "",
tags_text: "",
sloganData: "",
Characteristics: [],
bodyData: "",
explainData: "",
editData: {
avatar: "",
keywords: "",
slogan: "",
summary: "",
service_area_text: "",
service_area_main: "",
tel: "",
ding_code: "",
price_area_a: "",
price_area_b: "",
price_area_c: "",
price_area_other: "",
},
isCity1: false, //
provinceData:[
{title:'北京'},
{title:'上海'},
{title:'广州'},
{title:'四川'},
{title:'重庆'},
{title:'山西'},
{title:'贵州'},
{title:'河南'},
{title:'江西'},
{title:'宁夏'},
{title:'香港'},
{title:'台湾'},
{title:'澳门'}
],
provinceData: [],
cityIndex1: 0,
cityValue1:'', //
cityValue1: "", //
isCity2: false, //
cityIndex2: 0,
cityValue2:'', //
cityValue2: "", //
isCity3: false, //
cityIndex3: 0,
cityValue3:'', //
cityValue3: "", //
addRess: [],
//
priceData:[
{title:'3000-5000'},
{title:'5000-8000'},
{title:'8000-12000'},
{title:'12000-15000'},
{title:'15000-18000'},
{title:'18000-22000'}
priceDataLst:[],
priceData: [
{ title: "3980" },
{ title: "4980" },
{ title: "5980" },
{ title: "6980" },
{ title: "8980" },
{ title: "8980" },
{ title: "9980" },
{ title: "10980" },
{ title: "11980" },
{ title: "12980" },
{ title: "13980" },
{ title: "14980" },
{ title: "15980" },
{ title: "16980" },
{ title: "17980" },
{ title: "18980" },
{ title: "19980" },
{ title: "20980" },
],
isPrice1: false, //
priceIndex1: 0,
priceValue1:'', //
priceValue1: "", //
isPrice2: false, //
priceIndex2: 0,
priceValue2:'', //
priceValue2: "", //
isPrice3: false, //
priceIndex3: 0,
priceValue3:'', //
priceValue3: "", //
isPrice4: false, //
priceIndex4: 0,
priceValue4:'', //
handImg: '' ,//
priceValue4: "", //
handImg: "", //
myAvatar: ''
}
myAvatar: "",
};
},
created() {
this.isScroll = true;
@ -315,15 +486,115 @@
},
mounted() {
this.checkExperInfo();
this.getAddrData();
this.getPricerData()
},
methods:{
methods: {
navdetail(){
this.$router.push({
path: "/edit/detail",
query: {
id: this.id,
},
});
},
navdetailLst(){
this.$router.push({
path: "/edit/list",
query: {
id: this.id,
},
});
},
priceDataLstFun(){
this.editData.service_area_main=""
for (let index = 0; index < this.addRess.length; index++) {
if (this.addRess[index].code) {
this.editData.service_area_main+=this.addRess[index].code+","
}
}
this.editData.price_area_a=this.priceDataLst[0]
this.editData.price_area_b=this.priceDataLst[1]
this.editData.price_area_c=this.priceDataLst[2]
this.editData.price_area_other=this.priceDataLst[3]
this.editExpertInfo()
},
explainDataFun(){
this.editData.service_area_text=this.explainData
this.editExpertInfo()
},
bodyDataFun(){
this.editData.summary=this.bodyData
this.editExpertInfo()
},
sloganDataFun(){
this.editData.slogan=this.sloganData
this.editExpertInfo()
},
CharacteristicsFun(){
console.log(this.Characteristics);
this.editData.keywords=""
for (let index = 0; index < this.Characteristics.length; index++) {
this.editData.keywords+=this.Characteristics[index]+","
}
this.editExpertInfo()
console.log(this.editData.keywords,"123")
},
ModifyData() {
this.axios
.post(this.HOME + "/api/expert/edit-expert-info")
.then(function () {})
.catch(function (error) {
console.log(error);
});
},
getPricerData() {
let that = this;
this.axios
.post(this.HOME + "/api/expert/service-price-list", {
pcode: 86,
})
.then(function (res) {
console.log(res.data.data,"------");
that.priceDataLst=res.data.data
});
},
getAddrData() {
let that = this;
this.axios
.post(this.HOME + "/api/area/index", {
pcode: 86,
})
.then(function (res) {
console.log(res);
that.provinceData = res.data.data;
console.log(that.provinceData);
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);
});
});
},
//
imgIny(e) {
let that = this;
const files = e.target.files;
console.log(files[0]);
console.log({
image: files[0]
image: files[0],
});
var fromdata = new FormData();
fromdata.append("image", files[0]);
@ -333,100 +604,159 @@
"Content-Type": "multipart/form-data",
},
})
.then(function(res) {
.then(function (res) {
that.editData.avatar = res.data.data.src;
that.myAvatar = res.data.data.src;
console.log(that.myAvatar, 123);
that.editExpertInfo()
})
.catch(function(error) {
.catch(function (error) {
console.log(error);
});
},
//
openCity1(){
this.isCity1=!this.isCity1;
openCity1() {
this.isCity1 = !this.isCity1;
},
getCityValue1(index,item){
getCityValue1(index, item) {
console.log(item)
this.addRess[0].code=item.code
this.addRess[0].name=item.name
this.cityValue1 = item.title;
this.cityIndex1 = index;
this.isCity1=false;
this.isCity1 = false;
},
openCity2(){
this.isCity2=!this.isCity2;
openCity2() {
console.log(this.provinceData);
this.isCity2 = !this.isCity2;
},
getCityValue2(index,item){
getCityValue2(index, item) {
this.addRess[1].code=item.code
this.addRess[1].name=item.name
this.cityValue2 = item.title;
this.cityIndex2 = index;
this.isCity2=false;
this.isCity2 = false;
},
openCity3(){
this.isCity3=!this.isCity3;
openCity3() {
this.isCity3 = !this.isCity3;
},
getCityValue3(index,item){
getCityValue3(index, item) {
this.addRess[2].code=item.code
this.addRess[2].name=item.name
this.cityValue3 = item.title;
this.cityIndex3 = index;
this.isCity3=false;
this.isCity3 = false;
},
//
openPrice1(){
this.isPrice1=!this.isPrice1;
openPrice1() {
this.isPrice1 = !this.isPrice1;
},
getPriceValue1(index,item){
getPriceValue1(index, item) {
console.log(this.priceDataLst)
this.priceDataLst[0]=item
this.priceValue1 = item.title;
this.priceIndex1 = index;
this.isPrice1=false;
this.isPrice1 = false;
},
openPrice2(){
this.isPrice2=!this.isPrice2;
openPrice2() {
this.isPrice2 = !this.isPrice2;
},
getPriceValue2(index,item){
getPriceValue2(index, item) {
this.priceDataLst[1]=item
this.priceValue2 = item.title;
this.priceIndex2 = index;
this.isPrice2=false;
this.isPrice2 = false;
},
openPrice3(){
this.isPrice3=!this.isPrice3;
openPrice3() {
this.isPrice3 = !this.isPrice3;
},
getPriceValue3(index,item){
getPriceValue3(index, item) {
this.priceDataLst[2]=item
this.priceValue3 = item.title;
this.priceIndex3 = index;
this.isPrice3=false;
this.isPrice3 = false;
},
openPrice4(){
this.isPrice4=!this.isPrice4;
openPrice4() {
this.isPrice4 = !this.isPrice4;
},
getPriceValue4(index,item){
getPriceValue4(index, item) {
this.priceDataLst[3]=item
console.log( this.priceDataLst)
this.priceValue4 = item.title;
this.priceIndex4 = index;
this.isPrice4=false;
this.isPrice4 = false;
},
//
checkExperInfo(){
let that =this;
checkExperInfo() {
let that = this;
this.axios
.post(this.HOME + "/api/user/center-info", {
})
.then(function(res) {
.post(this.HOME + "/api/user/center-info", {})
.then(function (res) {
console.log(res.data.data.expert);
let newArray = res.data.data.expert;
that.id=newArray.id
that.editData= {
avatar: newArray.avatar,
keywords: newArray.keywords,
slogan: newArray.slogan,
summary: newArray.summary,
service_area_text: newArray.service_area_text,
service_area_main: newArray.service_area_main,
tel:newArray.tel ,
ding_code:newArray.ding_code,
price_area_a:newArray.price_area_a,
price_area_b:newArray.price_area_b,
price_area_c:newArray.price_area_c,
price_area_other:newArray.price_area_other,
},
console.log(that.editData)
that.handImg = newArray.avatar;
that.name = newArray.name;
that.tags_text = newArray.tags_text;
that.sloganData = newArray.slogan;
console.log(res.data.data.expert,123);
that.bodyData = newArray.summary;
that.explainData = newArray.service_area_text;
that.Characteristics = res.data.data.expert.keywords.split(",");
that.addressData = res.data.data.expert.service_area_main.split(",");
that.addRess = res.data.data.expert.service_area_main_list;
if (that.addRess.length < 3) {
for (let index = 0; index < 3; index++) {
that.addRess.push({
code: "",
name: "未填写",
});
}
}
console.log(that.addRess);
});
},
//
goPage(path){
goPage(path) {
this.$router.push(path);
},
editExpertInfo(){
let that=this
this.axios
.post(this.HOME + "/api/expert/edit-expert-info", this.editData )
.then(function (res) {
console.log(res)
that.checkExperInfo()
})
.catch(function (error) {
console.log(error);
});
},
//
eventScrollTop() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
if (scrollTop >= 5) {
if (this.isScroll) {
this.isScroll = false;
@ -438,7 +768,7 @@
this.isScrollTop = false;
}
}
}
},
},
destroyed() {
window.removeEventListener("scroll", this.eventScrollTop);
@ -446,15 +776,14 @@
//keep-alive
activated() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop)
window.addEventListener("scroll", this.eventScrollTop);
},
//keep-alive
deactivated() {
window.removeEventListener("scroll", this.eventScrollTop);
}
}
},
};
</script>
<style scoped>
</style>

View File

@ -1,33 +1,41 @@
<template>
<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: 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="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="../../assets/images/home/index/expert.png" alt=""></div>
<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>{{item.name}}</h2>
<span v-if="item.title">{{item.title}}</span>
<h2>{{ userData.name }}</h2>
<span v-if="userData.title">{{ userData.title }}</span>
</div>
<div class="integral">
<span>公益积分{{item.integral}}</span>
<span>好评度{{item.score}}</span>
<span>公益积分{{ userData.score }}</span>
<span>好评度{{ userData.comment_score }}</span>
</div>
<div class="honor">
<span v-for="(itemk,indexk) in item.honor" :key="indexk">{{itemk.title}}</span>
<span
v-for="(itemk, indexk) in userData.keywords_list"
:key="indexk"
>{{ itemk }}</span
>
</div>
<div class="slogan">{{item.slogan}}</div>
<div class="slogan">{{ userData.summary }}</div>
</div>
</div>
<div class="expert-list-btns">
<div :class="{'btn':true}">向TA提问</div>
<div :class="{ btn: true }">向TA提问</div>
<div class="btn">查看详情</div>
</div>
</li>
@ -37,33 +45,126 @@
</template>
<script>
export default {
export default {
name: "edit-list",
data(){
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:'一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!'},
{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: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
},
{
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:{
methods: {
eventScrollTop() {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
let scrollTop =
document.body.scrollTop || document.documentElement.scrollTop;
if (scrollTop >= 5) {
if (this.isScroll) {
this.isScroll = false;
@ -76,25 +177,40 @@
}
}
},
goPage(path){
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)
window.addEventListener("scroll", this.eventScrollTop);
},
//keep-alive
deactivated() {
window.removeEventListener("scroll", this.eventScrollTop);
}
}
},
};
</script>
<style scoped>
.expert-list>li{
}
.my-content{
padding-top: 1rem;
}
</style>