<!--pages/goods/goods.wxml-->
<view class="goods" wx:if="{{goodsShow}}">
	<view class="fe-mod fe-mod-8" style="{{'background-color:'+(params.bgcolor?params.bgcolor:'')+';'}}">
		<view class="fe-mod-8-title" wx:if="{{params.showtitle == 0}}" style="{{'color:'+(params.titlecolor?params.titlecolor:'')+';background-color:'+(params.bgcolor?params.bgcolor:'')+';'}}">
			{{params.title || "请填写商品组标题" }}
		</view>
		<view class="nogoods" wx:if="{{data == ''}}">
			一个商品都没有...
		</view>
		<view wx:if="{{params.style !== 'hp' && params.style !== 'hotel'}}" class="new-goods">
			<view wx:key="index" wx:for-item="good" wx:for="{{data}}" wx:index="index">
				<view class="fe-mod-8-good good-new" style="{{'width: '+(params.style=='100%'?'98%':((params.style=='50%'||params.style=='49.5%')?'49%':'32%'))+';'+'margin-right: '+(((params.style=='50%'||params.style=='49.5%')&&(index+1)%2=='0')?'0':((params.style=='33.3%'&&(index+1)%3=='0')?'0':'2%'))+';'}}">
					<view class="a" catchtap="gotoDetail" data-good="{{good}}">
						<view class="fe-mod-8-main">
							<view class="fe-mod-8-main-img {{params.style == '50%'?'oo2':'' }} {{params.style == '33.3%'?'oo3':''}}">
								<image src="{{good.img}}" class="goodimg"  style="width: 100%; {{'height:'+(params.style == '49.5%' ? '47.5vw' : params.style == '33.3%'? '28vw':params.style == '50%'? '40vw': '95vw')+';'}}"
								 mode='aspectFill' />
								<view class="saleimg {{params.option?params.option:''}}"></view>
								<view class="distance" wx:if="{{params.distance == '1'}}" style="top:{{params.style == '49.5%'?'40.5vw':params.style == '33.3%'? '22vw':params.style == '50%'? '39vw': '87vw'}};">{{good.distance}}{{good.distance_unit}}</view>
							</view>
							<view class="fe-mod-8-main-name" wx:if="{{params.showname == 1}}">
								<view class="fe-mod-8-main-name-name">{{ good.name }}</view>
							</view>
							<view class="card-price" wx:if="{{params.price != 0}}">
								{{language['money']}}{{ good.pricenow }}
								<text class="span" style="text-decoration: line-through; font-size: 24rpx; color: #808080;" wx:if="{{params.price == 3 || (params.price == 1 && good.priceold != good.pricenow &&good.priceold > 0)}}">{{language['money']}}{{ good.priceold }}</text>
								<view class="fe-mod-8-main-name-buy add-cart {{params.buysub?params.buysub:''}}" wx:if="{{params.buysub}}"></view>
							</view>
							<view class="card-price colorBlack" wx:if="{{params.price == 3}}">
								会员价：{{ good.vip_price }}
							</view>
							<view class="card-price" wx:if="{{ designer && designer.designer_love_activity === '1'}}">赠送{{ good.award_proportion }}%{{designer.love_name || "爱心值"}}</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view wx:if="{{params.style === 'hp'}}" class="new-goods">
			<view wx:for-item="good" wx:for="{{data}}" wx:key="index">
				<view class="a" catchtap="gotoDetail" data-good="{{good}}">
					<view class="fe-mod-8-hp-line">
						<view class="fe-mod-8-hp-line-img">
							<view class="saleimg {{params.option?params.option:''}}"></view>
							<image src="{{good.img}}" mode='aspectFill' />
							<view class="distance_hp" wx:if="{{params.distance == '1'}}">{{good.distance}}{{good.distance_unit}}</view>
						</view>
						<view class="fe-mod-8-hp-line-info">
							<view class="title">{{ good.name }}</view>
							<view class="price fe-mod-8-main-name">
								<view wx:if="{{params.price != 0}}">
									<view class="p1" style="{{params.titlecolor?'color':''}}">{{language['money']}}{{ good.pricenow }}</view>
									<view class="p2" wx:if="{{params.price == 3 || params.price == 1}}">{{language['money']}}{{ good.priceold }}</view>
									<view class="p3" wx:if="{{params.price == 3}}">会员价：{{ good.vip_price }}</view>
								</view>
								<view class="p4" wx:if="{{designer &&designer.designer_love_activity ==='1'}}">赠送{{ good.award_proportion }}%{{designer.love_name || "爱心值"}}
								</view>
								<view class="p3" wx:if="{{good.sales && !good.award_proportion}}">
									销量:{{ good.sales }}{{ good.unit }}
								</view>
								<view class="fe-mod-8-main-name-buy  buy-1 {{params.buysub?params.buysub:''}}" style="margin-top: 0.375rem;"
								 wx:if="{{params.buysub}}"></view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view wx:if="{{params.style === 'hotel'}}">
			<view class="checkinout" style=" border: solid #cccccc 0.0625rem; border-width:0.0625rem 0;">
				<view class="selinTime" style="font-weight: normal;  display: block; height:2.5rem; line-height:2.5rem; padding:0 0rem;background:#fff"
				 catchtap="gosessionurl" datas-sessionurl="{{sessionurl}}">
					<view style="float:left; width:40%;">
						<text class="span" style="background:#f5f5f5; display:block; float:left; height:2.5rem; width:3.75rem; color:#999999; padding:0 0.3125rem 0 0.625rem;">入住:
						</text>
						<text class="CheckInDay span" style="float:left; display:block; padding-left:0.375rem;">xxxx</text>
					</view>
					<view style="float:left; width:40%;">
						<text class="text" style="background:#f5f5f5; display:block; float:left; height:2.5rem; width:3.75rem; color:#999999; padding:0 0.3125rem 0 0.625rem;">退房:
						</text>
						<text class="text CheckInDay1" style="float:left; display:block; padding-left:0.375rem;">xxxxx</text>
					</view>
					<view style="float:left; width:20%;background:#f5f5f5;">
						<view class="span2 CheckOutDay" style="margin-left:0.625rem; padding-right:0.625rem;">住:<text class="span" style=" color:#F00; padding:0 0.1875rem;">xxx</text>晚</view>
					</view>
				</view>
			</view>
			<view wx:for-item="good" wx:for="{{data}}"  wx:key="index" style="height:6.875rem;">
				<view class="ul jiudroom" style="height:6.875rem;">
					<view class="li">
						<view class="a" catchtap="gotoDetail" data-good="{{good}}">
							<image src="{{good.img}}" class="roomimg" mode='aspectFill' />
						</view>
						<view class="jiudroom-text" style="height:4.75rem;overflow:hidden">
							<view class="h1" style="font-size:16px; color: #333;">{{ good.name }}</view>
							<view class="span" wx:for-item="prams" wx:for-index="pramsidx" wx:key="{{pramsidx}}" wx:for="{{good.pram}}" style="height:6.875rem;">
								<view class="p">{{ prams.title }}:{{ prams.value }}</view>
							</view>
						</view>
						<view class="jiudroom-price pa">
							<view class="ins">{{language['money']}}<text class="i">{{ good.todayoprice }}</text></view>
							<view class="del">{{language['money']}}{{ good.todaycprice }}</view>
							<view wx:if="{{good.has == '0'}}">
								<view class="a btnbook" style="display: block;color: #ffffff;" catchtap="gourl" data-url="{{good.url}}">预定</view>
							</view>
							<view wx:if="{{good.has != '0'}}">
								<view class="button btnbook" style="background: #aaa;color:#fff">
									预定
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view wx:if="{{showMore}}">
			<view class="loadMore" wx:if="{{isLoadMore}}" catchtap="getMoreData">
				{{language['加载更多']}}
			</view>
      <!-- && Identification === 1 -->
			<view class="loadMore" wx:if="{{!isLoadMore }}">
				{{language['没有更多了']}}~~
			</view>
		</view>
	</view>
</view>
