未验证 提交 c4647178 编写于 作者: O openharmony_ci 提交者: Gitee

!18572 3.2Release:示例代码挑单

Merge pull request !18572 from 葛亚芳/cherry-pick-1684847939
...@@ -197,7 +197,7 @@ import featureAbility from '@ohos.ability.featureAbility'; ...@@ -197,7 +197,7 @@ import featureAbility from '@ohos.ability.featureAbility';
let context = featureAbility.getContext(); let context = featureAbility.getContext();
try { try {
data_preferences.deletePreferences(context, 'mystore', function (err, val) { data_preferences.deletePreferences(context, 'mystore', function (err) {
if (err) { if (err) {
console.info("Failed to delete preferences. code =" + err.code + ", message =" + err.message); console.info("Failed to delete preferences. code =" + err.code + ", message =" + err.message);
return; return;
...@@ -216,7 +216,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; ...@@ -216,7 +216,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
data_preferences.deletePreferences(this.context, 'mystore', function (err, val) { data_preferences.deletePreferences(this.context, 'mystore', function (err) {
if (err) { if (err) {
console.info("Failed to delete preferences. code =" + err.code + ", message =" + err.message); console.info("Failed to delete preferences. code =" + err.code + ", message =" + err.message);
return; return;
...@@ -332,7 +332,7 @@ import featureAbility from '@ohos.ability.featureAbility'; ...@@ -332,7 +332,7 @@ import featureAbility from '@ohos.ability.featureAbility';
let context = featureAbility.getContext(); let context = featureAbility.getContext();
try { try {
data_preferences.removePreferencesFromCache(context, 'mystore', function (err, val) { data_preferences.removePreferencesFromCache(context, 'mystore', function (err) {
if (err) { if (err) {
console.info("Failed to remove preferences. code =" + err.code + ", message =" + err.message); console.info("Failed to remove preferences. code =" + err.code + ", message =" + err.message);
return; return;
...@@ -351,7 +351,7 @@ import UIAbility from '@ohos.app.ability.UIAbility'; ...@@ -351,7 +351,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
class EntryAbility extends UIAbility { class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
try { try {
data_preferences.removePreferencesFromCache(this.context, 'mystore', function (err, val) { data_preferences.removePreferencesFromCache(this.context, 'mystore', function (err) {
if (err) { if (err) {
console.info("Failed to remove preferences. code =" + err.code + ", message =" + err.message); console.info("Failed to remove preferences. code =" + err.code + ", message =" + err.message);
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册