From 3309edd98b31dd3d8edf7db7daf69dccb4f2c5a3 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Tue, 4 Jul 2023 17:33:35 +0800 Subject: [PATCH] =?UTF-8?q?storage=20clear=20=E5=A2=9E=E5=8A=A0=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/storage/storage.uvue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pages/API/storage/storage.uvue b/pages/API/storage/storage.uvue index 7b52e17a..161a9909 100644 --- a/pages/API/storage/storage.uvue +++ b/pages/API/storage/storage.uvue @@ -239,12 +239,21 @@ clearStorage: function () { this.key = '' this.data = '' - uni.clearStorage() - uni.showModal({ - title: '清除数据成功', - content: ' ', - showCancel: false + uni.clearStorage({ + success:function(res){ + uni.showModal({ + title: '清除数据成功', + showCancel: false + }) + }, + fail:function(res){ + uni.showModal({ + title: '清除数据失败', + showCancel: false + }) + }, }) + }, clearStorageSync: function () { this.key = '' -- GitLab