2025-10-09 16:48:46 +08:00

38 lines
538 B
Vue

<template>
<view class="container">
<web-view :src="safeUrl"></web-view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
const safeUrl = ref('')
onLoad((query) => {
// 兼容编码后的 url
const raw = query && (query.url || '')
try {
safeUrl.value = decodeURIComponent(raw)
} catch (e) {
safeUrl.value = raw
}
})
</script>
<style>
.container{
min-height: 100vh;
}
.tip{
padding: 24rpx;
color: #666;
font-size: 28rpx;
}
</style>