cl 1 год назад
Родитель
Сommit
8e1e978b7a
1 измененных файлов с 3 добавлено и 2 удалено
  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();