<template>
	<NavBar />
	<view class="container">
		<view class="title">
			<PageTitle :title="$t('openAccount.pageTitle2')" />
		</view>
		<view class="content">
			<view class="item" v-for="target in targets" :key="target.target" @click="toTarget(target.target)">
				<image :src="target.bgIcon" mode="aspectFit" class="bgIcon" :style="{ opacity: target.bgIconOpacity }"></image>
				<text>
					{{ target.title }}
				</text>
				<uni-icons type="right" size="19" class="icon" color="#fff"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: '',
	data() {
		return {
			targets: [
				{ title: 'MT4', bgIcon: '/static/mt4.png', bgIconOpacity: 1, target: '/pages/home/openMTAccount/completeAccountInfo/index?mt_versions=MT4&server_type=live' },
				{ title: 'MT5', bgIcon: '/static/mt5.png', bgIconOpacity: 0.4, target: '/pages/home/openMTAccount/completeAccountInfo/index?mt_versions=MT5&server_type=live' },
				{ title: this.$t('openAccount.demo'), bgIcon: '', bgIconOpacity: 0.4, target: '/pages/home/openMTAccount/completeAccountInfo/index?server_type=test' }
			]
		};
	},
	methods: {
		toTarget(target) {
			uni.navigateTo({
				url: target
			});
		}
	}
};
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>
