|
@@ -17,7 +17,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="collapse navbar-collapse navbar-right" role="navigation">
|
|
<div class="collapse navbar-collapse navbar-right" role="navigation">
|
|
|
<ul @click="gohome" id="nav" class="nav navbar-nav menu">
|
|
<ul @click="gohome" id="nav" class="nav navbar-nav menu">
|
|
|
- <li><a href="#"><span>首页</span></a></li>
|
|
|
|
|
|
|
+ <li><a href="#" @click="setTurnHome"><span>首页</span></a></li>
|
|
|
<li><a href="https://www.usoftchina.com/" target="_blank"><span>优软云</span></a></li>
|
|
<li><a href="https://www.usoftchina.com/" target="_blank"><span>优软云</span></a></li>
|
|
|
<li>
|
|
<li>
|
|
|
<a href="#feature"><span>特色</span></a>
|
|
<a href="#feature"><span>特色</span></a>
|
|
@@ -262,11 +262,20 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.isproblem = this.$route.params.isporblem
|
|
this.isproblem = this.$route.params.isporblem
|
|
|
};
|
|
};
|
|
|
|
|
+ let token;
|
|
|
|
|
+ if(localStorage.getItem('app-state-session')){
|
|
|
|
|
+ let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
|
|
|
|
|
+ token = String(mytoken.token);
|
|
|
|
|
+ }
|
|
|
this.$ajax({
|
|
this.$ajax({
|
|
|
url: this.$url.api+'/api/auth/info',
|
|
url: this.$url.api+'/api/auth/info',
|
|
|
method: 'get',
|
|
method: 'get',
|
|
|
async:false,
|
|
async:false,
|
|
|
- withCredentials:true
|
|
|
|
|
|
|
+ withCredentials:true,
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ "Authorization":token,
|
|
|
|
|
+ "Content-Type":"application/x-www-form-urlencoded"
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.then(res=>{
|
|
.then(res=>{
|
|
|
const data=res.data.data;
|
|
const data=res.data.data;
|
|
@@ -276,18 +285,15 @@
|
|
|
session.account = account
|
|
session.account = account
|
|
|
Session.set(session);
|
|
Session.set(session);
|
|
|
this.account = Session.getAccount();
|
|
this.account = Session.getAccount();
|
|
|
- //有企业信息时 第一次访问页面 跳转企业列表
|
|
|
|
|
|
|
+ //有企业信息时 跳转企业列表
|
|
|
if(account.companies.length>0){
|
|
if(account.companies.length>0){
|
|
|
- //监听访问首页的次数
|
|
|
|
|
- if(!localStorage.VisitCount){
|
|
|
|
|
- localStorage.VisitCount = '1'
|
|
|
|
|
- }else{
|
|
|
|
|
- localStorage.VisitCount = (Number(localStorage.VisitCount) + 1 ) + ''
|
|
|
|
|
- }
|
|
|
|
|
- if(localStorage.VisitCount=='1'){
|
|
|
|
|
const me = this || _this;
|
|
const me = this || _this;
|
|
|
- me.$router.push({path: '/enterprise'})
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //点击首页按钮时不跳转企业列表
|
|
|
|
|
+ if(!me.$parent.turnHome){
|
|
|
|
|
+ me.$router.push({path: '/enterprise'})
|
|
|
|
|
+ }else{
|
|
|
|
|
+ me.$parent.turnHome = false
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -344,6 +350,9 @@
|
|
|
frame.postMessage(JSON.stringify(session), '*')
|
|
frame.postMessage(JSON.stringify(session), '*')
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ setTurnHome(){
|
|
|
|
|
+ this.turnHome = true
|
|
|
|
|
+ },
|
|
|
login() {
|
|
login() {
|
|
|
// 显示账户中心登录窗口
|
|
// 显示账户中心登录窗口
|
|
|
this.isLogin = true
|
|
this.isLogin = true
|