<template>
	<view>
		<PC v-if="isPC"></PC>
		<phone v-else></phone>
	</view>
</template>

<script>
	import PC from "./pc/login/login.vue"
	import Phone from "./phone/login.vue"

	export default {
		components: {
			PC,
			Phone
		},
		data() {
			return {
				isPC: false
			}
		},
		onLoad() {
			//暂时去除,上线前放开
			// this.loginForm.tenantId = options.tenantId || ''
			this.isPC = this.judgePC()
		},
		methods: {
			judgePC() {
				var userAgentInfo = navigator.userAgent;
				var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
				var flag = true;
				for (var v = 0; v < Agents.length; v++) {
					if (userAgentInfo.indexOf(Agents[v]) > 0) {
						flag = false;
						break;
					}
				}
				return flag;
			}

		}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
		font-family: -apple-system, "PingFang SC", "Microsoft Yahei", "Helvetica Neue",  Tahoma, STHeiti, Simsun, sans-serif;
	}
</style>