Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
46c757f6
Commit
46c757f6
authored
Mar 26, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资讯列表滚动数据处理
parent
653b8383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
9 deletions
+7
-9
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxml
+1
-5
static/nativeComponents/TimeLimitedDiscount/index.js
+6
-4
No files found.
static/nativeComponents/TimeLimitedDiscount/activityListItem/index.wxml
View file @
46c757f6
<!-- 活动列表item -->
<view
class="activityListItem"
wx:if="{{!datas.isEnd}}"
bindtap="toActivity"
>
<view class="activityListItem" bindtap="toActivity">
<view class="title">
{{datas.singleItemActivityName}}
</view>
...
...
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
46c757f6
...
...
@@ -220,10 +220,10 @@ const componentOptions = {
new
Date
().
getTime
()
<=
0
)
{
item
.
isEnd
=
true
;
//
item.isEnd = true;
hideNum
+=
1
;
}
else
{
item
.
isEnd
=
false
;
//
item.isEnd = false;
}
item
.
startTimeTimeStamp
=
new
Date
(
item
.
startTime
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
...
...
@@ -239,9 +239,11 @@ const componentOptions = {
new
Date
().
getTime
()
?
true
:
false
;
console
.
log
(
item
.
isEnd
,
"-----------------------213"
);
});
this
.
setData
({
"datas.componentData.actList"
:
list
});
let
newList
=
list
.
filter
((
item
)
=>
{
return
new
Date
(
item
.
endTime
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
new
Date
().
getTime
()
>
0
;
})
this
.
setData
({
"datas.componentData.actList"
:
newList
});
if
(
hideNum
==
actList
.
length
)
{
this
.
setData
({
hideAll
:
true
});
}
...
...
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