<template>
	<view class="starpage">
		<image style="width: 100%; height: 100%;" :src="imgurl+'starpage.png'"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgurl:this.networkResource.baseUrl 
			}
		},
		onShow() {
			this.timefn()
		},
		methods: {
			//启动页 跳转
			timefn(){
				let time = 3000
				let Authorization = uni.getStorageSync('Authorization')
				
				let logintype = uni.getStorageSync('logintype')
				console.log(Authorization,logintype)
				console.log(logintype,'----------------------')
				// uni.navigateTo({
				// url:"/oilDistribution/index/index",
				// })
				// return
				setTimeout(()=>{
					if(Authorization){
						uni.redirectTo({
							url:'../index/newindex'
						})
					}else{
						if(logintype==1){
							uni.redirectTo({
								url:"../login/login"
							})
							return
						}
						uni.redirectTo({
							url:"../login/privacy",
							fail(e) {
								console.log(e,'跳转失败')
							}
						})
					}
				},time)
			}
		}
	}
</script>

<style>
.starpage{
	height: 100vh;
	width: 100vw;
}
</style>
