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

fix: forin 改为forEach

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