hejianhao
2026-08-21 1cbbd66f6f0a4bc4208d650fa717e91722dbae65
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 和存储,避免上次登录态残留
   clearWebViewData()
   console.log('[WebView] 进入前缓存已清理,URL:', resolvedUrl)
   if (shouldClearCache) {
      clearWebViewData()
      console.log('[WebView] 进入前缓存已清理,URL:', resolvedUrl)
   }
   // #endif
   webViewUrl.value = resolvedUrl