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.
|
|
|
<template>
|
|
|
|
<web-view :src="url"></web-view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
url: ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(option) {
|
|
|
|
if (option.url) {
|
|
|
|
try {
|
|
|
|
this.url = decodeURIComponent(option.url);
|
|
|
|
} catch (error) {
|
|
|
|
console.error('URL解码出错:', error);
|
|
|
|
this.url = uni.getStorageSync('webUrl');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.url = uni.getStorageSync('webUrl');
|
|
|
|
}
|
|
|
|
console.log(this.url)
|
|
|
|
// 传入需要跳转的链接 使用web-view标签进行跳转
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|