import {getCdnUrl} from "./utils";

const pageName = '1015专题活动页面'

// 页面配置
export function homeConfig(){
	return {
		"background": {
			image: getCdnUrl('home/bg.jpg'),
			style: {
				backgroundPosition: {y: "calc(4937rpx + 845rpx)"}
			}
		},
		shareConfig: {
			title: '星妈会超级品牌周来啦！北纬47°六水香大米上新！',
			path: '/activities/1015/home',
			imageUrl: 'https://course.feihe.com/momclub-picture/activity/1015/v1/share-image.png',
		},
		components: [
			{
				type: "image-swiper",
				properties: {
					autoplay: true,
					interval: 3000,
					duration: 500,
					circular: true,
					indicatorDots: true,
					items: [{
						image: getCdnUrl('home/banner-0.png'),
						mdConfig: {
							pageName,
							componentName: "banner头图",
							componentContent: "北纬47 °",
							logExposure: true,
						},
					}, {
						image: getCdnUrl('home/banner-1.png'),
						mdConfig: {
							pageName,
							componentName: "banner头图",
							componentContent: "国际大米节金奖",
							logExposure: true,
						},
						link: {
							type: 2,
							url: "subPackages/shopMainProcess/product/index?productId=643246351932056828&skuId=643246351932056829&entrySource=xmh_wechatmp_activity_1015ppz",
							extra: {envVersion: "release", appId: "wx4205ec55b793245e"},
						}
					}]
				},
				style: {
					height: "845rpx",
				}
			},
			{
				type: "click-area",
				properties: {
					area: {x: 35, y: 915, width: 685, height: 245},
					mdConfig: {
						pageName,
						componentName: "商品banner",
						componentContent: "商品banner",
						logExposure: true,
						logClick: true,
					},
					link: {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=720448018529899563&skuId=720448018529899564&entrySource=xmh_wechatmp_activity_1015ppz"
					},
				},
			},
			{
				type: "click-area",
				properties: {
					area: {x: 50, y: 2095, width: 320, height: 390},
					mdConfig: {
						pageName,
						componentName: "品牌宣传1",
						componentContent: "商品名称1",
						logExposure: true,
						logClick: true,
					},
					link: {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=643246351932056828&skuId=643246351932056829&entrySource=xmh_wechatmp_activity_1015ppz"
					},
				}
			},
			{
				type: "click-area",
				properties: {
					area: {x: 380, y: 2095, width: 320, height: 390},
					mdConfig: {
						pageName,
						componentName: "品牌宣传1",
						componentContent: "商品名称2",
						logExposure: true,
						logClick: true,
					},
					link: {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=643245114369684591&skuId=643245114369684592&entrySource=xmh_wechatmp_activity_1015ppz"
					},
				}
			},
			{
				type: "click-area",
				properties: {
					area: {x: 50, y: 3405, width: 320, height: 390},
					mdConfig: {
						pageName,
						componentName: "品牌宣传2",
						componentContent: "商品名称1",
						logExposure: true,
						logClick: true,
					},
					link: {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=368848644886521333&skuId=368848644886521334&entrySource=xmh_wechatmp_activity_1015ppz"
					},
				}
			},
			{
				type: "click-area",
				properties: {
					area: {x: 380, y: 3405, width: 320, height: 390},
					mdConfig: {
						pageName,
						componentName: "品牌宣传2",
						componentContent: "商品名称2",
						logExposure: true,
						logClick: true,
					},
					link: {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=367056951412568222&skuId=367056951412568223&entrySource=xmh_wechatmp_activity_1015ppz"
					},
				}
			},
			{
				type: "invite-task",
				properties: {
					area: {x: 35, y: 3865, width: 685, height: 195},
					mdConfig: {
						pageName,
						componentName: "邀请得好礼",
						componentContent: "立即邀请",
						logExposure: true,
						logClick: true,
					},
				},
			},
			{
				type: "click-area",
				properties: {
					area: {x: 35, y: 4080, width: 685, height: 245},
					mdConfig: {
						pageName,
						componentName: "中部抽奖banner",
						componentContent: "中部抽奖banner",
						logExposure: true,
						logClick: true,
					},
					link: {
						"type": 1,
						"url": "/activities/1015/lottery/index"
					},
					"needLogin": true,
				},
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 50, "y": 4405, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品1",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=643243579803297229&skuId=643243579803297230&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 270, "y": 4405, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品2",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=367070126091559975&skuId=367070126091559976&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 490, "y": 4405, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品3",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=367072891644670759&skuId=367072891644670760&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 50, "y": 4705, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品4",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=649435440113431085&skuId=649435440113431086&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 270, "y": 4705, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品5",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=662389781175669644&skuId=662389781175669645&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 490, "y": 4705, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品1",
						componentContent: "商品6",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=759248536249386165&skuId=759248536249386166&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 50, "y": 5110, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品1",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=399302177175705120&skuId=399302177175705121&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 270, "y": 5110, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品2",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=650599779914081413&skuId=650599779914081414&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 490, "y": 5110, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品3",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=667527760599458548&skuId=667527760599458549&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 50, "y": 5410, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品4",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=548984197069284758&skuId=548984197069284759&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 270, "y": 5410, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品5",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=792232869316748776&skuId=792232869316748777&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
			{
				"type": "click-area",
				"properties": {
					"area": {"x": 490, "y": 5410, "width": 200, "height": 285},
					"mdConfig": {
						pageName,
						componentName: "6组商品2",
						componentContent: "商品6",
						logExposure: true,
						logClick: true,
					},
					"link": {
						"extra": {"envVersion": "release", "appId": "wx4205ec55b793245e"},
						"type": 2,
						"url": "subPackages/shopMainProcess/product/index?productId=704050114989893289&skuId=704050114989893290&entrySource=xmh_wechatmp_activity_1015ppz"
					}
				}
			},
		],
	}
}

// 获取图片URL的工具函数
export const getImageUrl = (imagePath) => {
	return imagePath
}
