diff --git a/pages/API/storage/storage.uvue b/pages/API/storage/storage.uvue index 65d7a5d45026072593de57d4d79925a67b0b0131..862ec4f98ad1937b642827e57f484c243ab71578 100644 --- a/pages/API/storage/storage.uvue +++ b/pages/API/storage/storage.uvue @@ -197,10 +197,18 @@ export default { uni.getStorage({ key: key, success: (res) => { - that.apiGetData = res.data + that.apiGetData = res.data + + let desc:string = typeof this.apiGetData + if("object" == desc){ + desc = desc + ": " + JSON.stringify(this.apiGetData) + }else{ + desc = desc + ": " + this.apiGetData + } + uni.showModal({ title: '读取数据成功', - content: "data: '" + JSON.stringify(that.apiGetData) + "'", + content: desc, showCancel: false, }) }, @@ -223,10 +231,18 @@ export default { showCancel: false, }) } else { - this.apiGetData = uni.getStorageSync(key) + this.apiGetData = uni.getStorageSync(key) + + let desc:string = typeof this.apiGetData + if("object" == desc){ + desc = desc + ": " + JSON.stringify(this.apiGetData) + }else{ + desc = desc + ": " + this.apiGetData + } + uni.showModal({ title: '读取数据成功', - content: "data: '" + JSON.stringify(apiGetData) + "'", + content: desc, showCancel: false, }) }