Showing
1 changed file
with
13 additions
and
13 deletions
| @@ -6,7 +6,7 @@ import { BusinessError } from '@ohos.base'; | @@ -6,7 +6,7 @@ import { BusinessError } from '@ohos.base'; | ||
| 6 | import router from '@ohos.router'; | 6 | import router from '@ohos.router'; |
| 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; | 7 | import { WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 8 | import { Params } from 'wdBean'; | 8 | import { Params } from 'wdBean'; |
| 9 | -import { common } from '@kit.AbilityKit'; | 9 | +// import { common } from '@kit.AbilityKit'; |
| 10 | import fs from '@ohos.file.fs'; | 10 | import fs from '@ohos.file.fs'; |
| 11 | import { CustomCacheDialog } from './CustomCacheDialog'; | 11 | import { CustomCacheDialog } from './CustomCacheDialog'; |
| 12 | import MineSettingDatasModel from '../../model/MineSettingDatasModel'; | 12 | import MineSettingDatasModel from '../../model/MineSettingDatasModel'; |
| @@ -279,18 +279,18 @@ export struct MineSettingComponent { | @@ -279,18 +279,18 @@ export struct MineSettingComponent { | ||
| 279 | 279 | ||
| 280 | //删除缓存 | 280 | //删除缓存 |
| 281 | deleteCache() { | 281 | deleteCache() { |
| 282 | - let context = getContext(this) as common.UIAbilityContext | ||
| 283 | - let application = context.getApplicationContext(); | ||
| 284 | - let appPath = application.cacheDir | ||
| 285 | - Logger.debug("MineSettingComponent", appPath) | ||
| 286 | - fs.rmdir(appPath).then(() => { | ||
| 287 | - this.getCacheSize() | ||
| 288 | - }) | ||
| 289 | - let path = context.cacheDir | ||
| 290 | - Logger.debug("MineSettingComponent", path) | ||
| 291 | - fs.rmdir(path).then(() => { | ||
| 292 | - this.getCacheSize() | ||
| 293 | - }) | 282 | + // let context = getContext(this) as common.UIAbilityContext |
| 283 | + // let application = context.getApplicationContext(); | ||
| 284 | + // let appPath = application.cacheDir | ||
| 285 | + // Logger.debug("MineSettingComponent", appPath) | ||
| 286 | + // fs.rmdir(appPath).then(() => { | ||
| 287 | + // this.getCacheSize() | ||
| 288 | + // }) | ||
| 289 | + // let path = context.cacheDir | ||
| 290 | + // Logger.debug("MineSettingComponent", path) | ||
| 291 | + // fs.rmdir(path).then(() => { | ||
| 292 | + // this.getCacheSize() | ||
| 293 | + // }) | ||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | getCacheSize() { | 296 | getCacheSize() { |
-
Please register or login to post a comment