<!--pages/store/store.wxml-->
<view class="store-list" data-items="{{items}}" wx:key="index" catchtap="toRouter" wx:for="{{stores}}" wx:for-item="items" style="{{'background-color:'+(params.bgcolor?params.bgcolor:'')+';' }}">
	<view class="listNew">
		<view class="store-img">

			<view class="a store-logo">
				<view class="span img-mask" wx:if="{{items.operating_state === 1}}"></view>
				<view class="span img-text" wx:if="{{items.operating_state === 1}}">商家休息中</view>
				<view class="img">
					<image src="{{items.thumb}}" mode='aspectFill' />
				</view>
			</view>
			<view class="store-category">
				<view data-id="{{items.has_one_category.id}}" catchtap="toClassify" class="span da store-category-name" style="{{'color:'+(params.catecolor?params.catecolor:'')+';'+'background-color:'+(params.classcolor?params.classcolor:'')+';' }}">{{ items.has_one_category.name }}</view>
				<view class="span da store-category-name" style="{{'color:'+(params.catecolor?params.catecolor:'')+';'+'background-color:'+(params.classcolor?params.classcolor:'')+';' }}" wx:if="{{!items.has_one_category}}">暂无分类</view>
			</view>
		</view>
		<!--new-->
		<view class="store-intro2">
			<view class="h2" style="{{'color:'+(params.namecolor?params.namecolor:'')+';'}}">{{ items.store_name }}</view>
			<view class="score-box">
				<view class="score-left">
					<view class="iconfont icon-card_collect_b"></view>
					<view class="span">{{items.average_score}}分</view>
					<view class="span" style="margin-left:16rpx" wx:if="{{params.showsale != '0'}}">已售{{ items.order_total }}单</view>
				</view>
				<view class="score-right" style="{{'color:'+(params.discolor?params.discolor:'')+';'}}" catchtap="goToAdress" data-items="{{items}}" wx:if="{{items.distance}}">{{ items.distance }}{{ items.unit }}</view>
			</view>
			<view class="discount-box">
				<view class="p discount-item" wx:if="{{items.has_many_coupon&&items.has_many_coupon.length > 0}}">
					<view class="span red" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">优惠</view>
					<view class="span" style="margin-left: 16rpx; {{'color:'+(params.salecolor?params.salecolor:'')+';'}}" wx:for-index="coupon_index" wx:for-item="coupon" wx:for="{{items.has_many_coupon}}" wx:key="coupon_index" wx:if="{{coupon_index <=2}}">{{ coupon.name }}</view>
				</view>
				<view class="p discount-item" wx:if="{{(params.showlove == 1||params.showscore!='0')&&(items.store_point.point_switch != 0 || items.store_love.award == 1)}}">
					<view class="span red" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">赠送</view>
					<view class="span" style="margin-left: 16rpx; {{'color:'+(params.salecolor?params.salecolor:'')+';'}}" wx:if="{{params.showscore =='0' || items.store_point.point_switch == 0 ? false : true}}">{{ items.store_point.point }}</view>
					<view class="span" style="margin-left: 16rpx; {{'color:'+(params.salecolor?params.salecolor:'')+';'}}" wx:if="{{params.showlove == 1 && items.store_love.award == 1 ? true : false}}">{{ items.store_love.award_proportion }}</view>
				</view>
				<view class="p discount-item" wx:if="{{(params.showlove == 1||params.showscore!='0')&&(items.store_point.point_deduct_switch != 0 || items.store_love.deduction == 1)}}">
					<view class="span red" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';'}}">抵扣</view>
					<view class="span" style="margin-left: 16rpx; {{'color:'+(params.salecolor?params.salecolor:'')+';'}}" wx:if="{{params.showlove == 1 &&items.store_love.deduction == 1 ? true : false}}">{{ items.store_love.deduction_proportion }}</view>
					<view class="span" style="margin-left: 16rpx; {{'color:'+(params.salecolor?params.salecolor:'')+';'}}" wx:if="{{params.showscore =='0' || items.store_point.point_deduct_switch == 0 ? false : true}}">{{ items.store_point.max_point_deduct }}</view>
				</view>
			</view>
			<view class="dispatch-box" wx:if="{{items.dispatchs}}">
				<view class="span" style="{{'color:'+(params.shipcolor?params.shipcolor:'')+';'+'border-color:'+(params.shipcolor?params.shipcolor:'')+';'}}" wx:for="{{items.dispatchs}}" wx:for-index="dispatchidx" wx:for-item="dispatch" wx:key="dispatchidx">{{dispatch}}</view>
			</view>
		</view>
		<!--new end-->
	</view>
	<view class="goods-box" wx:if="{{items.recommend_goods &&items.recommend_goods.length > 0}}">
		<view class="flexBox"></view>
		<view class="good-item" wx:for-index="i" wx:for-item="good" wx:for="{{items.recommend_goods}}" wx:key="i" catchtap="toGood" data-goods_id="{{good.goods_id}}">
			<view class="good-img">
				<image src="{{good.thumb}}" mode='aspectFill' />
			</view>
			<view class="good-title p">{{good.title}}</view>
			<view class="good-title p money">{{language['money']}}{{good.price}}</view>
		</view>
	</view>
</view>
<view wx:if="{{showMore}}">
	<view style="width: 100%;height: 80rpx;line-height: 80rpx;text-align: center;" wx:if="{{loading}}" catchtap="getMoreStores">
		加载更多
	</view>
	<view style="width: 100%;height:80rpx;line-height: 80rpx;text-align: center;" wx:if="{{!loading}}">
		没有更多喽~
	</view>
</view>