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
dcfdfa55
Commit
dcfdfa55
authored
5 years ago
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日程页面修改dataStr
parent
2591e215
release_beta/1.0.0
…
dev
release/1.0.0
release/2.0.0
release/2.1.0
release/dev/2.0.0
release/dev/2.1.0
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
scheduleList.axml
pages/scheduleList/scheduleList.axml
+6
-6
scheduleList.js
pages/scheduleList/scheduleList.js
+9
-8
No files found.
pages/scheduleList/scheduleList.axml
View file @
dcfdfa55
...
@@ -10,16 +10,16 @@
...
@@ -10,16 +10,16 @@
</view>
</view>
</view>
</view>
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="1000" onScrollToLower="lower" scroll-into-view="{{todayStr}}">
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="1000" onScrollToLower="lower" scroll-into-view="{{todayStr}}">
<block a:for="{{scheduleList}}">
<block a:for="{{scheduleList}}"
key="{{item.dateStr}}"
>
<!-- 年 -->
<!-- 年 -->
<block a:if="{{item.type == 'year'}}">
<block a:if="{{item.type == 'year'}}">
<view class="year">
<view class="year"
id="{{item.dateStr}}"
>
{{item.value}}年
{{item.value}}年
</view>
</view>
</block>
</block>
<!-- 月 -->
<!-- 月 -->
<block a:elif="{{item.type == 'month'}}">
<block a:elif="{{item.type == 'month'}}">
<view class="month">
<view class="month"
id="{{item.dateStr}}"
>
{{item.value}}月
{{item.value}}月
</view>
</view>
</block>
</block>
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
</block>
</block>
<!-- 天 -->
<!-- 天 -->
<block a:elif="{{item.type == 'day' || item.type == 'today'}}">
<block a:elif="{{item.type == 'day' || item.type == 'today'}}">
<view class="date">
<view class="date"
id="{{item.dateStr}}"
>
<view class="hasDateTitle {{item.type == 'today' ? 'today' : ''}} {{item.value.isBeOverdue ? 'overdueLabel':''}}">
<view class="hasDateTitle {{item.type == 'today'
&& item.hasDateLabel
? 'today' : ''}} {{item.value.isBeOverdue ? 'overdueLabel':''}}">
<view>
<view>
{{item.week}}
{{item.week}}
</view>
</view>
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
</block>
</block>
<!-- 今天有无会议 -->
<!-- 今天有无会议 -->
<block a:elif="{{item.type == 'thisDay'}}">
<block a:elif="{{item.type == 'thisDay'}}">
<view class="date" id="{{item.
value.
dateStr}}">
<view class="date" id="{{item.dateStr}}">
<view class="hasDateTitle today">
<view class="hasDateTitle today">
<view>
<view>
{{item.week}}
{{item.week}}
...
...
This diff is collapsed.
Click to expand it.
pages/scheduleList/scheduleList.js
View file @
dcfdfa55
...
@@ -59,6 +59,7 @@ create.Page({
...
@@ -59,6 +59,7 @@ create.Page({
);
);
}
}
// 第一次加载
// 第一次加载
console
.
log
(
scheduleList
);
const
finalDate
=
new
Date
();
const
finalDate
=
new
Date
();
that
.
setData
({
that
.
setData
({
scheduleList
:
scheduleList
,
scheduleList
:
scheduleList
,
...
@@ -314,15 +315,14 @@ create.Page({
...
@@ -314,15 +315,14 @@ create.Page({
DateList
.
push
({
DateList
.
push
({
type
:
"year"
,
type
:
"year"
,
value
:
keyDate
.
getFullYear
(),
value
:
keyDate
.
getFullYear
(),
dateStr
:
keyDate
.
getFullYear
()
dateStr
:
`
${
keyDate
.
getFullYear
()}
`
});
});
}
}
if
(
keyDate
.
getDate
()
===
1
)
{
if
(
keyDate
.
getDate
()
===
1
)
{
DateList
.
push
({
DateList
.
push
({
type
:
"month"
,
type
:
"month"
,
value
:
keyDate
.
getMonth
()
+
1
,
value
:
keyDate
.
getMonth
()
+
1
,
dateStr
:
`
${
keyDate
.
getFullYear
()}
/
${
keyDate
.
getMonth
()
+
dateStr
:
`
${
keyDate
.
getFullYear
()}
/
${
keyDate
.
getMonth
()
+
1
}
`
1
}
/
${
keyDate
.
getDate
()}
`
});
});
}
}
if
(
keyDate
.
getDay
()
===
0
)
{
if
(
keyDate
.
getDay
()
===
0
)
{
...
@@ -337,7 +337,8 @@ create.Page({
...
@@ -337,7 +337,8 @@ create.Page({
value
:
`第
${
listWeek
}
周,
${
rangeMonth1
+
1
}
月
${
rangeDay1
}
日 -
${
value
:
`第
${
listWeek
}
周,
${
rangeMonth1
+
1
}
月
${
rangeDay1
}
日 -
${
rangeMonth2
==
rangeMonth1
?
""
:
rangeMonth2
+
1
+
"月"
rangeMonth2
==
rangeMonth1
?
""
:
rangeMonth2
+
1
+
"月"
}${
rangeDay2
}
日`
,
}${
rangeDay2
}
日`
,
dayStr
:
`
${
keyDate
.
getFullYear
()}
第
${
listWeek
}
周`
dayStr
:
`
${
keyDate
.
getFullYear
()}
/
${
rangeMonth1
+
1
}
/
${
rangeDay1
}
-week`
});
});
listWeek
+=
1
;
listWeek
+=
1
;
}
}
...
@@ -353,13 +354,13 @@ create.Page({
...
@@ -353,13 +354,13 @@ create.Page({
?
"0"
+
keyDate
.
getDate
()
?
"0"
+
keyDate
.
getDate
()
:
keyDate
.
getDate
(),
:
keyDate
.
getDate
(),
value
:
item
,
value
:
item
,
dateStr
:
`
${
key
}
/
${
item
.
id
}
`
dateStr
:
`
${
key
}
`
});
});
}
else
{
}
else
{
DateList
.
push
({
DateList
.
push
({
type
:
"day"
,
type
:
"day"
,
value
:
item
,
value
:
item
,
dateStr
:
`
${
key
}
/
${
item
.
id
}
`
dateStr
:
`
${
key
}
/
${
item
.
id
||
item
.
scheduleTemplateId
}
`
});
});
}
}
});
});
...
@@ -376,13 +377,13 @@ create.Page({
...
@@ -376,13 +377,13 @@ create.Page({
?
"0"
+
keyDate
.
getDate
()
?
"0"
+
keyDate
.
getDate
()
:
keyDate
.
getDate
(),
:
keyDate
.
getDate
(),
value
:
item
,
value
:
item
,
dateStr
:
`
${
key
}
/
${
item
.
id
}
`
dateStr
:
`
${
key
}
`
});
});
}
else
{
}
else
{
DateList
.
push
({
DateList
.
push
({
type
:
"today"
,
type
:
"today"
,
value
:
item
,
value
:
item
,
dateStr
:
`
${
key
}
/
${
item
.
id
}
`
dateStr
:
`
${
key
}
/
${
item
.
id
||
item
.
scheduleTemplateId
}
`
});
});
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
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