Commit f421c6fb by 李嘉林

限时活动优化

parent 0da35328
......@@ -8,7 +8,7 @@
{{datas.singleItemActivityName}}
</view>
<view class="cover">
<image src="{{datas.singleItemActivityCoverImage}}"></image>
<image mode="center" src="{{datas.singleItemActivityCoverImage}}"></image>
</view>
<view class="countDown flex" wx:if="{{countDownShow}}">
<van-count-down
......
......@@ -232,7 +232,7 @@ const componentOptions = {
new Date(item.endTime.replace(/-/g, "/")).getTime() -
new Date().getTime();
item.singleItemActivityCoverImage = DFSImg(
item.singleItemActivityCoverImage
item.singleItemActivityCoverImage,400,400
);
item.isStart =
new Date(item.startTime.replace(/-/g, "/")).getTime() >
......@@ -245,6 +245,7 @@ const componentOptions = {
if (hideNum == actList.length) {
this.setData({ hideAll: true });
}
this.setData({ isLoading: false });
}
}
});
......
......@@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"activity-list-item":"./activityListItem/index",
"van-count-down": "/static/vant/count-down/index"
"van-count-down": "/static/vant/count-down/index",
"skeleton-block": "../module/SkeletonBlock/index"
}
}
......@@ -119,12 +119,21 @@
</view>
<!-- 活动列表 -->
<activity-list-item
wx:if="{{datas.componentData.dimension == 1}}"
wx:if="{{datas.componentData.dimension == 1 && !isLoading}}"
wx:for="{{datas.componentData.actList}}"
wx:key="index"
datas="{{item}}"
num="{{index}}"
countDownShow="{{datas.componentData['countDownShow']}}"
></activity-list-item>
<view wx:if="{{isLoading}}">
<skeleton-block
loading="{{isLoading}}"
type="{{'row'}}"
height="60"
row="1"
col="1"
></skeleton-block>
</view>
</view>
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 to comment