Explorar o código

更新版本升级

wangxy hai 1 mes
pai
achega
c7bd58e142
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      utils/versionUpdate.js

+ 3 - 0
utils/versionUpdate.js

@@ -1,4 +1,5 @@
 import {ref} from "vue"
+import cacheManager from "./cacheManager";
 
 export function useVersionUpdate() {
 
@@ -62,6 +63,8 @@ export function useVersionUpdate() {
 				url: apkUrl,
 				success: (downloadResult) => {
 					uni.hideLoading();
+					// 清理原始缓存 防止新版本缓存 遭遇原始缓存问题
+					cacheManager.clearAll();
 					if (downloadResult.statusCode === 200) {
 						const tempFilePath = downloadResult.tempFilePath;