<template>
	<view class="Skip"><view v-html="wxOpenTags"></view></view>
</template>

<script>
export default {
	data() {
		return {
			wxOpenTags: null
		};
	},
	props: {
		AppData: {
			type: Object,
			default: null
		}
	},
	mounted() {
		//#ifdef H5
		setTimeout(() => {
			this.pageWxApp();
		}, 2000);
		//#endif
	},
	methods: {
		pageWxApp() {
			let _this = this;
			let linktitle;
			let linktail;
			linktitle =_this.AppData.link.split('?')[0];
			linktail =_this.AppData.link.split('?')[1];
			_this.AppData.link = linktitle + '.html?' + linktail;
			_this.wxOpenTags = `<wx-open-launch-weapp path="${_this.AppData.link}" id="launch-wxapp" username="${_this.AppData.original_id}">  
							            <template>  
							                <uni-view style="display: block;background: url(${_this.AppData.img});background-size: 100% 100%;width: 400px;height: 140px;"></uni-view>
							            </template>  
										</wx-open-launch-weapp>`;
		}
	}
};
</script>

<style></style>
