Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
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
wangxuelai
biz.qingxiao.com
Commits
955f14ee
Commit
955f14ee
authored
Oct 31, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bww-v1'
parents
58f92ed7
17a6b335
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
plancourse.js
src/models/plancourse.js
+7
-3
No files found.
src/models/plancourse.js
View file @
955f14ee
...
...
@@ -7,7 +7,7 @@ import {
LocalStorage
,
SessionStorage
,
isExpired
,
getRandomFilename
,
getRandomFilename
,
formatMonth
,
}
from
'../utils/index'
;
import
{
calendar
}
from
'../utils/calendar'
;
import
*
as
classMgtAjax
from
'../services/classmgt'
;
...
...
@@ -141,12 +141,16 @@ export default {
const
{
type
}
=
payload
;
const
{
currentTimestamp
,
judgetodaycurrentTimestamp
}
=
yield
select
(
state
=>
state
.
plancourse
);
let
newcurrentTimestamp
=
currentTimestamp
;
const
d
=
formatMonth
(
newcurrentTimestamp
/
1000
).
split
(
'-'
);
const
year
=
d
[
0
];
const
month
=
d
[
1
];
const
monthDays
=
new
Date
(
d
[
0
],
d
[
1
],
0
).
getDate
();
if
(
type
==
'preyear'
)
{
newcurrentTimestamp
-=
(
365
*
24
*
60
*
60
*
1000
);
}
else
if
(
type
==
'premonth'
)
{
newcurrentTimestamp
-=
(
31
*
24
*
60
*
60
*
1000
)
;
newcurrentTimestamp
=
new
Date
(
year
,
month
-
1
,
1
).
getTime
()
-
1
;
}
else
if
(
type
==
'nextmonth'
)
{
newcurrentTimestamp
+=
(
31
*
24
*
60
*
60
*
1000
)
;
newcurrentTimestamp
=
new
Date
(
year
,
month
-
1
,
monthDays
).
getTime
()
+
(
24
*
60
*
60
*
1000
)
+
1
;
}
else
if
(
type
==
'nextyear'
)
{
newcurrentTimestamp
+=
(
365
*
24
*
60
*
60
*
1000
);
}
...
...
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