shishuangxi

降级map api等级

... ... @@ -6,7 +6,7 @@ import { BusinessError } from '@ohos.base';
import router from '@ohos.router';
import { WDRouterPage, WDRouterRule } from 'wdRouter';
import { Params } from 'wdBean';
import { common } from '@kit.AbilityKit';
// import { common } from '@kit.AbilityKit';
import fs from '@ohos.file.fs';
import { CustomCacheDialog } from './CustomCacheDialog';
import MineSettingDatasModel from '../../model/MineSettingDatasModel';
... ... @@ -279,18 +279,18 @@ export struct MineSettingComponent {
//删除缓存
deleteCache() {
let context = getContext(this) as common.UIAbilityContext
let application = context.getApplicationContext();
let appPath = application.cacheDir
Logger.debug("MineSettingComponent", appPath)
fs.rmdir(appPath).then(() => {
this.getCacheSize()
})
let path = context.cacheDir
Logger.debug("MineSettingComponent", path)
fs.rmdir(path).then(() => {
this.getCacheSize()
})
// let context = getContext(this) as common.UIAbilityContext
// let application = context.getApplicationContext();
// let appPath = application.cacheDir
// Logger.debug("MineSettingComponent", appPath)
// fs.rmdir(appPath).then(() => {
// this.getCacheSize()
// })
// let path = context.cacheDir
// Logger.debug("MineSettingComponent", path)
// fs.rmdir(path).then(() => {
// this.getCacheSize()
// })
}
getCacheSize() {
... ...