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

!18304 preferences示例代码修改

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