Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
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
fengzhaoyu
schedule
Commits
552fdd2d
Commit
552fdd2d
authored
Apr 26, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改版本
parent
19646474
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
index.js
pages/index/index.js
+19
-16
No files found.
pages/index/index.js
View file @
552fdd2d
...
...
@@ -29,7 +29,7 @@ import create from "dd-store";
let
maxClickCount
=
5
;
create
.
Page
({
data
:
{
sign
:
''
,
sign
:
""
,
refresh
:
false
,
$data
:
null
,
iconDay
:
currentDate
.
getDate
(),
...
...
@@ -62,7 +62,6 @@ create.Page({
maxYear
:
maxYear
,
todayIndex
:
0
,
onShow
()
{
//如果是重复会议重新算
if
(
this
.
$store
.
data
.
indexNeedUpdate
)
{
dd
.
setNavigationBar
({
...
...
@@ -88,19 +87,19 @@ create.Page({
}
//开启一个定时器
this
.
timer
=
setInterval
(()
=>
{
this
.
getData
()
},
30000
)
this
.
getData
()
;
},
30000
)
;
},
onHide
()
{
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
},
refresh
()
{
this
.
onLoad
()
this
.
onLoad
()
;
},
onLoad
(
query
)
{
console
.
log
(
query
);
if
(
query
&&
JSON
.
stringify
(
query
)
!==
'{}'
)
{
if
(
query
&&
JSON
.
stringify
(
query
)
!==
"{}"
)
{
this
.
setData
({
listLoading
:
false
});
...
...
@@ -136,7 +135,8 @@ create.Page({
getDynamicList
({
current
,
size
:
10
}).
then
(
res
=>
{
})
.
then
(
res
=>
{
if
(
!
res
.
data
.
data
)
{
this
.
setData
({
listLoading
:
false
,
...
...
@@ -197,11 +197,12 @@ create.Page({
if
(
callBack
)
{
callBack
();
}
}).
catch
(
err
=>
{
})
.
catch
(
err
=>
{
if
(
err
&&
err
.
refresh
)
{
this
.
setData
({
refresh
:
true
})
});
}
});
},
...
...
@@ -302,7 +303,8 @@ create.Page({
getHomeUserSchedule1
({
startTime
:
"2020-01-01 00:00:00"
,
endTime
:
"2025-12-30 23:59:59"
}).
then
(
res
=>
{
})
.
then
(
res
=>
{
//是否刷新页面
if
(
this
.
data
.
sign
&&
res
.
data
.
data
.
sign
!==
this
.
data
.
sign
)
{
DateMap
=
getDateMap
(
this
.
minYear
,
this
.
maxYear
);
...
...
@@ -313,12 +315,13 @@ create.Page({
}
this
.
setData
({
sign
:
res
.
data
.
data
.
sign
});
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
if
(
err
&&
err
.
refresh
)
{
this
.
setData
({
refresh
:
true
})
});
}
});
},
...
...
@@ -460,7 +463,7 @@ create.Page({
}
// 取出DateMap的value值平铺到DateList
const
DateList
=
[];
DateMap
.
forEach
(
function
(
value
,
key
)
{
DateMap
.
forEach
(
function
(
value
,
key
)
{
const
keyDate
=
new
Date
(
key
);
const
year
=
keyDate
.
getFullYear
();
const
month
=
keyDate
.
getMonth
();
...
...
@@ -499,7 +502,7 @@ create.Page({
}
// 有日程长度
if
(
value
.
length
!==
0
)
{
value
.
sort
(
function
(
a
,
b
)
{
value
.
sort
(
function
(
a
,
b
)
{
return
a
.
startTime
.
getTime
()
-
b
.
startTime
.
getTime
();
});
value
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -727,7 +730,7 @@ create.Page({
createMeeting
()
{
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
},
nextDetail
:
throttle
(
function
(
e
)
{
nextDetail
:
throttle
(
function
(
e
)
{
dd
.
navigateTo
({
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
JSON
.
stringify
(
e
.
target
.
dataset
.
item
)
...
...
@@ -810,7 +813,7 @@ create.Page({
maxClickCount
--
;
if
(
maxClickCount
==
0
)
{
dd
.
alert
({
content
:
"0.0.1
3
"
content
:
"0.0.1
4
"
});
maxClickCount
=
5
;
}
...
...
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