浏览代码

还原代码

lex-xin 4 月之前
父节点
当前提交
9ef9d40c6e
共有 2 个文件被更改,包括 2 次插入18 次删除
  1. 1 1
      src/router/index.ts
  2. 1 17
      vite.config.ts

+ 1 - 1
src/router/index.ts

@@ -89,7 +89,7 @@ export function parseQuery(query: string): LocationQuery {
 }
 
 const router: Router = createRouter({
-  history: createWebHashHistory('/classroom/'),
+  history: createWebHashHistory('/classroom'),
   routes: [...constantRoutes],
   stringifyQuery,
   parseQuery,

+ 1 - 17
vite.config.ts

@@ -68,23 +68,7 @@ export default defineConfig(() => {
         includeAssets: ['./logo.png'],
         workbox: {
           skipWaiting: false, // 强制跳过等待
-          clientsClaim: false, // 让新的 Service Worker 立即控制所有页面
-          runtimeCaching: [
-            {
-              urlPattern: /^https:\/\/dev\.kt\.colexiu\.com\/classroom\/.+/,
-              handler: 'NetworkOnly', // **所有 /classroom/* 走网络**
-              options: {
-                cacheName: 'bypass-classroom'
-              }
-            },
-            {
-              urlPattern: /^https:\/\/kt\.colexiu\.com\/classroom\/.+/,
-              handler: 'NetworkOnly', // **所有 /classroom/* 走网络**
-              options: {
-                cacheName: 'bypass-classroom'
-              }
-            }
-          ]
+          clientsClaim: false // 让新的 Service Worker 立即控制所有页面
         },
         manifest: {
           name: '酷乐秀-音乐数字课堂',