Bladeren bron

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

Xiao_123 5 maanden geleden
bovenliggende
commit
6740364e05
3 gewijzigde bestanden met toevoegingen van 14 en 9 verwijderingen
  1. 9 4
      src/App.vue
  2. 2 2
      src/version.js
  3. 3 3
      src/views/recruit/personal/home/index.vue

+ 9 - 4
src/App.vue

@@ -26,6 +26,11 @@ onUnmounted(() => {
   if (timer.value) clearInterval(timer.value)
 })
 
+
+// window.location.reload()                      // 方法会根据缓存的有效期和修改时间,决定是否重新从服务器下载内容。如果缓存的内容没有过期或没有修改,就会直接使用缓存,这样可以节省流量和时间
+// window.location.reload(true)                  // true参数会忽略缓存的内容,强制重新从服务器下载所有内容.包括 JavaScript 文件,图像,文本文件等。这样可以保证显示网页的最新内容,但是会消耗更多的流量和时间。
+// window.location.replace(window.location.href) // 方法会把浏览器中的临时文件夹的文件删除再重新从服务器下载。这样可以清除一些可能造成问题的缓存文件,但是也会消耗更多的流量和时间。
+
 let ConfirmDone = false
 // 检查版本号
 const checkVersion = () => {
@@ -46,15 +51,15 @@ const checkVersion = () => {
     if (ConfirmDone) {
       return
     }
-    if (res_v === get_v) { // 刷新过的不再刷新,避免刷新不成功但一直刷新
+    if (res_v === get_v && res_v !== vue_version) { // reload(true)刷新不成功,清除缓存刷新
+      localStorage.clear()
+      window.location.replace(window.location.href)
       return
     }
     ConfirmDone = true  // 后续不弹Confirm
     Confirm('系统提示', '发现新版本,将立即刷新页面', { hideCancelBtn: true }).then(() => {
       localStorage.setItem('RES_VERSION', res_v)
-      // window.location.reload() // 方法会根据缓存的有效期和修改时间,决定是否重新从服务器下载内容。如果缓存的内容没有过期或没有修改,就会直接使用缓存,这样可以节省流量和时间
-      window.location.reload(true) // true参数会忽略缓存的内容,强制重新从服务器下载所有内容.包括 JavaScript 文件,图像,文本文件等。这样可以保证显示网页的最新内容,但是会消耗更多的流量和时间。
-      // window.location.replace(window.location.href) // 方法会把浏览器中的临时文件夹的文件删除再重新从服务器下载。这样可以清除一些可能造成问题的缓存文件,但是也会消耗更多的流量和时间。
+      window.location.reload(true)
     })
   }).catch(err => {
     console.log('checkVersion-err', err)

+ 2 - 2
src/version.js

@@ -1,2 +1,2 @@
-// 版本号
-export const vue_version = 'v24.11.22.1818'
+// 版本号 1611
+export const vue_version = 'v24.11.27.1722'

+ 3 - 3
src/views/recruit/personal/home/index.vue

@@ -17,7 +17,7 @@
         </div>
         <div v-else class="advertise-box cursor-pointer" @mouseenter="showFullAdvertise = true"></div>
       </div>
-      <div class="advertise mt-3" :style="{'width': showFullAdvertise1 ? '180px' : '20px'}">
+      <div class="advertise" :style="{'width': showFullAdvertise1 ? '180px' : '20px'}">
         <div v-if="showFullAdvertise1">
           <div class="advertise-title d-inline-block">
             <span>广告</span>
@@ -141,7 +141,7 @@ const adClick = () => {
   // position: sticky;
   // top: 128px;
   // z-index: 999;
-  height: 360px;
+  height: 372px;
   &-box {
     position: relative;
     width: 15px;
@@ -175,7 +175,7 @@ const adClick = () => {
   }
 }
 .content-box {
-  margin-top: -720px;
+  margin-top: -372px - 372px;
 }
 .banner {
   width: 100%;