<template>
	<view></view>
</template>
<script>
	export default {
		created() {
			if (!uni.getStorageSync('userInfo') || uni.getStorageSync('userInfo').tenant_id == '000000') {
				this.$u.api.token('000000', 'admin', '704b18f7954fd548609134f03f9d5128').then(data => {
					setTimeout(() => {
						this.$u.func.login(data)
					}, 1000);
				})
			} else {
				if (uni.getStorageSync('accessToken')) {
					uni.switchTab({
						url: '/pages/tabBar/home'
					})
				} else {
					uni.redirectTo({
						url: '/pages/login/login'
					})
				}
			}
		}
	}
</script>