Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GeliBusinessPlatform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljy
GeliBusinessPlatform
Commits
0076aade
Commit
0076aade
authored
Jun 05, 2020
by
刘俊宏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改8个小时的时区
parent
cd1bdede
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
...ata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
...essPlatform/ViewController/工作中心/WorkCViewController.swift
+22
-5
No files found.
GeliBusinessPlatform.xcworkspace/xcuserdata/liujunhong.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0076aade
No preview for this file type
GeliBusinessPlatform/ViewController/工作中心/WorkCViewController.swift
View file @
0076aade
...
...
@@ -97,19 +97,19 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
case
1001
:
topNavBtn
.
setTitle
(
"今日"
,
for
:
.
normal
)
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfDay
)
.
date
//今天开始时间
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfDay
)
.
date
-
8
.
hours
//今天开始时间
loadData
()
break
case
1002
:
topNavBtn
.
setTitle
(
"本周"
,
for
:
.
normal
)
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfWeek
)
.
date
+
1
.
days
//当周周一开始时间
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfWeek
)
.
date
+
1
.
days
-
8
.
hours
//当周周一开始时间
loadData
()
break
case
1003
:
topNavBtn
.
setTitle
(
"本月"
,
for
:
.
normal
)
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfMonth
)
.
date
//本月开始时间
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfMonth
)
.
date
-
8
.
hours
//本月开始时间
loadData
()
break
case
1004
:
...
...
@@ -163,15 +163,32 @@ class WorkCViewController: BaseViewController, UITableViewDelegate, UITableViewD
var
dataModel
:
WorkcenterIndexDataModel
?
=
nil
var
oftenArr
:
Array
<
WorkcenterIndexAuthResModel
>
?
=
[]
func
updateTheNowTime
(){
switch
topNavBtn
.
titleLabel
?
.
text
{
case
"今日"
:
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfDay
)
.
date
-
8
.
hours
//今天开始时间
break
case
"本周"
:
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfWeek
)
.
date
+
1
.
days
-
8
.
hours
//当周周一开始时间
case
"本月"
:
endTime
=
Date
()
starTime
=
DateInRegion
()
.
dateAt
(
.
startOfMonth
)
.
date
-
8
.
hours
//本月开始时间
break
default
:
break
}
}
//MARK:--加载数据
@objc
func
loadData
()
{
print
(
"请求网络数据"
)
updateTheNowTime
()
let
UserToken
=
UserDefaults
.
standard
.
value
(
forKey
:
"user_token"
)
let
star_time
=
Int
(
starTime
.
timeIntervalSince1970
)
let
end_time
=
Int
(
endTime
.
timeIntervalSince1970
)
//从周一开始(国际时间是从周日)
print
(
"本周开始时间:"
,
DateInRegion
()
.
dateAt
(
.
startOfWeek
)
.
date
+
1
.
days
)
print
(
"本周开始时间:"
,
starTime
)
WorkcenterIndex
([
"user_token"
:
UserToken
as
Any
,
"star_time"
:
star_time
as
Any
,
"end_time"
:
end_time
as
Any
],
success
:
{
(
data
)
in
let
dataM
=
data
as!
WorkcenterIndexModel
...
...
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