You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
628 B
37 lines
628 B
<template>
|
|
<view class="common_webview_page">
|
|
<view class="page_content">
|
|
<web-view :webview-styles="webviewStyles" :src="url"></web-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
url: "", //外链链接
|
|
webviewStyles: {
|
|
progress: {
|
|
color: '#FF3333'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
onReady() {
|
|
// 读取缓存中的外链链接
|
|
let webviewUrl = uni.getStorageSync('webview_url')
|
|
|
|
this.url = webviewUrl ? webviewUrl : ''
|
|
|
|
// 从本地缓存中同步移除指定 key
|
|
uni.removeStorageSync('webview_url')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|