Commit 243dea2e by 高淑倩

add: 首页_轮播图

parent 7ca111d3
......@@ -24,11 +24,6 @@ Component({
* 组件的初始数据
*/
data: {
imgUrls: [
'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'
],
indicatorDots: true,
autoplay: true,
circular: true,
......
<!--component/imageSwiper/imageSwiper.wxml-->
<!--<swiper
indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}"
interval="{{interval}}"
duration="{{duration}}"
circular="{{circular}}"
class="image-swiper"
>
<block wx:for="{{imgUrls}}" wx:key="{{item}}">
<swiper-item class="swiper-item">
<image wx:if="{{baseImgUrl}}" src="{{baseImgUrl}}{{item.imageUrl}}" data-appid="{{item.link.appid}}" data-path="{{item.link.url}}" data-link="{{item.link}}" data-item="{{item}}" bindtap='preview' class="slide-image" />
</swiper-item>
</block>
</swiper>-->
<swiper
class="image-swiper"
indicator-dots="{{indicatorDots}}"
......@@ -21,13 +7,17 @@
circular="{{circular}}"
duration="{{duration}}"
>
<block wx:for="{{imgUrls}}" wx:key="{{item}}">
<swiper-item>
<block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item class="swiper-item">
<image
src="{{item}}"
wx:if="{{baseImgUrl}}"
src="{{baseImgUrl}}{{item.imageUrl}}"
data-appid="{{item.link.appid}}"
data-path="{{item.link.url}}"
data-link="{{item.link}}"
data-item="{{item}}"
bindtap='preview'
class="slide-image"
width="355"
height="150"
/>
</swiper-item>
</block>
......
......@@ -2,21 +2,21 @@
<view class='user-center' style="background: {{pageBackgroundColor == 1? '#eee': '#fff'}};min-height: {{outoHeigth}}px">
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<!-- {{pItem.type}} -->
{{pItem.type}}
<view wx:if="{{pItem.type == 1}}">
<image-swiper/>
<image-swiper image-data="{{pItem.rotationchart.images}}"/>
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center/>
<person-center person-data="{{pItem.customer}}"/>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav/>
<pic-nav pic-nav="{{pItem.navigation.images}}"/>
</view>
<view class="" wx:if="{{pItem.type == 4}}">
<bottom />
<bottom bottom="{{pItem.bottom}}" />
</view>
<view class="" wx:if="{{pItem.type == 5}}">
<bottom-tabs/>
<bottom-tabs tabBar="{{pItem.tabBar}}"/>
</view>
<view class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}"/>
......@@ -25,7 +25,7 @@
<tab-sort categorys="{{pItem.categoryType.categorys}}"/>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention/>
<attention focusWx="{{pItem.focusWx}}"/>
</view>
<view class="" wx:if="{{pItem.type == 9}}">
<attention/>
......
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