hejianhao
2026-08-21 1cbbd66f6f0a4bc4208d650fa717e91722dbae65
feat0806: 只在进入微赞直播间和退出时清理微赞缓存
2个文件已修改
6 ■■■■■ 已修改文件
traditionalApp/pages/home/home.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
traditionalApp/pages/webview/webview.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
traditionalApp/pages/home/home.vue
@@ -370,7 +370,7 @@
                return;
            }
            const webviewUrl = `/pages/webview/webview?url=${encodeURIComponent(targetUrl)}&title=${encodeURIComponent('微赞直播')}`;
            const webviewUrl = `/pages/webview/webview?url=${encodeURIComponent(targetUrl)}&title=${encodeURIComponent('微赞直播')}&clearCache=1`;
            console.log('[goWeiZanLive] 准备跳转 WebView:', webviewUrl);
            uni.navigateTo({
traditionalApp/pages/webview/webview.vue
@@ -21,11 +21,15 @@
onLoad((options) => {
    const resolvedUrl = decodeQueryValue(options?.url)
    const resolvedTitle = decodeQueryValue(options?.title)
    // 仅在入口显式要求时清理(如进入微赞直播间);直播订单、直播统计等无需清理
    const shouldClearCache = String(options?.clearCache || '') === '1'
    // #ifdef APP-PLUS
    // 加载 URL 前先清理所有 webview 的缓存、Cookie 和存储,避免上次登录态残留
    if (shouldClearCache) {
    clearWebViewData()
    console.log('[WebView] 进入前缓存已清理,URL:', resolvedUrl)
    }
    // #endif
    webViewUrl.value = resolvedUrl