Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
7ce74f58
提交
7ce74f58
authored
10月 13, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
云仓新官网首页,注册登录,获取动态配置的sso地址
上级
069f2e13
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
25 行增加
和
5 行删除
+25
-5
newyuncang.vue
src/views/entry/newyuncang.vue
+25
-5
没有找到文件。
src/views/entry/newyuncang.vue
浏览文件 @
7ce74f58
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论