咨询师端接口调用

master
Lee-1203 2022-03-05 17:09:34 +08:00
parent aec17529bd
commit da8aee0850
6 changed files with 952 additions and 1082 deletions

View File

@ -1695,7 +1695,7 @@ textarea::-webkit-input-placeholder{
color: #3844ce;
}
.report-list>li span{
width: 2.1rem;
width: 2.5rem;
font-size: .24rem;
text-align: right;
color: #999999;
@ -1909,11 +1909,11 @@ textarea::-webkit-input-placeholder{
border-bottom: .02rem solid #333fc9;
}
.exponent-item-son{
margin-top: .15rem;
margin-top: .25rem;
}
.exponent-item-son span{
display: block;
font-size: .28rem;
font-size: .26rem;
line-height: 1.2;
margin: .15rem 0;
text-align: center;

View File

@ -8,22 +8,22 @@
<div class="consultant pull-content">
<div class="consultant-photo">
<div>
<span><img src="../../assets/images/user/photo.png"></span>
<span><img :src="host + experObj.avatar"></span>
<p>
<span><em>姓名</em>李四</span>
<span><em>职称</em>高级咨询师</span>
<span><em>电话</em>18683958573</span>
<span><em>姓名</em>{{experObj.name}}</span>
<span><em>职称</em>{{experObj.tags_text}}</span>
<span><em>电话</em>{{experObj.phone}}</span>
</p>
</div>
<p @click="editInformation()"></p>
</div>
<div class="consultant-info">
<p><span>重点服务区域</span>北京上海</p>
<p><span>区域1的服务价格</span>3000-12000</p>
<p><span>区域2的服务价格</span>3000-12000</p>
<p><span>区域3的服务价格</span>3000-12000</p>
<p><span>其他区域的服务价格</span>3000-12000</p>
<p><span>服务口号</span>教会孩子规划人生旅程重要的是帮助TA构建终身学习的生活态度</p>
<p><span>重点服务区域</span>{{experObj.service_area_text}}</p>
<p><span>区域1的服务价格</span>{{experObj.price_area_a}}</p>
<p><span>区域2的服务价格</span>{{experObj.price_area_b}}</p>
<p><span>区域3的服务价格</span>{{experObj.price_area_c}}</p>
<p><span>其他区域的服务价格</span>{{experObj.price_area_other}}</p>
<p><span>服务口号</span>{{experObj.slogan}}</p>
</div>
<div class="case-administer">
<h3>案例管理</h3>
@ -36,47 +36,14 @@
<span>主案例</span>
<span>操作</span>
</li>
<li>
<span><img src="../../assets/images/home/expert/detail.jpg" alt=""></span>
<span><p>完美的与湖北工业相遇完美的与湖北业相遇</p></span>
<span></span>
<li v-for="(item,index) in expertCase" :key="index">
<span><img :src="host + item.cover"></span>
<span><p>{{item.title}}</p></span>
<span>{{item.is_main==1?"":"否"}}</span>
<span>
<ins>
<em @click="editCase()"></em>
<em>删除</em>
</ins>
</span>
</li>
<li>
<span><img src="../../assets/images/home/expert/detail.jpg" alt=""></span>
<span><p>完美的与湖北工业相遇</p></span>
<span></span>
<span>
<ins>
<em>编辑</em>
<em>删除</em>
</ins>
</span>
</li>
<li>
<span><img src="../../assets/images/home/expert/detail.jpg" alt=""></span>
<span><p>完美的与湖北工业相遇</p></span>
<span></span>
<span>
<ins>
<em>编辑</em>
<em>删除</em>
</ins>
</span>
</li>
<li>
<span><img src="../../assets/images/home/expert/detail.jpg" alt=""></span>
<span><p>完美的与湖北工业相遇</p></span>
<span></span>
<span>
<ins>
<em>编辑</em>
<em>删除</em>
<em @click="editCase(index)"></em>
<em @click="deleteCase(item.id)"></em>
</ins>
</span>
</li>
@ -91,25 +58,98 @@
data(){
return {
isScrollTop: false,
id: '',
page: 1,//
size: 10,//
is_main: -1,//
allowLoad:true,//
experObj: [],//
expertCase: [],//
}
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
},
mounted() {
this.checkExperInfo();
},
methods:{
//
checkExperInfo(){
let that = this;
this.axios
.post(this.HOME + "/api/user/center-info", {
})
.then(function(res) {
console.log(res,123)
that.experObj = res.data.data.expert
// that.id = that.experObj.id;
//
that.getExpertCase(that.id)
});
},
//
getExpertCase(id){
let that = this;
let anId = id;
this.axios
.post(this.HOME + "/api/expert/get-expert-case-list", {
page: that.page,
size: that.size,
expert_id: anId,
is_main: that.is_main
})
.then(function(res) {
let list = res.data.data.list;
let newArray = [];
that.expertCase = [];
list.forEach(item=>{
let obj = {
id:item.id,
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,
is_main:item.is_main,
student_name:item.student_name
}
newArray.push(obj);
})
that.expertCase = that.expertCase.concat(newArray);
});
},
//
editCase(index){
let editIndex = index;
localStorage.anliObj = JSON.stringify(editIndex);
this.$router.push('/case');
},
//
deleteCase(idk){
let that = this;
let anId = idk;
this.axios
.post(this.HOME + "/api/expert/get-expert-case-list", {
ids:anId
})
.then(function(res) {
console.log(res,2525)
alert('删除成功');
that.getExpertCase(that.id);
});
},
//
editInformation(){
this.$router.push('/edit');
},
//
addCase(){
this.$router.push('/case');
},
//
editCase(){
this.$router.push('/case');
},
//
goPage(path){
this.$router.push(path);

View File

@ -1,84 +1,85 @@
<template>
<div class="content bind-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>
<div class="info-bg pull-content">
<div class="feedback-msg">
<textarea v-model="content" rows="" cols="" placeholder="请输入您反馈的内容"></textarea>
</div>
</div>
<div @click="btnFeedback()" class="bind-btn">提交</div>
</div>
<div class="content bind-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>
<div class="info-bg pull-content">
<div class="feedback-msg">
<textarea v-model="content" placeholder="请输入您反馈的内容"></textarea>
</div>
</div>
<div @click="btnFeedback()" class="bind-btn">提交</div>
</div>
</template>
<script>
export default {
name: "feedback",
data() {
return {
isScrollTop: false,
content: "",
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
},
mounted() {},
computed: {},
methods: {
btnFeedback() {
if (this.content == "") {
return;
}
this.axios
.post(
this.HOME + "/api/consumer/submit-feedback",
{ content: this.content },
)
.then(function (res) {
window.alert(res.data.msg)
})
.catch(function (error) {
console.log(error);
});
},
//
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;
}
}
},
},
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);
},
};
export default {
name: "feedback",
data() {
return {
isScrollTop: false,
content: "",
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
},
mounted() {},
computed: {},
methods: {
btnFeedback() {
if (this.content == "") {
return;
}
this.axios
.post(
this.HOME + "/api/consumer/submit-feedback", {
content: this.content
},
)
.then(function(res) {
window.alert(res.data.msg)
})
.catch(function(error) {
console.log(error);
});
},
//
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;
}
}
},
},
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>
</style>
</style>

