yuminge-app/yun-min-program-plugin-master/packageG/mycomponent/headline/headline.wxml

46 lines
3.0 KiB
Plaintext

<!--packageE/headline/headline.wxml-->
<view class="component-wrapper {{'component-'+component_id}}">
<view class="headline" style="background: {{datas.preview_color}};">
<!-- 在这里写头条静态头条静态 -->
<view class="headline_img" wx:if="{{datas.show_logo}}" style="width: {{datas.logo_image_size}}px;height: {{datas.logo_image_size / images.ratio}}px">
<image class="img" bindload="imageLoad" src="{{datas.logo_image ? datas.logo_image : emptyImage}}" mode='aspectFit' />
</view>
<view class="fixright" catchtap="gotoList" style="background: {{datas.preview_color}}">
<block wx:if="{{datas.show_number == 2}}">
<swiper display-multiple-items="{{2}}" interval="{{3000}}" autoplay="{{true}}" vertical="{{true}}" circular="{{true}}" style="line-height:{{datas.headline_height/2}}px;height:{{datas.headline_height}}px;width:{{clientWidth}}px;background:{{datas.preview_color}}">
<block wx:for="{{datas.list}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item style="height:{{datas.headline_height/2}}px;">
<view class="right">
<view class="headline_tag" wx:if="{{datas.show_tag}}" style="background-color: {{datas.tag_color}};color: {{datas.tag_font_color}};font-size: {{datas.tag_font_size}}px;border: solid {{datas.show_tag_border?'1':'0'}}px {{datas.tag_border_color}};">
<view>{{datas.headline_tag}}</view>
</view>
<view class="headline_title" style="color: {{datas.headline_font_color}};font-size: {{datas.headline_font_size}}px">
{{ item.title || '暂无文章标题'}}
</view>
</view>
</swiper-item>
</block>
</swiper>
</block>
<block wx:if="{{datas.show_number == 1}}">
<swiper interval="{{3000}}" autoplay="{{true}}" vertical="{{true}}" circular="{{true}}" style="line-height:{{datas.headline_height}}px;height:{{datas.headline_height}}px;width:{{clientWidth}}px;background:{{datas.preview_color}}">
<block wx:for="{{datas.list}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<swiper-item style="height:{{datas.headline_height}}px;">
<view class="right">
<view class="headline_tag" wx:if="{{datas.show_tag}}" style="background-color: {{datas.tag_color}};color: {{datas.tag_font_color}};font-size: {{datas.tag_font_size}}px;border: solid {{datas.show_tag_border?'1':'0'}}px {{datas.tag_border_color}};">
<view>{{datas.headline_tag}}</view>
</view>
<view class="headline_title" style="color: {{datas.headline_font_color}};font-size: {{datas.headline_font_size}}px">
{{ item.title || '暂无文章标题'}}
</view>
</view>
</swiper-item>
</block>
</swiper>
</block>
</view>
</view>
</view>