<!--pages/carcontent1/carcontent1.wxml-->
<view class="carcontent">
	<view class="branch" wx:if="{{list.goo&&list.set.cat_adv_img}}">
		<view class="a" catchtap="gotourl" data-url="{{list.set.cat_adv_url}}">
			<image src="{{list.set.cat_adv_img}}" mode='widthFix' />
		</view>
	</view>
	<view class="sote" wx:if='{{list.goo}}'>
		<view class="ul">
			<view class="li" wx:for="{{list.category}}"  wx:for-item="item" wx:key="index">
				<view catchtap="gocatelist" data-id="{{item.id}}">
					<view class="thumb" wx:if="{{item.thumb}}">
						<image src="{{item.thumb}}" mode='widthFix' />
					</view>
					<view class="thumb" wx:if="{{!item.thumb}}">
						<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
					</view>
					<view class="span">{{item.name}}</view>
				</view>
			</view>
		</view>
	</view>
	<block wx:for="{{list.data}}" wx:if='{{list.set.cat_level==3}}' wx:key="index">
		<view class="branch" wx:if="{{item.adv_img}}">
			<view class="a" data-url="{{item.adv_url}}" catchtap="gotourl_1">
				<image src="{{item.adv_img}}" mode='widthFix' />
			</view>
		</view>
		<view class="sote" wx:if='{{list.data}}'>
			<view class="h3" wx:if='{{item.name}}'>
				<view catchtap="gocatelist" data-id="{{item.id}}" class="a">{{item.name}}</view>
			</view>
			<view class="ul" wx:if="{{item.has_many_children.length>0}}">
				<view class="li" wx:for-item="catshop" wx:for="{{item.has_many_children}}" wx:for-index="catidx" wx:key="{{catidx}}">
					<view class="a" catchtap="gocatelist" data-id="{{catshop.id}}">
						<view class="thumb" wx:if="{{catshop.thumb}}">
							<image src="{{catshop.thumb}}" mode='widthFix' />
						</view>
						<view class="thumb" wx:if="{{!catshop.thumb}}">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
						</view>
						<view class="span">{{catshop.name}}</view>
					</view>
				</view>
			</view>
		</view>
	</block>
	<block wx:if="{{!list.goo}}">
		<block wx:if='{{list.set}}'>
			<view class="branch" wx:if="{{list.set.cat_level==2 && state.adv_img}}">
				<view class="a" data-url="{{state.adv_url}}" catchtap="gotourl_2">
					<image src="{{state.adv_img}}" mode='widthFix' />
				</view>
			</view>
			<view class="sote" wx:if='{{list.set.cat_level==2}}'>
				<view class="ul">
					<view class="li" wx:for="{{list.data}}" wx:key="{{catidx}}">
						<view class="a" catchtap="gocatelist" data-id="{{item.id}}">
							<view class="thumb" wx:if="{{item.thumb}}">
								<image src="{{item.thumb}}" mode='widthFix' />
							</view>
							<view class="thumb" wx:if="{{!item.thumb}}">
								<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
							</view>
							<view class="span">{{item.name}}</view>
						</view>
					</view>
				</view>
			</view>
		</block>
	</block>
</view>
