Commit 5811e75b by TengFengLian

活动开始时间倒序排序

parent a194ddd9
Showing with 7 additions and 0 deletions
......@@ -96,9 +96,16 @@ Page({
title: item.name,
date: item.activeDate + ' ' + item.activeTime,//'6月30日-7月12日 10:00-12:00',
describe: item.summary,
beginDate: item.activeDate.split('-')[0],
}
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,"\/"))
})
if (type == 1) {
that.setData({
activity: tmpArr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment