Commit f2bb6b55 by TengFengLian

取消活动排序

parent 069cca28
...@@ -107,10 +107,11 @@ Page({ ...@@ -107,10 +107,11 @@ Page({
tmpArr.push(tmpItem) tmpArr.push(tmpItem)
}) })
// 活动开始时间倒序排序 // var year = new Date().getFullYear()
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(year + "/" + b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(year + "/" + a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/"))
// })
if (type == 1) { if (type == 1) {
that.setData({ that.setData({
......
...@@ -252,9 +252,9 @@ Page({ ...@@ -252,9 +252,9 @@ Page({
}) })
// 活动开始时间倒序排序 // 活动开始时间倒序排序
tmpArr.sort(function(a,b) { // tmpArr.sort(function(a,b) {
return new Date(b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) // return new Date(b.beginDate.replace(/月/g,"\/").replace(/日/g,"\/")) - new Date(a.beginDate.replace(/月/g,"\/").replace(/日/g,"\/"))
}) // })
if (type == 1) { if (type == 1) {
that.setData({ that.setData({
......
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