mo 1 year ago
parent
commit
fe7691e17b
3 changed files with 10 additions and 9 deletions
  1. 8 1
      index.html
  2. 1 8
      src/router/router-guards.ts
  3. 1 0
      src/views/login/index.tsx

+ 8 - 1
index.html

@@ -172,7 +172,14 @@
       }
     }
     (function (window) {
-
+      if ('serviceWorker' in navigator) {
+        console.log(caches.keys(), 'caches.keys()');
+        caches.keys().then(function (cacheNames) {
+          cacheNames.forEach(function (cacheName) {
+            caches.delete(cacheName);
+          });
+        });
+      }
       if (!isChrome()) {
         // document.writeln("<div class='imgWrap'><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699993534.png' class='bgImg' alt=''><img src='https://gyt.ks3-cn-beijing.ksyuncs.com/basic/1688699779209.png' class='btnImg' alt=''></div>");
 

+ 1 - 8
src/router/router-guards.ts

@@ -29,14 +29,7 @@ export function createRouterGuards(router: Router) {
     // console.log(to, '修改标题');
     // console.log('access token');
     document.title = to.meta.title ? to.meta.title : ('音乐数字课堂' as string);
-    if ('serviceWorker' in navigator) {
-      console.log(caches.keys(), 'caches.keys()');
-      caches.keys().then(function (cacheNames) {
-        cacheNames.forEach(function (cacheName) {
-          caches.delete(cacheName);
-        });
-      });
-    }
+
     if (!isChrome()) {
       return;
     }

+ 1 - 0
src/views/login/index.tsx

@@ -137,6 +137,7 @@ export default defineComponent({
         </div>
         <div class={styles['view-account-form']}>
           <img class={styles.colLogo} src={colLogo}></img>
+          22:35
           {isForgot.value ? (
             <NTabs
               key="forgotPassword"