Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
folacin-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ynby
folacin-front
Commits
5a5cd695
Commit
5a5cd695
authored
Jun 20, 2022
by
罗成兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码整合
parent
db219844
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
55 deletions
+0
-55
.env.dev
.env.dev
+0
-0
ApiUtils.js
src/utils/ApiUtils.js
+0
-55
No files found.
.env.dev
deleted
100644 → 0
View file @
db219844
src/utils/ApiUtils.js
deleted
100644 → 0
View file @
db219844
import
md5
from
'js-md5'
//常用工具方法
export
const
ApiUtils
=
{
isBlank
:
function
(
obj
)
{
if
(
obj
==
null
||
obj
==
undefined
||
obj
==
""
||
obj
==
{}
||
obj
==
[])
{
return
true
;
}
if
(
obj
===
null
||
obj
===
undefined
||
obj
===
""
||
obj
===
{}
||
obj
===
[])
{
return
true
;
}
return
false
;
},
isNotBlank
:
function
(
obj
)
{
return
!
this
.
isBlank
(
obj
);
},
copyObject
:
function
(
obj
)
{
if
(
this
.
isBlank
(
obj
))
{
return
null
;
}
let
jsonData
=
JSON
.
stringify
(
obj
);
let
newObj
=
JSON
.
parse
(
jsonData
);
return
newObj
;
},
getLoginInfo
:
function
()
{
let
info
=
sessionStorage
.
getItem
(
'loginInfo'
);
let
newObj
=
JSON
.
parse
(
info
);
return
newObj
;
},
getAddDayDate
(
tempDate
,
dayCount
)
{
let
resultDate
=
new
Date
((
tempDate
/
1000
+
(
86400
*
dayCount
))
*
1000
);
//增加n天后的日期
let
mouth
=
resultDate
.
getMonth
()
+
1
;
let
day
=
resultDate
.
getDate
();
if
(
mouth
<
10
)
{
mouth
=
"0"
+
mouth
;
}
if
(
day
<
10
)
{
day
=
"0"
+
day
;
}
let
resultDateStr
=
resultDate
.
getFullYear
()
+
"-"
+
mouth
+
"-"
+
day
;
//将日期转化为字符串格式
return
resultDateStr
;
},
getDateStr
(
date
)
{
let
mouth
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
if
(
mouth
<
10
)
{
mouth
=
"0"
+
mouth
;
}
if
(
day
<
10
)
{
day
=
"0"
+
day
;
}
let
resultDateStr
=
date
.
getFullYear
()
+
"-"
+
mouth
+
"-"
+
day
;
//将日期转化为字符串格式
return
resultDateStr
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment