@@ -48,7 +48,7 @@ onLoad((options) => {
console.log('webview 接收参数:', options)
title.value = options.title || '文件预览'
- const realUrl = options.url || ''
+ const realUrl = decodeURIComponent(options.url || '')
fileType.value = getFileExt(realUrl)
// ✅ 核心修复:PDF 只编码一次,不再二次编码
@@ -13,7 +13,7 @@ export function openExternalUrl(url, type, options = {}) {
if (type === 'pay') {
// #ifdef APP-PLUS
- const webviewUrl = `/pages/common/webview?url=${url}&title=${encodeURIComponent(title)}`
+ const webviewUrl = `/pages/common/webview?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`
uni.navigateTo({ url: webviewUrl })
// #endif