<template>
	<div>
		<div style="margin: 10px" v-if="$i18n.locale == 'zh'">
			支付验证成功，即将关闭当前页面......
		</div>
		<div style="margin: 10px" v-else>
			Payment verification succeeded. The current page will be closed soon...
		</div>
	</div>
</template>
<script>
export default {
	name: 'userPayMoney',
	data() {
		return {
			userPay: '',
		}
	},
	mounted() {
		this.init()
	},
	methods: {
		init() {
			setTimeout(() => {
				var userAgent = navigator.userAgent
				if (userAgent.indexOf('MSIE') > 0) {
					if (userAgent.indexOf('MSIE 6.0') > 0) {
						window.opener = null
						window.close()
					} else {
						window.open('', '_top')
						window.top.close()
					}
				} else if (
					userAgent.indexOf('Firefox') != -1 ||
					userAgent.indexOf('Chrome') != -1
				) {
					window.location.href = 'about:blank ' //火狐默认状态非window.open的页面window.close是无效的
					//window.history.go(-2);
				} else {
					window.opener = null
					window.open(',', '_self').close()
				}
				// window.close()
			}, 5000)
		},
	},
}
</script>
<style lang="less" scoped>
* {
	padding: 0;
	margin: 0;
	font-size: 20px;
	color: #010101;
	background-color: #fff;
}
</style>
