IOS用户通过web-view无法跳转到微信公众号文章地址
[图片] 小程序后台已关联公众号,在安卓机里面可以正常跳转并且显示页面,但是到了IOS可以跳转,但是无法正常显示图片,以下是IOS跳转的页面 [图片] 示例代码: (1)链接跳转函数: // 跳转到外部链接 goToExternalLink(externalLinks, title) { if (!externalLinks) { uni.showToast({ title: '链接信息有误', icon: 'none' }); return; } // 检查用户登录状态,未登录时提示先登录 if (!this.isUserLoggedIn) { this.showLoginRequiredModal('查看外部链接需要先登录'); return; } // 使用智能导航函数处理外部链接 smartNavigate(externalLinks, title || '外部链接'); }, (2)smartNavigate函数: export function smartNavigate(url, title = '外部链接', options = {}) { if (!url) { console.error('跳转URL不能为空'); return; } if (url.startsWith('/')) { uni.navigateTo({ url: url, success: () => console.log('[导航] 内部页面跳转成功'), fail: (err) => { uni.switchTab({ url: url, fail: (err2) => console.error('[导航] switchTab也失败', err2) }); } }); return; } if (isConfiguredDomain(url)) { uni.navigateTo({ url: `/pages/webview/webview?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}`, success: () => console.log('[导航] WebView页面打开成功', url), fail: (err) => console.error('[导航] WebView页面打开失败', err) }); } else { const proxyUrl = `https://xcx.wdlipo.com/app/api/proxy?url=${url}`; uni.navigateTo({ url: `/pages/webview/webview?url=${encodeURIComponent(proxyUrl)}&title=${encodeURIComponent(title)}`, success: () => console.log('[导航] 代理WebView页面打开成功'), fail: (err) => console.error('[导航] 代理WebView页面打开失败', err) }); } } (3)web-view跳转逻辑: onLoad(options) { if (options.url) { this.url = decodeURIComponent(options.url); } else { uni.showToast({ title: '缺少URL参数', icon: 'none', duration: 2000 }); } if (options.title) { this.title = decodeURIComponent(options.title); uni.setNavigationBarTitle({ title: this.title }); } }, <template> <view class="webview-container"> <web-view :src="url" ></web-view> </view> </template>