Commit dfb3fc44 authored by zhengxiuming's avatar zhengxiuming

合同容器优化

parent ff15d0b0
...@@ -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>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
"mode": "history", "mode": "history",
"base": "/uni" "base": "/uni"
}, },
"publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/prod/1.0.31/", "publicPath": "https://dbc-static.oss-cn-beijing.aliyuncs.com/dbc-shop/uni/test/1.0.31/",
"optimization": { "optimization": {
"treeShaking": { "treeShaking": {
"enable": true "enable": true
......
<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