<wxs module="util">
  var inOf = function (val, str) { if (val) { return val.indexOf(str) } };
  module.exports.inOf = inOf;
</wxs>
<view class="goodslist">
	<view class="h3">
		<view class="title">{{text}}</view>
		<view class="spas"></view>
	</view>
	<view class="mai">
		<view class="main2">
			<view class="list" wx:for="{{goods}}" wx:key="index" wx:for-item="items">
				<view class="imgs" wx:if="{{index>=num}}">
					<view class="a" catchtap="gogoods" data-id="{{items.goods_id}}" wx:if="{{items.thumb}}">
						<image src="{{items.thumb}}" mode='widthFix' />
					</view>
					<view class="a" catchtap="gogoods" data-id="{{items.goods_id}}" wx:if="{{!items.thumb}}">
						<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
					</view>
				</view>
				<view class="shop_info" wx:if="{{index>=num}}">
					<view class="proTit">
						<view class="a" catchtap="gogoods" data-id="{{items.goods_id}}">
							{{items.title}}
						</view>
					</view>
					<view class="span">
						<view class="a" catchtap="gogoods" data-id="{{items.goods_id}}">
							{{language['money']}}{{items.vip_level_status&&items.vip_level_status.status==1?items.vip_level_status.word:items.price}}
						</view>
					</view>
					<view class="span">
						<view class="a" catchtap="gogoods" data-id="{{items.goods_id}}">
							分红 {{language['money']}}{{items.bonus_money}}
						</view>
					</view>
				</view>
				<view class="add noActive" wx:if="{{util.inOf(selectedGoodsID,items.goods_id)==-1&&(index>=num)}}" catchtap="addGood" data-id="{{items.goods_id}}">
				</view>
				<view class="add active" wx:if="{{util.inOf(selectedGoodsID,items.goods_id)> -1&&(index>=num)}}" catchtap="addGood" data-id="{{items.goods_id}}">
				</view>
			</view>
		</view>
	</view>
	<view class="space" style="display: block;height:100rpx"></view>
	<view class="loadNomore" wx:if='{{loading}}'>
		<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/no-more-product.png" mode='widthFix' />
	</view>
</view>
