<!--packageA/mycomponent/floatOrder/floatOrder.wxml-->
<wxs module="util">
	var toNumber = function(val) { if (val) {return Number(val) }};
	module.exports.toNumber = toNumber;
</wxs>
<view class="float sad" wx:if="{{broadcast_data.data && goodsType == 'zhpGroup'}}">
	<swiper class="swiperContainer" circular="{{true}}" vertical="{{true}}" autoplay="{{true}}" interval="{{2000}}" bindchange="bindChange">
		<block wx:for="{{broadcast_data.data}}" wx:key="{{index}}">
			<swiper-item class="swiperItem">
				<view class="wrapper">
					<view class="image">
						<image mode="widthFix" src="{{item.avatar_image}}"></image>
					</view>
					<view class="text" wx:if="{{item.type == 1}}"><text>恭喜{{item.nickname}}拼中</text></view>
					<view class="text" wx:if="{{item.type == 2}}"><text>恭喜{{item.nickname}}<block wx:if="{{util.toNumber(item.numerical)>0}}">获得{{item.numerical}}{{broadcast_data.integral_name}}</block><block wx:if="{{util.toNumber(item.credit)>0}}">, {{item.credit}}{{item.credit_plugin_name}}</block></text></view>
				</view>
			</swiper-item>	
			<!-- <swiper-item class="swiperItem"></swiper-item> -->
		</block>
		
	</swiper>
</view>

<view class="float" wx:if="{{broadcast_data && broadcast_data.length>0 && goodsType != 'zhpGroup'}}">
	<swiper class="swiperContainer" circular="{{true}}" vertical="{{true}}" autoplay="{{true}}" interval="{{3000}}">
		<block wx:for="{{broadcast_data}}">
			<swiper-item class="swiperItem" wx:key="{{index}}">
				<view class="wrapper">
					<view class="image">
						<image mode="widthFix" src="{{item.avatar_image}}"></image>
					</view>
					<view class="text"><text>{{item.content}}</text></view>
				</view>
			</swiper-item>	
			<swiper-item class="swiperItem"></swiper-item>
		</block>
		
	</swiper>
</view>

