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

fix: forin 改为forEach

上级 7bb78cc4
......@@ -55,8 +55,7 @@
const items = [] as Item[];
const jsonArr = JSON.parse<Array<UTSJSONObject>>(content);
if(jsonArr != null){
for(const res in jsonArr){
const json = res as UTSJSONObject;
jsonArr.forEach((json) => {
const title = json["title"] as string;
const subTitle = json["subTitle"] as string;
const img = json["img"] as string;
......@@ -68,7 +67,7 @@
detail
}
items.push(item);
}
})
let temp = [] as Item[];
for(let i = 0; i < 100; i++){
temp = temp.concat(items);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册