<template name="hotmode">
	<view>
		<view class="hotmode-content clearfix">
			<view class="hot-image le">
				<image src="https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWIi-AMo5bAABBwc_L90w000.png" mode=""></image>
			</view>
			<view class="hot-image ri">
				<image src="https://img-b.caimei365.com/group1/M00/04/30/rB-lHGRWIi-AJl1FAABLF6OKCBA834.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:'hotmode',
		props:{
			list:{
				type:Array
			}
		},
		data() {
			return{
				current:100,
				navList:[]
			}
		},
		created(){
			this.initData(this.list)
		},
		computed: {
	
		},
		methods:{
			initData(list){
				this.navList = list
			},
			NavToDetailPage(pros,index) {//跳转
				if(index === 3){
					let linkPath = 'https://static.caimei365.com/app/caimei-activity-h5/html/2023/activity_02.html'
					this.$api.navigateTo(`/pages/h5/activity/activity?link=${linkPath}&linkId=382`)
				}else{
					/**
					 * 页面跳转类型
					 * 1、二级页面,2、搜索项目仪器,3、直播页面,4、自由页面,5、商品详情,6、仪器项目详情,7、供应商主页
					 * 8、专题活动页,9、二手市场介绍,10、二手商品列表,11、二手商品发布,12、商品搜索,13、信息详情
					 * 14、品牌招商介绍页,15、维修保养介绍页,16、首页,17、注册页,18、信息中心,19、供应商列表
					 * 23、新活动专题页面
					 **/
					 if(pros.linkType){
					 	 const typeMap = {
					 		1:`/pages/goods/goods-instrument?linkId=${pros.linkParam.id}&title=${pros.name}`,
					 		3:'/pages/h5/article/path-live',
					 		4:'/pages/h5/other/brands',
					 		10:'/pages/second/product/product-list',
					 		14:'/pages/h5/other/brand',
					 		15:'/pages/h5/other/repair',
					 		18:`/pages/h5/article/path?link=${pros.link}`,
					 		20:`/pages/goods/good-floor?linkId=${pros.linkParam.id}&title=${pros.name}`,
					 		21:'/pages/h5/activity/meobohui',
					 		22:`/pages/goods/good-floor-temp?linkId=${pros.linkParam.id}&title=${pros.name}`,
					 		23:`/pages/h5/activity/activity-topic?linkId=${pros.linkParam.id}`,  //活动专题页面
					         25:'/pages/goods/goods-doc-list' ,//美业资料
					         28:`/pages/h5/article/path?link=${pros.link}`, // 采美认证通
					 		29:'/pages/user/coupon/coupon-collection',//领券中心
					 		
					 	 }
					 	const url = typeMap[pros.linkType]
					 	this.$api.navigateTo(url)
					 }
				}
			}
		}
	}
</script>

<style lang="scss">
	.hotmode-content{
		width: 100%;
		height: 248rpx;
		box-sizing: border-box;
		padding: 24rpx;
		background: #F7F7F7;
		.hot-image{
			width: 340rpx;
			height: 200rpx;
			float: left;
			&.le{
				float: left;
				
			}	
			&.ri{
				float: right;
			}
			image{
				width: 340rpx;
				height: 200rpx;
				display: block;
			}
		}
	}
</style>
