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