Chuyển đến nội dung chính

removeStorageItem

Mô tả​

Xóa giá trị một dữ liệu đang được lưu ở local storage dựa vào thuộc tính key và appId

Parameters​

Tên ParamKiểu dữ liệuBắt buộcMô tả
appIdnumberCóID của miniapp, được đăng kí qua Merchant Portal
keystringCóKey dùng để lấy giá trị dữ liệu được lưu trong storage

Return Value​

N/A

Mã Lỗi​

N/A

Code và Dữ liệu trả về mẫu​

Yêu cầu gửi đi mẫu:

window.zlpSdk.Storage
.removeStorageItem({ appId: -9999, key: 'datacodeId' })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));

Dữ liệu trả về mẫu:

{ data: {}, status: "success" }