40 lines
795 B
Vue
40 lines
795 B
Vue
<template>
|
|
<view>
|
|
<!-- #ifdef APP-PLUS -->
|
|
<web-view :src="uri"></web-view>
|
|
<!-- #endif -->
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
<web-view :src="uri"></web-view>
|
|
<!-- #endif -->
|
|
<!-- #ifdef H5 -->
|
|
<view style="height: 80vh;">
|
|
<iframe :src="uri" frameborder="0" scrolling="auto" width="100%" height="100%"></iframe>
|
|
</view>
|
|
<!-- #endif -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
uri: '',
|
|
};
|
|
},
|
|
onLoad(options) {
|
|
this.uri = options.uri;
|
|
// #ifdef H5
|
|
if(options.title)uni.setNavigationBarTitle({
|
|
title:options.title
|
|
})
|
|
// #endif
|
|
// 设置网页链接
|
|
// this.uri = decodeURIComponent(options.uri);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
</style>
|