diff --git a/pages/API/get-app-base-info/get-app-base-info.uvue b/pages/API/get-app-base-info/get-app-base-info.uvue index 96c05868ff02f1d9bc7affad3a5460d923528009..43b159394ebd30e0c4f550368921cf7a8f427f95 100644 --- a/pages/API/get-app-base-info/get-app-base-info.uvue +++ b/pages/API/get-app-base-info/get-app-base-info.uvue @@ -37,6 +37,7 @@ methods: { getAppBaseInfo: function () { const res = uni.getAppBaseInfo(); + this.items = [] as Item[]; for(const key in res){ const value = res[key]; if(value != null){ diff --git a/pages/API/get-device-info/get-device-info.uvue b/pages/API/get-device-info/get-device-info.uvue index 40d3e1d8eb7e4bd58f6f3c81c6c5c75fee9e50f2..788ec9b2c11f39c8aa07126ac348acdf586c5488 100644 --- a/pages/API/get-device-info/get-device-info.uvue +++ b/pages/API/get-device-info/get-device-info.uvue @@ -55,7 +55,8 @@ export default { }, methods: { getDeviceInfo: function () { - const res = uni.getDeviceInfo(); + const res = uni.getDeviceInfo(); + this.items = [] as Item[]; for(const key in res){ const value = res[key]; if(value != null){ diff --git a/pages/API/get-system-info/get-system-info.uvue b/pages/API/get-system-info/get-system-info.uvue index 5606658305f88b690cc2a3ccd59c8419563392c9..a97ac104f50d62cef94c2e488daa97bea651976c 100644 --- a/pages/API/get-system-info/get-system-info.uvue +++ b/pages/API/get-system-info/get-system-info.uvue @@ -28,8 +28,11 @@ - + @@ -54,9 +57,10 @@ export default { onUnload: function () { }, methods: { - getSystemInfo: function () { + getSystemInfo: function () { uni.getSystemInfo({ success: (res) => { + this.items = [] as Item[]; for(const key in res){ const value = res[key]; if(value != null){ @@ -70,6 +74,20 @@ export default { }, }) }, + getSystemInfoSync: function () { + this.items = [] as Item[]; + const res = uni.getSystemInfoSync() + for(const key in res){ + const value = res[key]; + if(value != null){ + const item = { + label: key, + value: "" + ((typeof value == "object")? JSON.stringify(value) : value) + } as Item; + this.items.push(item); + } + } + }, //自动化测试例专用 jest_getSystemInfo():GetSystemInfoResult{ return uni.getSystemInfoSync(); diff --git a/pages/API/get-window-info/get-window-info.uvue b/pages/API/get-window-info/get-window-info.uvue index 54cc9b23ce4ff9ef82a2c0698039be8fabb3d7e7..2931fdb31078a874fe4c609b63500e9a96c7bc9f 100644 --- a/pages/API/get-window-info/get-window-info.uvue +++ b/pages/API/get-window-info/get-window-info.uvue @@ -37,6 +37,7 @@ methods: { getWindowInfo: function () { const res = uni.getWindowInfo(); + this.items = [] as Item[]; for(const key in res){ const value = res[key]; if(value != null){