<template>
	<view>
		<view class="logoview">
			<image v-if="wxconfig && wxconfig.CONFIG_PROJECT_LOGO" :src="wxconfig.CONFIG_PROJECT_LOGO" mode="aspectFit"
				class="logo"></image>
			<image v-else :src="config.photo?config.photo:''" mode="aspectFit" class="logo"></image>
		</view>
		<view class="slogan dflex">
			©绿萝云 2024
		</view>
	</view>
</template>

<script>
	const req = require('../../utils/request.js');
	const api = require('../../utils/api.js');
	const app = getApp();
	export default {
		components: {},
		data() {
			return {
				config: '',
				typeRole: '',
				userInfo: {},
				wxconfig: {},
			};
		},
		onLoad(opt) {
			let url = uni.getStorageSync('window_location')
			uni.removeStorageSync('window_location')
			var tha = this;
			req.setStorage('appId', opt.appId);
			this.getwxConfig();
			setTimeout(function() {
				if(url){
					window.location.replace(url)
				}else{
					tha.jumpUrl('/pages/tabBar/index?appId=' + opt.appId);
				}
			}, 3000);
		},
		methods: {
			getwxConfig() {
				req.getwxConfig(data => {
					this.wxconfig = data;
				});
			},

			jumpUrl(url) {
				uni.reLaunch({
					url: url
				});
			}
		}
	};
</script>

<style>
	@import './launch.css';
</style>