View File

@ -1,96 +1,133 @@
<template>
<div class="content bind-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>
<div class="info-bg pull-content">
<ul class="phone-info">
<li>
<span>头像</span>
<p class="ps">
<input class="inputB" @change="imgIny($event)" type="file" />
<img src="../../../assets/images/user/photo.png" />
</p>
</li>
<li>
<span>昵称</span
><input type="text" value="" placeholder="请输入昵称" />
</li>
</ul>
</div>
<div class="bind-btn">提交</div>
</div>
<div class="content bind-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>
<div class="info-bg pull-content">
<ul class="phone-info">
<li>
<span>头像</span>
<p class="ps">
<input class="inputB" @change="imgIny($event)" type="file" />
<img v-if="myAvatar" :src="host + myAvatar">
<img v-else-if="userDataAll.avatar" :src="host + userDataAll.avatar">
<img v-else src="../../../assets/images/user/photo.png" />
</p>
</li>
<li>
<span>昵称</span><input type="text" v-model="nickName" value="" placeholder="请输入昵称" />
</li>
</ul>
</div>
<div class="bind-btn" @click="setInfo()"></div>
</div>
</template>
<script>
export default {
name: "info",
data() {
return {
isScrollTop: false,
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
},
mounted() {},
computed: {},
methods: {
imgIny(e) {
const files = e.target.files;
console.log(files[0]);
console.log({ image: files[0] });
var fromdata = new FormData();
fromdata.append("image", files[0]);
this.axios
.post(this.HOME + "/api/file/upload/image", fromdata, {
headers: {
"Content-Type": "multipart/form-data",
},
})
.then(function (res) {
console.log(res);
})
.catch(function (error) {
console.log(error);
});
},
//
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;
}
}
},
},
};
export default {
name: "info",
data() {
return {
isScrollTop: false,
myAvatar: '',
nickName:'',
userDataAll:[]
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
this.userDataAll = (JSON.parse(localStorage.getItem("centerUserData")));
this.nickName = this.userDataAll.nick_name;
},
mounted() {},
computed: {},
methods: {
imgIny(e) {
let that = this;
const files = e.target.files;
console.log(files[0]);
console.log({
image: files[0]
});
var fromdata = new FormData();
fromdata.append("image", files[0]);
this.axios
.post(this.HOME + "/api/file/upload/image", fromdata, {
headers: {
"Content-Type": "multipart/form-data",
},
})
.then(function(res) {
that.myAvatar = res.data.data.src;
console.log(that.myAvatar, 123);
})
.catch(function(error) {
console.log(error);
});
},
//
setInfo(){
let that = this;
this.axios
.post(this.HOME + "/api/user/edit-base-info", {
nick_name: that.nickName,
avatar: that.myAvatar
})
.then(function(res) {
that.getUserData();
that.$router.push('/ucenter');
console.log(res)
});
},
//
getUserData() {
let that = this;
this.axios.post(this.HOME + "/api/user/center-info").then(function (res) {
that.userData = res.data.data;
localStorage.centerUserData = JSON.stringify(res.data.data);
});
},
//
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;
}
}
},
},
};
</script>
<style scoped>
.inputB {
width: 1.1rem;
height: 1.1rem;
position: absolute;
left: 0px;
z-index: 5;
top: 0px;
opacity: 0;
}
.ps {
position: relative;
}
</style>
.inputB {
width: 1.1rem;
height: 1.1rem;
position: absolute;
left: 0px;
z-index: 5;
top: 0px;
opacity: 0;
}
.ps {
position: relative;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,205 +1,206 @@
<template>
<div class="content my-content main-content">
<!-- 头部 -->
<div :class="{ header: true, 'scroll white': isScrollTop }">
<div class="back"></div>
<div class="header-title">我的</div>
</div>
<!-- 轮播图 -->
<div class="banner my-banner">
<img src="../../../assets/images/user/banner.jpg" alt="" />
<div class="my-photo">
<span>
<img v-if="userData.avatar" :src="userData.avatar" />
<img v-else src="../../../assets/images/user/photo.png" />
</span>
<p v-if="userData.nick_name">{{ userData.nick_name }}</p>
<p v-else></p>
</div>
</div>
<!-- 免费咨询卡 -->
<div class="user-receive" @click="toPage()" v-if="isUse == 0">
<img src="../../../assets/images/user/card.png" alt="" />
<div class="receive-txt">
<span class="use-btn" v-if="isReceive == 1">使</span>
<span class="receive-btn" v-if="isReceive == 0"></span>
<p>有效期2022.2.1-2022.2.15</p>
</div>
</div>
<div class="line" v-if="isReceive == 1"></div>
<ul class="student-information">
<li v-if="userData.mobile">
<span
><img src="../../../assets/images/user/icon-phone.png" alt=""
/></span>
<p>
手机号<em>{{ userData.mobile }}</em>
</p>
</li>
<li @click="goPage('/bind')" v-else>
<span
><img src="../../../assets/images/user/icon-phone.png" alt=""
/></span>
<p>
手机号<em>{{ userData.mobile }}</em>
</p>
<img src="../../../assets/images/home/expert/arrow-right.png" alt="" />
</li>
<li @click="goPage('/info')">
<span
><img src="../../../assets/images/user/icon-student.png" alt=""
/></span>
<p>考生信息</p>
<img src="../../../assets/images/home/expert/arrow-right.png" alt="" />
</li>
</ul>
<div class="feedback" @click="goPage('/feedback')">
<span
><img src="../../../assets/images/user/icon-feedback.png" alt=""
/></span>
<p>意见和反馈</p>
<img src="../../../assets/images/home/expert/arrow-right.png" alt="" />
</div>
<div :class="{ 'my-report': true, open: isOpen }" @click="isOpen = !isOpen">
<span
><img src="../../../assets/images/user/icon-report.png" alt=""
/></span>
<p>我的报告</p>
<img src="../../../assets/images/home/expert/arrow-right.png" alt="" />
</div>
<ul :class="{ 'report-list': true, open: isOpen }">
<li v-for="(item,index) in dataList" :key="index" @click="goPage(item.id)">
<p>{{item.title}}</p>
<span>{{item.done_at}}</span>
</li>
</ul>
<div class="feedback-btn">退出登录</div>
<tabbar :current="4"></tabbar>
</div>
<div class="content my-content main-content">
<!-- 头部 -->
<div :class="{ header: true, 'scroll white': isScrollTop }">
<div class="back"></div>
<div class="header-title">我的</div>
</div>
<!-- 轮播图 -->
<div class="banner my-banner">
<img src="../../../assets/images/user/banner.jpg" alt="" />
<div class="my-photo">
<span>
<img v-if="userData.avatar" :src="host + userData.avatar" />
<img v-else src="../../../assets/images/user/photo.png" />
</span>
<p v-if="userData.nick_name">{{ userData.nick_name }}</p>
<p v-else></p>
</div>
</div>
<!-- 免费咨询卡 -->
<div class="user-receive" @click="toPage()" v-if="isUse == 0">
<img src="../../../assets/images/user/card.png" />
<div class="receive-txt">
<span class="use-btn" v-if="isReceive == 1">使</span>
<span class="receive-btn" v-if="isReceive == 0"></span>
<p>有效期2022.2.1-2022.2.15</p>
</div>
</div>
<div class="line" v-if="isReceive == 1"></div>
<ul class="student-information">
<li v-if="userData.mobile">
<span><img src="../../../assets/images/user/icon-phone.png" /></span>
<p>
手机号<em>{{ userData.mobile }}</em>
</p>
</li>
<li @click="goPage('/bind')" v-else>
<span><img src="../../../assets/images/user/icon-phone.png" /></span>
<p>
手机号<em></em>
</p>
<img src="../../../assets/images/home/expert/arrow-right.png" />
</li>
<li @click="goPage('/info')">
<span><img src="../../../assets/images/user/icon-student.png" /></span>
<p>考生信息</p>
<img src="../../../assets/images/home/expert/arrow-right.png" />
</li>
</ul>
<div class="feedback" @click="goPage('/feedback')">
<span><img src="../../../assets/images/user/icon-feedback.png" /></span>
<p>意见和反馈</p>
<img src="../../../assets/images/home/expert/arrow-right.png" />
</div>
<div :class="{ 'my-report': true, open: isOpen }" @click="isOpen = !isOpen">
<span><img src="../../../assets/images/user/icon-report.png" alt="" /></span>
<p>我的报告</p>
<img src="../../../assets/images/home/expert/arrow-right.png" alt="" />
</div>
<ul :class="{ 'report-list': true, open: isOpen }">
<li v-for="(item,index) in reportData" :key="index" @click="goReport(item.id)">
<p>{{item.title}}</p>
<span>{{item.done_at}}</span>
</li>
</ul>
<div class="feedback-btn">退出登录</div>
<tabbar :current="4"></tabbar>
</div>
</template>
<script>
import tabbar from "../../../components/tabbar.vue";
export default {
name: "expert",
components: {
tabbar,
},
data() {
return {
centerUserData: {
mobile: "",
},
dataList:[],
isScrollTop: false,
isReceive: 1, //
isUse: 0, //使
isOpen: false,
userData: {
avatar: "",
consult_amount: 0,
create_time: "",
ding_code: "",
expert_id: 0,
gender: 0,
id: 31,
im_uid: "",
lat: "",
lng: "",
login_time: "",
mobile: "",
nick_name: "",
open_id: "",
real_name: "",
tags: "",
tel: "",
type: 0,
unionid: "",
update_time: "",
user_code: "",
},
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
this.getUserData();
this.getevaluationList()
},
methods: {
getevaluationList(){
let that=this
this.axios.post(this.HOME + "/api/evaluation/evaluation-list",{
page:"1",
size:"100",
status:""
}).then(function (res) {
that.dataList=res.data.data.list
});
},
//
toPage() {
if (this.isReceive == 1) {
this.$router.push("/expert");
} else if (this.isReceive == 0) {
this.$router.push("/information");
} else {
return false;
}
},
//
goPage(id) {
this.$router.push({
path: "/report",
query: {
id:id
},
});
},
//
getUserData() {
let that = this;
this.axios.post(this.HOME + "/api/user/center-info").then(function (res) {
that.userData = res.data.data;
localStorage.centerUserData = JSON.stringify(res.data.data);
});
},
//
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;
}
}
},
},
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);
},
};
import tabbar from "../../../components/tabbar.vue";
export default {
name: "expert",
components: {
tabbar,
},
data() {
return {
centerUserData: {
mobile: "",
},
reportData: [],
isScrollTop: false,
isReceive: 1, //
isUse: 0, //使
isOpen: false,
userData: {
avatar: "",
consult_amount: 0,
create_time: "",
ding_code: "",
expert_id: 0,
gender: 0,
id: 31,
im_uid: "",
lat: "",
lng: "",
login_time: "",
mobile: "",
nick_name: "",
open_id: "",
real_name: "",
tags: "",
tel: "",
type: 0,
unionid: "",
update_time: "",
user_code: "",
},
};
},
created() {
this.isScroll = true;
window.addEventListener("scroll", this.eventScrollTop);
this.getUserData();
this.getevaluationList()
},
methods: {
//
getevaluationList() {
let that = this
this.axios.post(this.HOME + "/api/evaluation/evaluation-list", {
page: "1",
size: "100",
status: ""
}).then(function(res) {
that.reportData = res.data.data.list;
console.log(that.reportData,555)
});
},
//
toPage() {
if (this.isReceive == 1) {
this.$router.push("/expert");
} else if (this.isReceive == 0) {
this.$router.push("/information");
} else {
return false;
}
},
//
goPage(path) {
this.$router.push(path)
},
//
goReport(id) {
this.$router.push({
path: "/report",
query: {
id: id
},
});
},
//
getUserData() {
let that = this;
this.axios.post(this.HOME + "/api/user/center-info").then(function(res) {
that.userData = res.data.data;
localStorage.centerUserData = JSON.stringify(res.data.data);
});
},
//
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;
}
}
},
},
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>
.banner,
.banner img {
width: 100%;
}
.banner,
.banner img {
width: 100%;
}
</style>