Commit 218f1389 authored by xiongjinke's avatar xiongjinke

修改

parent fff0095f
......@@ -167,17 +167,39 @@ export default {
},
watch: {
'$route'(to, from) {
// 检测查询参数的变化
if (to.query.customerId) {
if(to.name == 'PartyA' && to.query.customerId){
if (to.query.customerId && to.query.path == 'business' || to.query.path == 'gjjl') {
if (this.companyId == 0) {
let customerId = to.query.customerId
this.association(customerId)
customerInfo(to.query.customerId).then(res => {
if (res.code == 200) {
if (res.data.userId == this.$store.state.user.userId) {
this.$nextTick(() => {
this.customerInfo = res.data
this.customerId = res.data.customerId
this.isCustomer = true
this.isCompany = false
this.currentPath.pathName = this.$route.query.path || 'business'
this.companyInfo = {
companyName: this.customerInfo.companyName
}
document.getElementById('tagTitle').innerText = this.customerInfo.companyName
})
}
}
})
}
if (to.query.path) {
if (to.query.customerId == this.customerId && to.query.path) {
this.currentPath.pathName = to.query.path
}
}
}else{
if(from.name == 'PartyA' && !from.query.customerId){
this.$nextTick(() => {
this.isCompany = true
})
}
}
}
},
beforeRouteLeave(to, from, next) {
next(vm => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment