Commit 0f15c92d authored by zhengke's avatar zhengke

增加跳转b2b

parent 47c1108f
......@@ -337,54 +337,54 @@ export default {
return obj
},
goUrl(path) {
if(this.openMode==1){
let pathArray=path.split('/')
let isExsit=false
let newName = pathArray[1].split('?')[0];
let temp=this.mapObj(path,newName)
if(path==="/TravelManager3"){
this.$router.push({
name: 'TravelManager3',
query: { flag: true,blank:'y'}
});
return
}
if(path==="/TravelControlList3"){
this.$router.push({
name: 'TravelControlList3',
query: { flag: true,blank:'y'}
});
return
}
this.tabs.forEach((x,i)=>{
if(pathArray[1]==x.name||path==x.path||x.history.indexOf(path)!=-1){
this.tabs[i].hisIndex=this.tabs[i].history.length
this.tabs[i].path=path
isExsit=true
this.currentTabName=x.name+"_"+i
this.comp=temp.comp
this.tabs[i].type='d'
return false
if(this.openMode==1){
let pathArray=path.split('/')
let isExsit=false
let newName = pathArray[1].split('?')[0];
let temp=this.mapObj(path,newName)
if(path==="/TravelManager3"){
this.$router.push({
name: 'TravelManager3',
query: { flag: true,blank:'y'}
});
return
}
})
if(!isExsit){
let obj={}
obj.path=path
obj.title=temp.title
obj.name=newName
obj.comp=temp.comp
obj.refer=0
obj.history=[]
obj.type='d'
obj.hisIndex=0
// console.log(newName)
this.currentTabName=obj.name+'_'+this.tabs.length
this.tabs.push(obj)
if(path==="/TravelControlList3"){
this.$router.push({
name: 'TravelControlList3',
query: { flag: true,blank:'y'}
});
return
}
this.tabs.forEach((x,i)=>{
if(pathArray[1]==x.name||path==x.path||x.history.indexOf(path)!=-1){
this.tabs[i].hisIndex=this.tabs[i].history.length
this.tabs[i].path=path
isExsit=true
this.currentTabName=x.name+"_"+i
this.comp=temp.comp
this.tabs[i].type='d'
return false
}
})
if(!isExsit){
let obj={}
obj.path=path
obj.title=temp.title
obj.name=newName
obj.comp=temp.comp
obj.refer=0
obj.history=[]
obj.type='d'
obj.hisIndex=0
// console.log(newName)
this.currentTabName=obj.name+'_'+this.tabs.length
this.tabs.push(obj)
}
this.type='d'
} else if (this.openMode==0 && path != "") {
this.$router.push({ path });
}
this.type='d'
} else if (this.openMode==0 && path != "") {
this.$router.push({ path });
}
},
showToggle(id) {
if (this.openId != id) {
......@@ -852,24 +852,7 @@ export default {
},
filterRouter(){
let that=this
let userInfo = this.getLocalStorage();
this.$router.beforeEach((to, from, next) => {
if(to.path=='/JapanHotel'){
let msg = {
id:userInfo.EmployeeId
}
this.apipost("sellorder_post_GetDesEncrypt",msg,res => {
if (res.data.resultCode == 1) {
this.EnCodeWord=res.data.data;
window.open("http://www.oytour.com/#/hotelHome?uid="+encodeURIComponent(this.EnCodeWord), "_blank");
} else {
this.Error(res.data.message);
}
},
err => {}
);
return;
}
document.title = to.meta.title ? to.meta.title+'-四川和平国际旅行社' : '四川和平国际旅行社'
// console.log("to.query.blank && to.query.blank=='y'",to.query,"666")
if(to.path=="/ModifyVisaProduct"){
......
......@@ -3253,11 +3253,29 @@ export default {
this.displayNone = true;
},
goUrl(url, id, index) {
this.chosenIndex = id;
if(localStorage.openMode && localStorage.openMode==1)
this.$router.push({ path: url ,query:{blank:'y'}});
else
this.$router.push({ path: url ,query:{}});
if(url=='/JapanHotel'){
let userInfo = this.getLocalStorage();
let msg = {
id:userInfo.EmployeeId
}
this.apipost("sellorder_post_GetDesEncrypt",msg,res => {
if (res.data.resultCode == 1) {
this.EnCodeWord=res.data.data;
window.open("http://www.oytour.com/#/hotelHome?uid="+encodeURIComponent(this.EnCodeWord), "_blank");
} else {
this.Error(res.data.message);
}
},
err => {}
);
}else{
this.chosenIndex = id;
if(localStorage.openMode && localStorage.openMode==1)
this.$router.push({ path: url ,query:{blank:'y'}});
else
this.$router.push({ path: url ,query:{}});
}
},
goUrlT(url, index, name) {
let query={
......
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