web.vue 519 Bytes
Newer Older
1 2
<template>
	<view>
郑秀明's avatar
郑秀明 committed
3
		<TopBar title="分期合同"/>
4 5 6 7 8
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
郑秀明's avatar
郑秀明 committed
9 10
	import {parse} from 'querystring';
	import TopBar from '@/components/TopBar/TopBar.vue';
11 12 13 14 15 16 17
	export default {
		data() {
			return {
				url: ''
			}
		},
		mounted() {
郑秀明's avatar
郑秀明 committed
18 19 20 21 22 23 24
			const obj = window.location.href.split('?')[1];
			const {contract_url} = parse(obj);
			if(contract_url){
				this.url = contract_url;
			}else{
				this.url = this.$store.state.webviewUrl;
			}
25 26 27 28 29 30
		}
	}
</script>

<style>
</style>