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 4d603059b50b0226157bc3fa2a3a6b93997f9da7..96c05868ff02f1d9bc7affad3a5460d923528009 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,17 +37,16 @@ methods: { getAppBaseInfo: function () { const res = uni.getAppBaseInfo(); - //类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。 - const json = JSON.stringify(res); - const result = JSON.parse>(json); - this.items = [] as Item[]; - result?.forEach((value, key) => { - const item = { - label: key, - value: "" + value - } as Item; - this.items.push(item); - }) + 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); + } + } } } } diff --git a/pages/API/get-device-info/get-device-info.uvue b/pages/API/get-device-info/get-device-info.uvue index 69f3bdbc45b96a252dc9dfbb1fafd86785094a6c..40d3e1d8eb7e4bd58f6f3c81c6c5c75fee9e50f2 100644 --- a/pages/API/get-device-info/get-device-info.uvue +++ b/pages/API/get-device-info/get-device-info.uvue @@ -56,17 +56,16 @@ export default { methods: { getDeviceInfo: function () { const res = uni.getDeviceInfo(); - //类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。 - const json = JSON.stringify(res); - const result = JSON.parse>(json); - this.items = [] as Item[]; - result?.forEach((value, key) => { - const item = { - label: key, - value: "" + value - } as Item; - this.items.push(item); - }) + 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); + } + } } } } diff --git a/pages/API/get-system-info/get-system-info.uvue b/pages/API/get-system-info/get-system-info.uvue index 7acbba04a8128614e2b278c5e914388579d32754..f766b13292355c0b50755b5e2b2c7e537c6241f5 100644 --- a/pages/API/get-system-info/get-system-info.uvue +++ b/pages/API/get-system-info/get-system-info.uvue @@ -56,18 +56,17 @@ export default { methods: { getSystemInfo: function () { uni.getSystemInfo({ - success: (res) => { - //类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。 - const json = JSON.stringify(res); - const result = JSON.parse>(json); - this.items = [] as Item[]; - result?.forEach((value, key) => { - const item = { - label: key, - value: "" + value - } as Item; - this.items.push(item); - }) + success: (res) => { + 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); + } + } }, }) } diff --git a/pages/API/get-window-info/get-window-info.uvue b/pages/API/get-window-info/get-window-info.uvue index 42ffd05ddcde75bdf4b719759f61566fcba1e05f..6e46c572839befe36e6da9f8c26608346370b8af 100644 --- a/pages/API/get-window-info/get-window-info.uvue +++ b/pages/API/get-window-info/get-window-info.uvue @@ -37,17 +37,16 @@ methods: { getWindowInfo: function () { const res = uni.getWindowInfo(); - //类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。 - const json = JSON.stringify(res); - const result = JSON.parse>(json); - this.items = [] as Item[]; - result?.forEach((value, key) => { - const item = { - label: key, - value: "" + value - } as Item; - this.items.push(item); - }) + 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); + } + } } } } diff --git a/pages/API/websocket-global/websocket-global.uvue b/pages/API/websocket-global/websocket-global.uvue index 3f751f5d2dd6b1d351c790d17e7e3271361e6ae3..72735bc82958b5c4743237ff194a78bc2cdd9a31 100644 --- a/pages/API/websocket-global/websocket-global.uvue +++ b/pages/API/websocket-global/websocket-global.uvue @@ -137,7 +137,7 @@ export default { uni.sendSocketMessage({ data: 'from ' + - platform + + this.platform + ' : ' + parseInt((Math.random() * 10000).toString()).toString(), success(res: any) { diff --git a/pages/component/long-list/detail/detail.uvue b/pages/component/long-list/detail/detail.uvue index 118d8043d64be96a9cb9e1b13a0f373065cfd3cb..ba6b92c49ce2d20fcadfd204b58bc0a86b7bed48 100644 --- a/pages/component/long-list/detail/detail.uvue +++ b/pages/component/long-list/detail/detail.uvue @@ -17,8 +17,10 @@ content: "", } }, - onLoad(event) { - this.content = event["content"] ?? ""; + onLoad(event) { + if(event != null){ + this.content = event["content"] ?? ""; + } }, methods: { } diff --git a/pages/component/long-list/long-list.uvue b/pages/component/long-list/long-list.uvue index 4aaa0a36513ac1bbcfbdf1c620f2a378389e48c3..66c07957ddb74875c1b8676198f491cac2efd535 100644 --- a/pages/component/long-list/long-list.uvue +++ b/pages/component/long-list/long-list.uvue @@ -73,7 +73,7 @@ for(let i = 0; i < 100; i++){ temp = temp.concat(items); } - listData = temp; + this.listData = temp; } setTimeout(()=>{ this.refresherTriggered = false diff --git a/pages/component/scroll-view/scroll-view-refresher-props.uvue b/pages/component/scroll-view/scroll-view-refresher-props.uvue index 90e5788531143e28eb90aad532c174a3d0d5bce6..6ba3ec83f7fa3bf5d25a71657fc590bec81f3aff 100644 --- a/pages/component/scroll-view/scroll-view-refresher-props.uvue +++ b/pages/component/scroll-view/scroll-view-refresher-props.uvue @@ -54,7 +54,6 @@ -