<template>
	<view class="">
		<view class="notice" v-if="type==2">
			<u-notice-bar :text="text1" color="#fff" bgColor="#A5CF49" fontSize='16'></u-notice-bar>
		</view>
		<web-view :src="url" v-if="type==1"></web-view>
		<view class="content" v-if="type==2">
			<u-parse  :content="url"></u-parse>
		</view>
	</view>
</template>

<script setup>
	import {onLoad,onShow,onPullDownRefresh} from "@dcloudio/uni-app";
	import {ref} from "vue"
	import {getplatformmeun} from '@/utils/api.js'
	let  text1=ref('')
	let type=ref()
	onLoad(() => {
		
		
		getplatformmeun().then(res=>{
			uni.setNavigationBarTitle({
				title: res.data.name
			});
			let menu=res.data
				if(menu.jtype==1){
					type.value=1
					url.value=menu.jump_url
				}else{
					
					type.value=2
					url.value=menu.jump_text
					text1.value=menu.jump_notice
				}
		})
	})
	let url=ref('')
	onShow(()=>{
		
	})
	onPullDownRefresh(() => {
		setTimeout(function() {
			uni.stopPullDownRefresh();
		}, 1000);
	})
</script>


<style lang="scss">
	page{
		
	}
	.content{
		padding: 0 20rpx;
	}
</style>
