Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f2bb6b55
authored
Aug 27, 2020
by
TengFengLian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
取消活动排序
parent
069cca28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
pages/activity/activity.js
pages/play/play.js
pages/activity/activity.js
View file @
f2bb6b55
...
...
@@ -107,10 +107,11 @@ Page({
tmpArr
.
push
(
tmpItem
)
})
// 活动开始时间倒序排序
tmpArr
.
sort
(
function
(
a
,
b
)
{
return
new
Date
(
b
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
-
new
Date
(
a
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
})
// var year = new Date().getFullYear()
// // 活动开始时间倒序排序
// tmpArr.sort(function(a,b) {
// return new Date(year + "/" + b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(year + "/" + a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/"))
// })
if
(
type
==
1
)
{
that
.
setData
({
...
...
pages/play/play.js
View file @
f2bb6b55
...
...
@@ -252,9 +252,9 @@ Page({
})
// 活动开始时间倒序排序
tmpArr
.
sort
(
function
(
a
,
b
)
{
return
new
Date
(
b
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
-
new
Date
(
a
.
beginDate
.
replace
(
/月/g
,
"\/"
).
replace
(
/日/g
,
"\/"
))
})
//
tmpArr.sort(function(a,b) {
//
return new Date(b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/"))
//
})
if
(
type
==
1
)
{
that
.
setData
({
...
...
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