<template> <view> <TopBar title="分期合同"/> <web-view :src="url"></web-view> </view> </template> <script> import {parse} from 'querystring'; import TopBar from '@/components/TopBar/TopBar.vue'; export default { data() { return { url: '' } }, mounted() { 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; } } } </script> <style> </style>