Ver Fonte

提交刷新按钮

cl há 1 ano atrás
pai
commit
8e1e978b7a
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      src/views/header/Weather.vue

+ 3 - 2
src/views/header/Weather.vue

@@ -196,8 +196,9 @@ export default defineComponent({
 
       // 清除缓存
       const timestamp = new Date().getTime();
-      const url = window.location.href.replace(/(\?|&)t=\d+/, '');
-      window.location.href = `${url}${url.includes('?') ? '&' : '?'}t=${timestamp}`;
+      window.location.reload();
+      // const url = window.location.href.replace(/(\?|&)t=\d+/, '');
+      // window.location.href = `${url}${url.includes('?') ? '&' : '?'}t=${timestamp}`;
 
       // 刷新页面
       window.location.reload();