咨询师页面
commit
ed666f6bdc
|
@ -45,172 +45,227 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
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: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
|
||||
},
|
||||
{
|
||||
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);
|
||||
});
|
||||
},
|
||||
},
|
||||
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: "一所好的大学,是年轻人的家,是他 们度过人生最好时光的地方!",
|
||||
},
|
||||
{
|
||||
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);
|
||||
},
|
||||
};
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
=======
|
||||
.expert-list {
|
||||
margin-top: 1.2rem;
|
||||
}
|
||||
</style>
|
||||
>>>>>>> 2e3bf35c8277742f7f114de60ac3ba103f75ee67
|
||||
|
|
Loading…
Reference in New Issue