const hosts = [
	{value: 'https://guide-api.feihe.com', alias: '生产环境'},
	{value: 'https://guide-api-test.feihe.com', alias: 'test环境'},
	{value: 'https://guide-api-uat.feihe.com', alias: 'uat环境'},
]

const pages = [
	{value: '/mini/#/page/momHome/index', alias: '妈妈爱活动'},
	{value: '/mini/#/page/home/index?page_source=3', alias: '路演活动'},
]

const mpPage = 'pages/activity/index'

function joinUrlAndQs(url, qs) {
	return qs
		? url + (url.includes('?') ? (url.endsWith('?') ? '' : '&') : '?') + qs
		: url
}

for (const page of pages) {
	for (const host of hosts) {
		const url = joinUrlAndQs(mpPage, `url=${encodeURIComponent(host.value + page.value)}`)
		console.log(`${page.alias}-${host.alias}: ${url}`)
	}
}
