提交 0f9403b4 authored 作者: huaxinzhu's avatar huaxinzhu

Merge branch 'dev_hxz' into test

......@@ -284,6 +284,8 @@
},
data() {
return {
// 动态获取 sso 域名
ssourl: '',
// meta 信息
keyTitle: '',
keyWords: '',
......@@ -390,11 +392,13 @@
{
id:5, title:'新闻动态'
}
]
],
}
},
created() {
let isPc = this.IsPc()
/** 动态获取 sso配置域名 */
this.getssourl();
// console.log(111,isPc);
// console.log(222,navigator.userAgent);
},
......@@ -408,6 +412,18 @@
},
methods: {
/** 动态获取 sso 配置域名 */
getssourl(){
var ssa = window.location.host
let data = { domain:ssa }
this.$store.dispatch('getssourl', data)
.then((res) => {
if(res.code==1){
this.ssourl = res.data.sso_url
//this.gotosso()
}
}).catch(() => {})
},
IsPc() {
let userAgent = navigator.userAgent
let Agents = ["Android", "iPhone","SymbianOS", "Windows Phone","iPad", "iPod"];
......@@ -520,16 +536,20 @@
window.location.href = '//' + completeWebsite
}
},
// 去注册
// 去注册 ssourl
toRegister() {
store.dispatch('LogOut').then(() => {
var ssa = window.location.host;
window.location.href = 'http://sso.jxhh.com/login?redirect=http://' + window.location.host + '/platformlogin'
let ssa = window.location.host;
let ht = document.location.protocol;
window.location.href = ht + '//' + this.ssourl + '/login?redirect=' + ht + '//' + ssa + '/platformlogin'
})
},
// 去登录
toLogin() {
window.location.href = 'http://sso.jxhh.com/login?redirect=http://' + window.location.host + '/platformlogin'
let ssa = window.location.host;
let ht = document.location.protocol;
window.location.href = ht + '//' + this.ssourl + '/login?redirect=' + ht + '//' + ssa + '/platformlogin'
// window.location.href = 'http://sso.jxhh.com/login?redirect=http://' + window.location.host + '/platformlogin'
}
} // methods end
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论