Commit c0f04e05 authored by 黄奎's avatar 黄奎

新增登陆跳转

parent 95bd2ce5
......@@ -168,7 +168,8 @@
document.URL.indexOf("clientProtocol") == -1 &&
document.URL.indexOf("clientDisclaimerProtocol") == -1 &&
document.URL.indexOf("TravelContractConfirm") == -1 &&
document.URL.indexOf("ViittoContractConfirm") == -1
document.URL.indexOf("ViittoContractConfirm") == -1&&
document.URL.indexOf("ticketSpider") == -1
) {
this.$router.push({
path: "/login"
......@@ -179,7 +180,8 @@
document.URL.indexOf("clientProtocol") != -1 ||
document.URL.indexOf("clientDisclaimerProtocol") != -1 ||
document.URL.indexOf("TravelContractConfirm") != -1 ||
document.URL.indexOf("ViittoContractConfirm") != -1
document.URL.indexOf("ViittoContractConfirm") != -1||
document.URL.indexOf("ticketSpider") != -1
) {
// 车系统改变 单页面方式
if(this.typeSystem==1) {
......
......@@ -31,7 +31,8 @@
</div>
</div>
<div class="flexParent" v-if="openMode==1">
<div v-if="typeSystem==0" class="nav-tabs-box" @contextmenu.prevent="showRightMenu" :style="{width:`${navWidth}px`}">
<div v-if="typeSystem==0" class="nav-tabs-box" @contextmenu.prevent="showRightMenu"
:style="{width:`${navWidth}px`}">
<el-tabs v-if='tabs && tabs.length>0' v-model="currentTabName" style="margin-left: 120px;"
:closable="tabs.length>1" type="card" @edit="handleTabsEdit">
<el-tab-pane :key="i" v-for="(item,i) in tabs" :label="item.title" :name="item.name+'_'+i">
......@@ -39,8 +40,8 @@
</el-tabs>
<div class="browner-opera-box" v-if="currentTag.history&&currentTag.history.length>0"
style="border-bottom: 1px solid #e4e7ed;">
<i class="iconfont icon-houtui" @click="goback(0)"
:class="{'active':currentTag && currentTag.hisIndex>0}" :title="$t('objFill.v101.houtui')"></i>
<i class="iconfont icon-houtui" @click="goback(0)" :class="{'active':currentTag && currentTag.hisIndex>0}"
:title="$t('objFill.v101.houtui')"></i>
<i class="iconfont icon-qianjin" @click="goback(1)"
:class="{'active':currentTag && currentTag.hisIndex<currentTag.history.length-1}"
:title="$t('objFill.v101.qianjin')"></i>
......@@ -67,7 +68,8 @@
<li class="split"></li>
<li @click="closeCurrent" :class="{'disable':tabs.length==1}">{{$t('objFill.v101.guanbibqian')}}</li>
<li @click="closeOther" :class="{'disable':tabs.length<2}">{{$t('objFill.v101.guanbiqitbq')}}</li>
<li @click="closeRight" :class="{'disable':currentRightIndex==tabs.length-1}">{{$t('objFill.v101.guanbiycbq')}}</li>
<li @click="closeRight" :class="{'disable':currentRightIndex==tabs.length-1}">{{$t('objFill.v101.guanbiycbq')}}
</li>
</ul>
</div>
</template>
......@@ -184,17 +186,18 @@
} else {
this.goUrl('/' + hrefs[hrefs.length - 1])
}
this.isRed = (this.getLocalStorage().ThemeType ? this.getLocalStorage().ThemeType : 0) == 1
this.isRed = (this.getLocalStorage()&&this.getLocalStorage().ThemeType ? this.getLocalStorage().ThemeType : 0) == 1
},
methods: {
nullMethod() {
},
changeMenuShowType() {
if(this.$route.path=='/TravelManager'){
if (this.$route.path == '/TravelManager') {
this.isCollapse = true;
localStorage.navsot = 'a'
}else{
} else {
this.isCollapse = !this.isCollapse;
localStorage.navsot = this.isCollapse ? 'a' : 'b'
}
......@@ -406,9 +409,12 @@
}
},
getMenu() {
this.menuList = this.getLocalStorage().UserMenu;
this.menuList = [];
var tempStorage = this.getLocalStorage();
if (tempStorage && tempStorage.UserMenu) {
this.menuList = tempStorage.UserMenu;
}
let path = this.$route.path.split("?")[0];
let root = 0;
let temprootName = ""; //根节点名称
let tempparentName = ""; //二级节点名称
......@@ -642,8 +648,11 @@
}
},
getMenuV2(path) {
this.menuList = this.getLocalStorage().UserMenu;
this.menuList = [];
var tempStorage = this.getLocalStorage();
if (tempStorage && tempStorage.UserMenu) {
this.menuList = tempStorage.UserMenu;
}
let root = 0;
let temprootName = ""; //根节点名称
let tempparentName = ""; //二级节点名称
......@@ -878,8 +887,11 @@
return tempcurrentName
},
getTitleByRouter(name) {
let obj = {title:""};
if (routerConfig.routes[12] && routerConfig.routes[12].children && routerConfig.routes[12].children.length>0) {
let obj = {
title: ""
};
if (routerConfig.routes[12] && routerConfig.routes[12].children && routerConfig.routes[12].children.length >
0) {
routerConfig.routes[12].children[0].children.forEach(x => {
if (x.name == name) {
obj.comp = x.component
......@@ -993,7 +1005,7 @@
window.localStorage.navTabs = JSON.stringify(this.tabs)
},
created() {
if(localStorage.typeSystem&&localStorage.typeSystem==1) this.typeSystem = localStorage.typeSystem
if (localStorage.typeSystem && localStorage.typeSystem == 1) this.typeSystem = localStorage.typeSystem
}
};
......
......@@ -341,6 +341,13 @@
this.$cookie.set("RB_Group_id", userData.RB_Group_id);
localStorage.menu = JSON.stringify(firstTire)
this.loginState = 0;
if (this.$route.query && this.$route.query.path) {
var goPath = this.$route.query.path;
this.$router.push({
path: goPath
});
return;
}
if(!jsonData.data.IsExactness) {
this.$router.push({
path: "/resetPassword"
......
This diff is collapsed.
......@@ -122,7 +122,7 @@ export default {
let locationName = window.location.hostname;
let isOnline = 0; //0-本地测试,1-线上
let ocrUrl = "http://192.168.5.46:8888";
domainUrl = "http://192.168.5.214";
domainUrl = "http://192.168.5.46";
let crmLocalFileStreamDownLoadUrl = "";
crmLocalFileStreamDownLoadUrl = locationName.indexOf('oytour') !== -1 ? "http://crm.oytour.com" : "http://testcrm.oytour.com";
let javaUrldo = "";
......@@ -248,7 +248,6 @@ export default {
//警告提示
Vue.prototype.Warning = function (msg) {
this.$message({
message: msg,
duration: 2000,
type: "warning"
......@@ -383,7 +382,7 @@ export default {
}
})
} else {
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login") {
if (!localStorage.userInfo && localStorage.userInfo != "" && this.$route.path.toLowerCase() != "/login" && this.$route.path.toLowerCase() != "/ticketspider") {
this.goToLogin(1);
}
}
......@@ -973,8 +972,21 @@ export default {
},
//跳转到登录页面
Vue.prototype.goToLogin = function (type) {
var newpath = "";
var query = {};
if (this.$route.path) {
newpath = this.$route.path;
//ticketSpider?AirticketId=6995
if (this.$route.query.AirticketId) {
newpath = newpath + "?AirticketId=" + this.$route.query.AirticketId;
query = {
path: newpath
};
}
}
this.$router.push({
path: '/login'
path: '/login',
query
})
},
//ERP本地缓存
......@@ -1314,7 +1326,7 @@ export default {
poise = 'm_h'
}
var newpath = path.replace('http://192.168.5.214:8130', '').replace('https://imgfile.oytour.com', '').replace('https://imgfile.oytour.com', '').split('?')[0];
console.log(url + '/image/index?filePath=' + newpath + '&process=resize,' + poise + ',w_' + w + ',h_' + h,'------------------')
console.log(url + '/image/index?filePath=' + newpath + '&process=resize,' + poise + ',w_' + w + ',h_' + h, '------------------')
return url + '/image/index?filePath=' + newpath + '&process=resize,' + poise + ',w_' + w + ',h_' + h;
}
......@@ -1973,4 +1985,4 @@ export default {
return language;
}
}
}
\ No newline at end of file
}
......@@ -20,22 +20,25 @@ import {createTeam} from './team'
function connectNim ({state, commit, dispatch}, obj) {
let _storage=JSON.parse(window.localStorage.userInfo);
let {force} = Object.assign({}, obj)
// 操作为内容页刷新页面,此时无nim实例
if (!state.nim || force) {
let loginInfo = {
// uid: '15281055345',
// uid: '18380464246',
uid: _storage.ImAccount,
sdktoken: _storage.ImToken
}
if (!loginInfo.uid) {
// 无cookie,直接跳转登录页
pageUtil.turnPage('无历史登录记录,请重新登录', 'login')
} else {
// 有cookie,重新登录
dispatch('initNimSDK', loginInfo)
if(window.localStorage&&window.localStorage.userInfo)
{
let _storage=JSON.parse(window.localStorage.userInfo);
let {force} = Object.assign({}, obj)
// 操作为内容页刷新页面,此时无nim实例
if (!state.nim || force) {
let loginInfo = {
// uid: '15281055345',
// uid: '18380464246',
uid: _storage.ImAccount,
sdktoken: _storage.ImToken
}
if (!loginInfo.uid) {
// 无cookie,直接跳转登录页
pageUtil.turnPage('无历史登录记录,请重新登录', 'login')
} else {
// 有cookie,重新登录
dispatch('initNimSDK', loginInfo)
}
}
}
}
......
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