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

冲突

parents 33c56af2 d0f03a8d
...@@ -83,5 +83,11 @@ ...@@ -83,5 +83,11 @@
}) })
</script> </script>
<!-- built files will be auto injected --> <!-- 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> </body>
</html> </html>
<template> <template>
<view> <view>
<TopBar title="我的合同"/> <TopBar title="我的合同"/>
<web-view :src="url"></web-view> <web-view :src="url" v-if="url"></web-view>
<view v-else class="empty">
获取合同失败,请重试~
</view>
</view> </view>
</template> </template>
...@@ -15,10 +18,14 @@ ...@@ -15,10 +18,14 @@
} }
}, },
mounted() { mounted() {
const obj = window.location.href.split('?')[1]; let web_href = window.location.href;
const {contract_url} = parse(obj); 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){ if(contract_url){
this.url = contract_url; this.url = decodeURIComponent(contract_url);
}else{ }else{
this.url = this.$store.state.webviewUrl; this.url = this.$store.state.webviewUrl;
} }
...@@ -26,5 +33,13 @@ ...@@ -26,5 +33,13 @@
} }
</script> </script>
<style> <style lang="scss">
.empty{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 30rpx;
color: #808080;
}
</style> </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