Commit f421c6fb by 李嘉林

限时活动优化

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