Commit 9b2c99d5 authored by caixingbing's avatar caixingbing
parents c8fd96ac ebabd409
...@@ -167,11 +167,15 @@ export default { ...@@ -167,11 +167,15 @@ export default {
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
if(from.name){
if (to.query.customerId){ if (to.query.customerId){
let customerId = to.query.customerId let customerId = to.query.customerId
vm.association(customerId) if(to.query.path){
vm.currentPath.pathName = to.query.path vm.currentPath.pathName = to.query.path
} }
vm.association(customerId)
}
}
}) })
}, },
created() { created() {
......
...@@ -823,9 +823,9 @@ export default { ...@@ -823,9 +823,9 @@ export default {
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
...@@ -1078,9 +1078,9 @@ ...@@ -1078,9 +1078,9 @@
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
...@@ -925,9 +925,9 @@ ...@@ -925,9 +925,9 @@
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
...@@ -1107,9 +1107,9 @@ ...@@ -1107,9 +1107,9 @@
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
...@@ -1680,9 +1680,9 @@ ...@@ -1680,9 +1680,9 @@
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
...@@ -548,9 +548,9 @@ ...@@ -548,9 +548,9 @@
api.getUipIdByCid(params).then(res=>{ api.getUipIdByCid(params).then(res=>{
if (res.code==200) { if (res.code==200) {
if(res.data&&res.data.length>0&&res.data[0].uipId){ if(res.data&&res.data.length>0&&res.data[0].uipId){
this.$router.push({path: '/enterprise/'+this.encodeStr(res.data[0].uipId)}) this.$router.push({path: '/enterprise/'+res.data[0].uipId})
}else{ }else{
this.$router.push({path: '/company/'+this.encodeStr(res.data[0].companyId)}) this.$router.push({path: '/company/'+this.encodeStr(companyId)})
} }
} }
......
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