<style>
	.categoryMain{
		height:auto;
		width:100%;
		background-color: #F3F5F7;
		padding-top:20px;
	}
	.categoryContent{
		/* display: flex; */
		margin:15px;
	}
	.cateList{
		width:120px;
		height:130px;
		background-color: #fff;
		border-radius: 3px;
		color:#404040;
		text-align: center;
		margin-right:12px;
		font-size:13px;
		margin-bottom:12px;
		display:inline-block;
	}
	.cateList:nth-child(3n+3){
		margin-right:0;
	}
	.categoryTop{
		width:100%;
		height:92px;
	}
	.categoryTop img{
		width:100%;
		height:100%;
	}
	.cateName{
		margin-top:10px;
	}
	.categray_Brand{
		width:84px;
		height:26px;
		color:#fff;
		font-size:14px;
		line-height: 26px;
		padding-right:12px;
		text-align: center;
		background-image: url(../../static/images/brand.png);
	}
</style>
<template>
	<view class="categoryMain">
		<view class="categray_Brand">
			品牌
		</view>
		<view class="categoryContent">
			<view class="cateList" v-for="(item,index) in dataList" :key="index" @click="goDetail(item)">
				<view class="categoryTop">
					<img :src="item.IconPath" alt=""/>
				</view>
				<view class="cateName">{{item.Name}}</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				pageTitle: '',
				mainColor: '',
				dataList:[]
			}
		},
		created() {
		},
		mounted() {
			this.getData();
		},
		onLoad(option) {
		},
		methods: {
			//获取数据
			getData() {
				this.request2({
						url: "/api/AppletGoods/GetProductCategoryAllList",
						data: {},
					},
					(res) => {
						if (res.resultCode == 1) {
							this.dataList = res.data;
						}
					}
				);
			},
			//跳转详情
			goDetail(item){
				uni.navigateTo({
					url: '/pages/goods/list?CategoryIds=' + item.Id
				});
			}
		}
	}
</script>

<style>

</style>
