提交 724ad84b 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

fix: 信息多次叠加的问题

上级 09731260
......@@ -39,6 +39,7 @@
const res = uni.getAppBaseInfo();
const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[];
result.forEach((value, key) => {
const item = {
label: key,
......
......@@ -41,6 +41,7 @@
const res = uni.getDeviceInfo();
const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[];
result.forEach((value, key) => {
const item = {
label: key,
......
......@@ -39,7 +39,8 @@
uni.getSystemInfo({
success: (res) => {
const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json);
const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[];
result.forEach((value, key) => {
const item = {
label: key,
......
......@@ -39,13 +39,14 @@
const res = uni.getWindowInfo();
const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[];
result.forEach((value, key) => {
const item = {
label: key,
value: "" + value
} as Item;
this.items.push(item);
})
})
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册