<style>
	.koraActivity{
		height:auto;
		width:100%;
		background-color: #F3F5F7;
		padding-top:20px;
	}
	.koraActivityContent{
		/* display: flex; */
		margin:15px;
	}
	.activeList{
		width:120px;
		height:170px;
		background-color: #fff;
		border-radius: 3px;
		color:#404040;
		text-align: center;
		margin-right:12px;
		font-size:13px;
		margin-bottom:12px;
		display:inline-block;
	}
	.activeList:nth-child(3n+3){
		margin-right:0;
	}
	.activieTop{
		width:100%;
		height:100px;
	}
	.activieTop img{
		width:100%;
		height:100%;
	}
	.activeName{
		font-size:14px;
		margin:8px 6px;
		overflow:hidden;
		white-space:nowrap; /*不允许换行*/
		text-overflow:ellipsis;/*超出部分省略号显示*/
	}
	.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);
	}
	.viewDetail{
		width:65px;
		height:25px;
		font-size:12px;
		background-color: #0c0053;
		color:#fff;
		text-align: center;
		line-height: 25px;
		border-radius: 3px;
		margin: auto;
	}
</style>
<template>
	<view class="koraActivity">
		<view class="categray_Brand">
			会展活动
		</view>
		<view class="koraActivityContent">
			<view class="activeList" v-for="(item,index) in dataList" @click="goDetail(item)">
				<view class="activieTop">
					<img :src="item.CoverImage" alt=""/>
				</view>
				<view class="activeName">{{item.TypeName}}</view>
				<view class="viewDetail">查看详情</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/AppletTrade/GetCommerceActivityTypeList",
						data: {},
					},
					(res) => {
						if (res.resultCode == 1) {
							console.log(res,'数据');
							this.dataList = res.data;
						}
					}
				);
			},
			//跳转详情
			goDetail(item){
				uni.navigateTo({
					url: '/pages/kotra/activeInner?Id=' + item.Id
				});
			}
		}
	}
</script>
