Commit 792d1fdb authored by 李维's avatar 李维

添加时间日志打印

parent c69124d9
......@@ -173,7 +173,9 @@ export default class UnitPageClass extends cc.Component {
async initUnitListView() {
const svNode = this.unitScrollView;
svNode.opacity = 0;
const n1Date = new Date()
const resData = await this.Viewer.getComponent("PageViewer").getSyllabusTreeByPid(this.node['syllabus_pid'])
console.log("接口SyllabusTree`响应时间:", new Date() - n1Date)
let rows = []
this.configData = null
let bgImageUrl = null;
......@@ -198,7 +200,9 @@ export default class UnitPageClass extends cc.Component {
}
this.initCustomBg(bgImageUrl);
const n2Date = new Date()
await this.getAndStoreSyllabusStatus(rows);
console.log("接口SyllabusStatus响应时间:", new Date() - n2Date)
// const svNode = this.unitScrollView;
const view = cc.find("view", svNode);
view.width = svNode.width;
......@@ -236,6 +240,7 @@ export default class UnitPageClass extends cc.Component {
let listLabel = cc.find("label", listItem);
const itemArr = [];
const nowDate = new Date()
for (let i = 0; i < dataArr.length; i++) {
const data = dataArr[i];
const itemNode = cc.instantiate(listItem);
......@@ -326,6 +331,8 @@ export default class UnitPageClass extends cc.Component {
// }
itemArr.push(itemNode);
}
const time = new Date() - nowDate
console.log("创建节点时间: ", time)
return itemArr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment