Commit 3e32bb97 authored by 王建威's avatar 王建威

冲突

parents 33c56af2 d0f03a8d
......@@ -83,5 +83,11 @@
})
</script>
<!-- built files will be auto injected -->
<!-- <script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
<script>
// 初始化
var vConsole = new VConsole();
console.log('Hello world');
</script> -->
</body>
</html>
<template>
<view>
<TopBar title="我的合同"/>
<web-view :src="url"></web-view>
<web-view :src="url" v-if="url"></web-view>
<view v-else class="empty">
获取合同失败,请重试~
</view>
</view>
</template>
......@@ -15,10 +18,14 @@
}
},
mounted() {
const obj = window.location.href.split('?')[1];
const {contract_url} = parse(obj);
let web_href = window.location.href;
let Index = web_href.indexOf('contract_url');
if(Index > -1){
web_href = web_href.slice(Index);
}
const contract_url = web_href.replace(/contract_url=/, '');
if(contract_url){
this.url = contract_url;
this.url = decodeURIComponent(contract_url);
}else{
this.url = this.$store.state.webviewUrl;
}
......@@ -26,5 +33,13 @@
}
</script>
<style>
<style lang="scss">
.empty{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #808080;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment