调整登录后页面控制

master
Lee-1203 2022-03-06 15:24:45 +08:00
parent 2e3bf35c82
commit e83e5ce9f7
5 changed files with 680 additions and 771 deletions

View File

@ -24,9 +24,7 @@
<div class="personal-photo"> <div class="personal-photo">
<img v-if="myAvatar" :src="host + myAvatar" /> <img v-if="myAvatar" :src="host + myAvatar" />
<img v-else-if="handImg" :src="host + handImg" /> <img v-else-if="handImg" :src="host + handImg" />
<span v-else <span v-else>使16:17400425</span>
>上传图片的区域照片必须使用固定的宽高比16:17比如宽400像素高425像素或其它同等比例</span
>
</div> </div>
<div class="edit-btn"> <div class="edit-btn">
<input class="inputB" @change="imgIny($event)" type="file" /> <input class="inputB" @change="imgIny($event)" type="file" />
@ -92,11 +90,7 @@
<p>服务口号</p> <p>服务口号</p>
<div class="personal-txt"> <div class="personal-txt">
<div class="personal-top"> <div class="personal-top">
<textarea <textarea class="kh-input" v-model="sloganData" placeholder="请输入服务口号"></textarea>
class="kh-input"
v-model="sloganData"
placeholder="请输入服务口号"
></textarea>
</div> </div>
<div @click="sloganDataFun()" class="edit-btn">确认</div> <div @click="sloganDataFun()" class="edit-btn">确认</div>
</div> </div>
@ -106,10 +100,7 @@
<p>个人简介</p> <p>个人简介</p>
<div class="personal-txt"> <div class="personal-txt">
<div class="personal-top"> <div class="personal-top">
<textarea <textarea v-model="bodyData" placeholder="介绍您最闪光点不要少于200字不要多于300字"></textarea>
v-model="bodyData"
placeholder="介绍您最闪光点不要少于200字不要多于300字"
></textarea>
</div> </div>
<div @click="bodyDataFun()" class="edit-btn">确认</div> <div @click="bodyDataFun()" class="edit-btn">确认</div>
</div> </div>
@ -119,10 +110,7 @@
<p>服务范围补充说明</p> <p>服务范围补充说明</p>
<div class="personal-txt"> <div class="personal-txt">
<div class="personal-top"> <div class="personal-top">
<textarea <textarea v-model="explainData" placeholder="请填写补充说明"></textarea>
v-model="explainData"
placeholder="请填写补充说明"
></textarea>
</div> </div>
<div @click="explainDataFun()" class="edit-btn">确认</div> <div @click="explainDataFun()" class="edit-btn">确认</div>
</div> </div>
@ -134,30 +122,15 @@
<div class="personal-txt"> <div class="personal-txt">
<div class="city-item"> <div class="city-item">
<div>重点服务省域1</div> <div>重点服务省域1</div>
<input <input type="text" v-model="addRess[0].name" readonly="readonly" @click="openCity1()" />
type="text"
v-model="addRess[0].name"
readonly="readonly"
@click="openCity1()"
/>
</div> </div>
<div class="city-item"> <div class="city-item">
<div>重点服务省域2</div> <div>重点服务省域2</div>
<input <input type="text" v-model="addRess[1].name" readonly="readonly" @click="openCity2()" />
type="text"
v-model="addRess[1].name"
readonly="readonly"
@click="openCity2()"
/>
</div> </div>
<div class="city-item"> <div class="city-item">
<div>重点服务省域3</div> <div>重点服务省域3</div>
<input <input type="text" v-model="addRess[2].name" readonly="readonly" @click="openCity3()" />
type="text"
v-model="addRess[2].name"
readonly="readonly"
@click="openCity3()"
/>
</div> </div>
</div> </div>
</div> </div>
@ -167,39 +140,19 @@
<div class="personal-txt"> <div class="personal-txt">
<div class="price-item"> <div class="price-item">
<div>北京上海</div> <div>北京上海</div>
<input <input type="text" v-model="priceDataLst[0]" readonly="readonly" @click="openPrice1()" />
type="text"
v-model="priceDataLst[0]"
readonly="readonly"
@click="openPrice1()"
/>
</div> </div>
<div class="price-item"> <div class="price-item">
<div>天津重庆江苏浙江广东福建</div> <div>天津重庆江苏浙江广东福建</div>
<input <input type="text" v-model="priceDataLst[1]" readonly="readonly" @click="openPrice2()" />
type="text"
v-model="priceDataLst[1]"
readonly="readonly"
@click="openPrice2()"
/>
</div> </div>
<div class="price-item"> <div class="price-item">
<div>辽宁河北山东海南湖北湖南</div> <div>辽宁河北山东海南湖北湖南</div>
<input <input type="text" v-model="priceDataLst[2]" readonly="readonly" @click="openPrice3()" />
type="text"
v-model="priceDataLst[2]"
readonly="readonly"
@click="openPrice3()"
/>
</div> </div>
<div class="price-item"> <div class="price-item">
<div>其他省域(老高考)</div> <div>其他省域(老高考)</div>
<input <input type="text" v-model="priceDataLst[3]" readonly="readonly" @click="openPrice4()" />
type="text"
v-model="priceDataLst[3]"
readonly="readonly"
@click="openPrice4()"
/>
</div> </div>
<div @click="priceDataLstFun()" class="edit-btn">确认</div> <div @click="priceDataLstFun()" class="edit-btn">确认</div>
</div> </div>
@ -211,187 +164,109 @@
<span @click="navdetail()"></span> <span @click="navdetail()"></span>
</div> </div>
<!-- 地址弹出框1 --> <!-- 地址弹出框1 -->
<div <div class="addr-select-bg" v-show="isCity1" @click="isCity1 = !isCity1"></div>
class="addr-select-bg"
v-show="isCity1"
@click="isCity1 = !isCity1"
></div>
<div class="addr-select-item" v-show="isCity1"> <div class="addr-select-item" v-show="isCity1">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择城市</span> <span>请选择城市</span>
<span @click="isCity1 = !isCity1">取消</span> <span @click="isCity1 = !isCity1">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == cityIndex1 }" @click="getCityValue1(index, item)"
:class="{ checked: index == cityIndex1 }" v-for="(item, index) in provinceData" :key="index">
@click="getCityValue1(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name {{ item.name
}}<img }}<img v-show="index == cityIndex1" src="../../assets/images/home/expert/yes.png" />
v-show="index == cityIndex1"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 地址弹出框2 --> <!-- 地址弹出框2 -->
<div <div class="addr-select-bg" v-show="isCity2" @click="isCity2 = !isCity2"></div>
class="addr-select-bg"
v-show="isCity2"
@click="isCity2 = !isCity2"
></div>
<div class="addr-select-item" v-show="isCity2"> <div class="addr-select-item" v-show="isCity2">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择城市</span> <span>请选择城市</span>
<span @click="isCity2 = !isCity2">取消</span> <span @click="isCity2 = !isCity2">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == cityIndex2 }" @click="getCityValue2(index, item)"
:class="{ checked: index == cityIndex2 }" v-for="(item, index) in provinceData" :key="index">
@click="getCityValue2(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name {{ item.name
}}<img }}<img v-show="index == cityIndex2" src="../../assets/images/home/expert/yes.png" />
v-show="index == cityIndex2"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 地址弹出框3 --> <!-- 地址弹出框3 -->
<div <div class="addr-select-bg" v-show="isCity3" @click="isCity3 = !isCity3"></div>
class="addr-select-bg"
v-show="isCity3"
@click="isCity3 = !isCity3"
></div>
<div class="addr-select-item" v-show="isCity3"> <div class="addr-select-item" v-show="isCity3">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择城市</span> <span>请选择城市</span>
<span @click="isCity3 = !isCity3">取消</span> <span @click="isCity3 = !isCity3">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == cityIndex3 }" @click="getCityValue3(index, item)"
:class="{ checked: index == cityIndex3 }" v-for="(item, index) in provinceData" :key="index">
@click="getCityValue3(index, item)"
v-for="(item, index) in provinceData"
:key="index"
>
{{ item.name {{ item.name
}}<img }}<img v-show="index == cityIndex3" src="../../assets/images/home/expert/yes.png" />
v-show="index == cityIndex3"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 价格弹出框1 --> <!-- 价格弹出框1 -->
<div <div class="addr-select-bg" v-show="isPrice1" @click="isPrice1 = !isPrice1"></div>
class="addr-select-bg"
v-show="isPrice1"
@click="isPrice1 = !isPrice1"
></div>
<div class="addr-select-item" v-show="isPrice1"> <div class="addr-select-item" v-show="isPrice1">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择价格</span> <span>请选择价格</span>
<span @click="isPrice1 = !isPrice1">取消</span> <span @click="isPrice1 = !isPrice1">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == priceIndex1 }" @click="getPriceValue1(index, item)"
:class="{ checked: index == priceIndex1 }" v-for="(item, index) in priceDataLst" :key="index">
@click="getPriceValue1(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item {{ item
}}<img }}<img v-show="index == priceIndex1" src="../../assets/images/home/expert/yes.png" />
v-show="index == priceIndex1"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 价格弹出框2 --> <!-- 价格弹出框2 -->
<div <div class="addr-select-bg" v-show="isPrice2" @click="isPrice2 = !isPrice2"></div>
class="addr-select-bg"
v-show="isPrice2"
@click="isPrice2 = !isPrice2"
></div>
<div class="addr-select-item" v-show="isPrice2"> <div class="addr-select-item" v-show="isPrice2">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择价格</span> <span>请选择价格</span>
<span @click="isPrice2 = !isPrice2">取消</span> <span @click="isPrice2 = !isPrice2">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == priceIndex2 }" @click="getPriceValue2(index, item)"
:class="{ checked: index == priceIndex2 }" v-for="(item, index) in priceDataLst" :key="index">
@click="getPriceValue2(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item {{ item
}}<img }}<img v-show="index == priceIndex2" src="../../assets/images/home/expert/yes.png" />
v-show="index == priceIndex2"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 价格弹出框3 --> <!-- 价格弹出框3 -->
<div <div class="addr-select-bg" v-show="isPrice3" @click="isPrice3 = !isPrice3"></div>
class="addr-select-bg"
v-show="isPrice3"
@click="isPrice3 = !isPrice3"
></div>
<div class="addr-select-item" v-show="isPrice3"> <div class="addr-select-item" v-show="isPrice3">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择价格</span> <span>请选择价格</span>
<span @click="isPrice3 = !isPrice3">取消</span> <span @click="isPrice3 = !isPrice3">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == priceIndex3 }" @click="getPriceValue3(index, item)"
:class="{ checked: index == priceIndex3 }" v-for="(item, index) in priceDataLst" :key="index">
@click="getPriceValue3(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item {{ item
}}<img }}<img v-show="index == priceIndex3" src="../../assets/images/home/expert/yes.png" />
v-show="index == priceIndex3"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 价格弹出框4 --> <!-- 价格弹出框4 -->
<div <div class="addr-select-bg" v-show="isPrice4" @click="isPrice4 = !isPrice4"></div>
class="addr-select-bg"
v-show="isPrice4"
@click="isPrice4 = !isPrice4"
></div>
<div class="addr-select-item" v-show="isPrice4"> <div class="addr-select-item" v-show="isPrice4">
<div class="addr-btns"> <div class="addr-btns">
<span>请选择价格</span> <span>请选择价格</span>
<span @click="isPrice4 = !isPrice4">取消</span> <span @click="isPrice4 = !isPrice4">取消</span>
</div> </div>
<ul> <ul>
<li <li :class="{ checked: index == priceIndex4 }" @click="getPriceValue4(index, item)"
:class="{ checked: index == priceIndex4 }" v-for="(item, index) in priceDataLst" :key="index">
@click="getPriceValue4(index, item)"
v-for="(item, index) in priceDataLst"
:key="index"
>
{{ item {{ item
}}<img }}<img v-show="index == priceIndex4" src="../../assets/images/home/expert/yes.png" />
v-show="index == priceIndex4"
src="../../assets/images/home/expert/yes.png"
/>
</li> </li>
</ul> </ul>
</div> </div>
@ -399,7 +274,7 @@
</template> </template>
<script> <script>
export default { export default {
name: "edit", name: "edit",
data() { data() {
return { return {
@ -439,26 +314,61 @@ export default {
cityValue3: "", // cityValue3: "", //
addRess: [], addRess: [],
// //
priceDataLst:[], priceDataLst: [],
priceData: [ priceData: [{
{ title: "3980" }, title: "3980"
{ title: "4980" }, },
{ title: "5980" }, {
{ title: "6980" }, title: "4980"
{ title: "8980" }, },
{ title: "8980" }, {
{ title: "9980" }, title: "5980"
{ title: "10980" }, },
{ title: "11980" }, {
{ title: "12980" }, title: "6980"
{ title: "13980" }, },
{ title: "14980" }, {
{ title: "15980" }, title: "8980"
{ title: "16980" }, },
{ title: "17980" }, {
{ title: "18980" }, title: "8980"
{ title: "19980" }, },
{ title: "20980" }, {
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, // isPrice1: false, //
priceIndex1: 0, priceIndex1: 0,
@ -490,7 +400,7 @@ export default {
this.getPricerData() this.getPricerData()
}, },
methods: { methods: {
navdetail(){ navdetail() {
this.$router.push({ this.$router.push({
path: "/edit/detail", path: "/edit/detail",
query: { query: {
@ -498,7 +408,7 @@ export default {
}, },
}); });
}, },
navdetailLst(){ navdetailLst() {
this.$router.push({ this.$router.push({
path: "/edit/list", path: "/edit/list",
query: { query: {
@ -506,50 +416,50 @@ export default {
}, },
}); });
}, },
priceDataLstFun(){ priceDataLstFun() {
this.editData.service_area_main="" this.editData.service_area_main = ""
for (let index = 0; index < this.addRess.length; index++) { for (let index = 0; index < this.addRess.length; index++) {
if (this.addRess[index].code) { if (this.addRess[index].code) {
this.editData.service_area_main+=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_a = this.priceDataLst[0]
this.editData.price_area_b=this.priceDataLst[1] this.editData.price_area_b = this.priceDataLst[1]
this.editData.price_area_c=this.priceDataLst[2] this.editData.price_area_c = this.priceDataLst[2]
this.editData.price_area_other=this.priceDataLst[3] this.editData.price_area_other = this.priceDataLst[3]
this.editExpertInfo() this.editExpertInfo()
}, },
explainDataFun(){ explainDataFun() {
this.editData.service_area_text=this.explainData this.editData.service_area_text = this.explainData
this.editExpertInfo() this.editExpertInfo()
}, },
bodyDataFun(){ bodyDataFun() {
this.editData.summary=this.bodyData this.editData.summary = this.bodyData
this.editExpertInfo() this.editExpertInfo()
}, },
sloganDataFun(){ sloganDataFun() {
this.editData.slogan=this.sloganData this.editData.slogan = this.sloganData
this.editExpertInfo() this.editExpertInfo()
}, },
CharacteristicsFun(){ CharacteristicsFun() {
console.log(this.Characteristics); console.log(this.Characteristics);
this.editData.keywords="" this.editData.keywords = ""
for (let index = 0; index < this.Characteristics.length; index++) { for (let index = 0; index < this.Characteristics.length; index++) {
this.editData.keywords+=this.Characteristics[index]+"," this.editData.keywords += this.Characteristics[index] + ","
} }
this.editExpertInfo() this.editExpertInfo()
console.log(this.editData.keywords,"123") console.log(this.editData.keywords, "123")
}, },
ModifyData() { ModifyData() {
this.axios this.axios
.post(this.HOME + "/api/expert/edit-expert-info") .post(this.HOME + "/api/expert/edit-expert-info")
.then(function () {}) .then(function() {})
.catch(function (error) { .catch(function(error) {
console.log(error); console.log(error);
}); });
}, },
@ -559,9 +469,9 @@ export default {
.post(this.HOME + "/api/expert/service-price-list", { .post(this.HOME + "/api/expert/service-price-list", {
pcode: 86, pcode: 86,
}) })
.then(function (res) { .then(function(res) {
console.log(res.data.data,"------"); console.log(res.data.data, "------");
that.priceDataLst=res.data.data that.priceDataLst = res.data.data
}); });
}, },
getAddrData() { getAddrData() {
@ -570,7 +480,7 @@ export default {
.post(this.HOME + "/api/area/index", { .post(this.HOME + "/api/area/index", {
pcode: 86, pcode: 86,
}) })
.then(function (res) { .then(function(res) {
console.log(res); console.log(res);
that.provinceData = res.data.data; that.provinceData = res.data.data;
console.log(that.provinceData); console.log(that.provinceData);
@ -604,12 +514,12 @@ export default {
"Content-Type": "multipart/form-data", "Content-Type": "multipart/form-data",
}, },
}) })
.then(function (res) { .then(function(res) {
that.editData.avatar = res.data.data.src; that.editData.avatar = res.data.data.src;
that.myAvatar = res.data.data.src; that.myAvatar = res.data.data.src;
that.editExpertInfo() that.editExpertInfo()
}) })
.catch(function (error) { .catch(function(error) {
console.log(error); console.log(error);
}); });
}, },
@ -619,8 +529,8 @@ export default {
}, },
getCityValue1(index, item) { getCityValue1(index, item) {
console.log(item) console.log(item)
this.addRess[0].code=item.code this.addRess[0].code = item.code
this.addRess[0].name=item.name this.addRess[0].name = item.name
this.cityValue1 = item.title; this.cityValue1 = item.title;
this.cityIndex1 = index; this.cityIndex1 = index;
this.isCity1 = false; this.isCity1 = false;
@ -630,8 +540,8 @@ export default {
this.isCity2 = !this.isCity2; this.isCity2 = !this.isCity2;
}, },
getCityValue2(index, item) { getCityValue2(index, item) {
this.addRess[1].code=item.code this.addRess[1].code = item.code
this.addRess[1].name=item.name this.addRess[1].name = item.name
this.cityValue2 = item.title; this.cityValue2 = item.title;
this.cityIndex2 = index; this.cityIndex2 = index;
this.isCity2 = false; this.isCity2 = false;
@ -640,8 +550,8 @@ export default {
this.isCity3 = !this.isCity3; this.isCity3 = !this.isCity3;
}, },
getCityValue3(index, item) { getCityValue3(index, item) {
this.addRess[2].code=item.code this.addRess[2].code = item.code
this.addRess[2].name=item.name this.addRess[2].name = item.name
this.cityValue3 = item.title; this.cityValue3 = item.title;
this.cityIndex3 = index; this.cityIndex3 = index;
this.isCity3 = false; this.isCity3 = false;
@ -652,7 +562,7 @@ export default {
}, },
getPriceValue1(index, item) { getPriceValue1(index, item) {
console.log(this.priceDataLst) console.log(this.priceDataLst)
this.priceDataLst[0]=item this.priceDataLst[0] = item
this.priceValue1 = item.title; this.priceValue1 = item.title;
this.priceIndex1 = index; this.priceIndex1 = index;
this.isPrice1 = false; this.isPrice1 = false;
@ -661,7 +571,7 @@ export default {
this.isPrice2 = !this.isPrice2; this.isPrice2 = !this.isPrice2;
}, },
getPriceValue2(index, item) { getPriceValue2(index, item) {
this.priceDataLst[1]=item this.priceDataLst[1] = item
this.priceValue2 = item.title; this.priceValue2 = item.title;
this.priceIndex2 = index; this.priceIndex2 = index;
this.isPrice2 = false; this.isPrice2 = false;
@ -670,7 +580,7 @@ export default {
this.isPrice3 = !this.isPrice3; this.isPrice3 = !this.isPrice3;
}, },
getPriceValue3(index, item) { getPriceValue3(index, item) {
this.priceDataLst[2]=item this.priceDataLst[2] = item
this.priceValue3 = item.title; this.priceValue3 = item.title;
this.priceIndex3 = index; this.priceIndex3 = index;
this.isPrice3 = false; this.isPrice3 = false;
@ -679,8 +589,8 @@ export default {
this.isPrice4 = !this.isPrice4; this.isPrice4 = !this.isPrice4;
}, },
getPriceValue4(index, item) { getPriceValue4(index, item) {
this.priceDataLst[3]=item this.priceDataLst[3] = item
console.log( this.priceDataLst) console.log(this.priceDataLst)
this.priceValue4 = item.title; this.priceValue4 = item.title;
this.priceIndex4 = index; this.priceIndex4 = index;
this.isPrice4 = false; this.isPrice4 = false;
@ -691,26 +601,26 @@ export default {
let that = this; let that = this;
this.axios this.axios
.post(this.HOME + "/api/user/center-info", {}) .post(this.HOME + "/api/user/center-info", {})
.then(function (res) { .then(function(res) {
console.log(res.data.data.expert); console.log(res.data.data.expert);
let newArray = res.data.data.expert; let newArray = res.data.data.expert;
that.id=newArray.id that.id = newArray.id
that.editData= { that.editData = {
avatar: newArray.avatar, avatar: newArray.avatar,
keywords: newArray.keywords, keywords: newArray.keywords,
slogan: newArray.slogan, slogan: newArray.slogan,
summary: newArray.summary, summary: newArray.summary,
service_area_text: newArray.service_area_text, service_area_text: newArray.service_area_text,
service_area_main: newArray.service_area_main, service_area_main: newArray.service_area_main,
tel:newArray.tel , tel: newArray.tel,
ding_code:newArray.ding_code, ding_code: newArray.ding_code,
price_area_a:newArray.price_area_a, price_area_a: newArray.price_area_a,
price_area_b:newArray.price_area_b, price_area_b: newArray.price_area_b,
price_area_c:newArray.price_area_c, price_area_c: newArray.price_area_c,
price_area_other:newArray.price_area_other, price_area_other: newArray.price_area_other,
}, },
console.log(that.editData) console.log(that.editData)
that.handImg = newArray.avatar; that.handImg = newArray.avatar;
that.name = newArray.name; that.name = newArray.name;
@ -741,15 +651,15 @@ console.log(that.editData)
}, },
editExpertInfo(){ editExpertInfo() {
let that=this let that = this
this.axios this.axios
.post(this.HOME + "/api/expert/edit-expert-info", this.editData ) .post(this.HOME + "/api/expert/edit-expert-info", this.editData)
.then(function (res) { .then(function(res) {
console.log(res) console.log(res)
that.checkExperInfo() that.checkExperInfo()
}) })
.catch(function (error) { .catch(function(error) {
console.log(error); console.log(error);
}); });
}, },
@ -782,7 +692,7 @@ console.log(that.editData)
deactivated() { deactivated() {
window.removeEventListener("scroll", this.eventScrollTop); window.removeEventListener("scroll", this.eventScrollTop);
}, },
}; };
</script> </script>
<style scoped> <style scoped>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="content my-content"> <div class="content">
<!-- 头部 --> <!-- 头部 -->
<div :class="{'header':true,'scroll white':isScrollTop,'white':true}"> <div :class="{'header':true,'scroll white':isScrollTop,'white':true}">
<div class="back"></div> <div class="back"></div>

View File

@ -243,7 +243,7 @@
// TA // TA
toAsk(id) { toAsk(id) {
if (this.consult_amount == 1) { if (this.consult_amount >= 1) {
this.$router.push({ this.$router.push({
path: '/expert/ask', path: '/expert/ask',
name: 'expert-ask', name: 'expert-ask',

View File

@ -21,7 +21,8 @@
this.timeNumber = 1; this.timeNumber = 1;
}, 2000); }, 2000);
setTimeout(() => { setTimeout(() => {
this.$router.replace("/index"); this.$router.replace("/login");
}, 3000); }, 3000);
}, },
created() { created() {

View File

@ -84,10 +84,7 @@
computed: {}, computed: {},
methods: { methods: {
getUserData() { getUserData() {
let that = this;
this.axios.post(this.HOME + "/api/user/center-info").then(function(res) { this.axios.post(this.HOME + "/api/user/center-info").then(function(res) {
console.log(res.data.data,1234)
that.userType = res.data.data.type;
localStorage.centerUserData = JSON.stringify(res.data.data); localStorage.centerUserData = JSON.stringify(res.data.data);
}); });
}, },
@ -118,7 +115,8 @@
// //
goPages(){ goPages(){
console.log(this.userType,252525) this.userType = (JSON.parse(localStorage.getItem("centerUserData"))).type;
console.log(this.userType,2525)
if(this.userType == 1){ if(this.userType == 1){
this.$router.push({ this.$router.push({
path: "/consultant", path: "/consultant",