Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
6a970a2e
提交
6a970a2e
authored
2 年前
作者:
钟是志
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
44b84885
5a589868
master
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
28 行增加
和
19 行删除
+28
-19
cookie.js
one_stop_public/utils/cookie.js
+13
-4
getSchoolType.js
zyd_public/utils/getSchoolType.js
+11
-0
hrefWithToken.js
zyd_public/utils/hrefWithToken.js
+3
-4
utils.js
zyd_public/utils/utils.js
+1
-11
没有找到文件。
one_stop_public/utils/cookie.js
浏览文件 @
6a970a2e
...
...
@@ -9,11 +9,15 @@ export const setCookie = function(name, value, day) {
//当设置的时间等于0时,不设置expires属性,cookie在浏览器关闭后删除
const
expires
=
day
*
24
*
60
*
60
*
1000
;
const
date
=
new
Date
(
+
new
Date
()
+
expires
);
let
c
=
name
+
'='
+
escape
(
value
)
+
';expires='
+
date
.
toUTCString
()
+
';path=/'
;
let
v
=
value
;
if
(
name
!==
'token'
)
{
v
=
escape
(
v
);
}
let
c
=
name
+
'='
+
v
+
';expires='
+
date
.
toUTCString
()
+
';path=/'
;
// console.log(c);
document
.
cookie
=
c
;
}
else
{
document
.
cookie
=
name
+
'='
+
escape
(
value
)
+
';path=/'
;
document
.
cookie
=
name
+
'='
+
v
+
';path=/'
;
}
};
...
...
@@ -26,8 +30,13 @@ export const getCookie = function(name) {
let
arr
;
const
reg
=
new
RegExp
(
'(^| )'
+
name
+
'=([^;]*)(;|$)'
);
arr
=
document
.
cookie
.
match
(
reg
);
if
(
!!
arr
)
return
unescape
(
arr
[
2
]);
else
return
null
;
if
(
!!
arr
)
{
if
(
name
===
'token'
)
{
return
arr
[
2
];
}
else
{
return
unescape
(
arr
[
2
]);
}
}
else
return
null
;
};
/**
...
...
This diff is collapsed.
Click to expand it.
zyd_public/utils/getSchoolType.js
0 → 100644
浏览文件 @
6a970a2e
export
function
getIsA_Ba
()
{
// 判断当前环境是不是阿坝学校 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'阿坝'
)
>
-
1
;
}
export
function
getIsBei_Dian
()
{
// 判断当前环境是不是北电科学校 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'北京电子科技'
)
>
-
1
;
}
export
function
getIsGui_Jian
()
{
// 判断当前环境是不是贵建 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'贵州建设职业'
)
>
-
1
;
}
This diff is collapsed.
Click to expand it.
zyd_public/utils/hrefWithToken.js
浏览文件 @
6a970a2e
...
...
@@ -4,8 +4,7 @@ import { getInfo, transformApi } from '@/highOrderComponent/Service';
import
urlTransform
from
'@/webPublic/zyd_public/request/urlTransform'
;
export
function
hrefWithToken
(
url
,
arg
=
{
})
{
export
function
hrefWithToken
(
url
,
arg
=
{})
{
const
{
justOpenUrl
=
false
,
}
=
arg
;
...
...
@@ -19,7 +18,7 @@ export function hrefWithToken(url, arg = {
const
hrefUrl
=
transformApi
(
url
);
let
u
=
`
${
hrefUrl
}${
url
}
`
;
u
=
urlTransform
(
u
);
if
(
justOpenUrl
)
{
if
(
justOpenUrl
)
{
window
.
open
(
u
);
}
console
.
log
(
'hrefWithToken'
,
u
);
...
...
@@ -39,6 +38,6 @@ export function hrefWithToken(url, arg = {
});
}
export
function
hrefWithTokenSg
(
url
=
''
,
arg
=
{}){
export
function
hrefWithTokenSg
(
url
=
''
,
arg
=
{})
{
return
hrefWithToken
(
url
,
arg
);
}
This diff is collapsed.
Click to expand it.
zyd_public/utils/utils.js
浏览文件 @
6a970a2e
...
...
@@ -334,17 +334,7 @@ export function checkInputType(data, type) {
export
{
getHeaders
}
from
'./getHeaders'
;
export
function
getIsA_Ba
()
{
// 判断当前环境是不是阿坝学校 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'阿坝'
)
>
-
1
;
}
export
function
getIsBei_Dian
()
{
// 判断当前环境是不是北电科学校 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'北京电子科技'
)
>
-
1
;
}
export
function
getIsGui_Jian
()
{
// 判断当前环境是不是贵建 然后做定制需求. 主要用于定制开发
return
window
.
specialImportantSystemConfig
?.
schoolName
&&
window
.
specialImportantSystemConfig
?.
schoolName
.
indexOf
(
'贵州建设职业'
)
>
-
1
;
}
export
{
getIsGui_Jian
,
getIsBei_Dian
,
getIsA_Ba
}
from
'./getSchoolType'
;
// (function (_0x49c6e2, _0x5afabe) {
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论