This commit is contained in:
zoujiandong
2025-08-29 09:46:07 +08:00
parent cc0ddd0bc9
commit da6e4ae551
10 changed files with 1121 additions and 624 deletions
+40
View File
@@ -0,0 +1,40 @@
<template>
<view class="container">
<!-- H5/APP 使用 web-view 也可 plus 下直接 openURL 更流畅这里统一 -->
<!-- 小程序端必须使用 web-view -->
<!-- #ifdef MP -->
<web-view :src="safeUrl"></web-view>
<!-- #endif -->
<!-- #ifndef MP -->
<view class="tip">仅小程序内使用内嵌浏览器其它端请直接打开外部浏览器</view>
<!-- #endif -->
</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>