<template>
<view class="page-wrap">
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: ''
}
},
onLoad(options) {
console.log('optionsUrl', options.url)
//获取上一个页面传来的url
this.url = decodeURIComponent(options.url)
},
onReady() {
this.clearMuiBack()
},
methods: {
// 关闭mui返回
clearMuiBack() {
// #ifdef APP-PLUS
var currentWebview = this.$scope.$getAppWebview().children()[0]
//监听注入的js
currentWebview.addEventListener('loaded', function () {
currentWebview.evalJS('mui.init({keyEventBind: {backbutton: false }});')
})
// #endif
}
}
}
</script>
<style lang="scss" scoped>
.page-wrap {
min-height: 100vh;
}
</style>
05-13
1529
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-02
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交