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
0d7e05bb
Commit
0d7e05bb
authored
5 years ago
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
df362ebc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
repetitionTime.axml
pages/repetitionTime/repetitionTime.axml
+1
-1
repetitionTime.js
pages/repetitionTime/repetitionTime.js
+12
-5
No files found.
pages/repetitionTime/repetitionTime.axml
View file @
0d7e05bb
...
...
@@ -14,7 +14,7 @@
<view>
永不截止
</view>
<switch checked="{{
recurrenceModel.
forever == '1'}}" onChange="switchChange"/>
<switch checked="{{forever == '1'}}" onChange="switchChange"/>
</view>
<view>
<picker-view value="{{pickerValue}}" class="parent" onChange="onChange">
...
...
This diff is collapsed.
Click to expand it.
pages/repetitionTime/repetitionTime.js
View file @
0d7e05bb
...
...
@@ -13,6 +13,7 @@ create.Page({
day
:
''
,
week
:
''
,
isBeOverdue
:
false
,
forever
:
'1'
},
onLoad
()
{
if
(
!
this
.
store
.
data
.
recurrenceModel
.
terminateTime
||
this
.
store
.
data
.
recurrenceModel
.
forever
==
'1'
)
{
...
...
@@ -69,6 +70,9 @@ create.Page({
pickerValue
:
[
timeYear
.
indexOf
(
`
${
date2
.
getFullYear
()}
年`
),
timeMonth
.
indexOf
(
`
${
date2
.
getMonth
()
+
1
}
月`
),
timeDay
.
indexOf
(
`
${
date2
.
getDate
()}
日
${
weekList
[
date2
.
getDay
()]}
`
)]
})
}
this
.
setData
({
forever
:
this
.
store
.
data
.
recurrenceModel
.
forever
})
},
getMonthLength
(
year
,
month
,
day
)
{
let
d
=
new
Date
(
year
,
month
,
day
)
...
...
@@ -80,8 +84,9 @@ create.Page({
return
d
.
getDate
()
},
switchChange
(
e
)
{
this
.
store
.
data
.
recurrenceModel
.
forever
=
e
.
detail
.
value
?
'1'
:
'0'
this
.
update
()
this
.
setData
({
forever
:
e
.
detail
.
value
?
'1'
:
'0'
})
},
save
(){
if
(
this
.
data
.
isBeOverdue
)
{
...
...
@@ -89,10 +94,11 @@ create.Page({
}
else
{
if
(
this
.
store
.
data
.
recurrenceModel
.
forever
==
'1'
)
{
let
data
=
this
.
getTwoYearToday
();
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
data
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
data
;
}
else
{
this
.
store
.
data
.
recurrenceModel
.
terminateTime
=
`
${
this
.
data
.
year
}
-
${
this
.
data
.
month
<
10
?
'0'
+
this
.
data
.
month
:
this
.
data
.
month
}
-
${
this
.
data
.
day
<
10
?
'0'
+
this
.
data
.
day
:
this
.
data
.
day
}
`
}
this
.
store
.
data
.
recurrenceModel
.
forever
=
this
.
data
.
forever
this
.
update
();
dd
.
navigateBack
({
delta
:
1
...
...
@@ -135,7 +141,8 @@ create.Page({
isBeOverdue
:
isBeOverdue
,
pickerValue
:
[
data
[
0
],
data
[
1
],
data
[
2
]]
})
this
.
store
.
data
.
recurrenceModel
.
forever
=
'0'
this
.
update
()
this
.
setData
({
forever
:
'0'
})
}
});
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