Commit 94e14cc5 authored by limingzhe's avatar limingzhe

fix: debug

parent 5047d496
......@@ -385,6 +385,8 @@ cc.Class({
];
this.canTouch = true;
this.routeArr = [];
this.pageIDHistroy = []; // 用于存储各级ID 用于前进、后退、上次学习
......@@ -631,6 +633,10 @@ cc.Class({
backBtn.y = this.canvas.height / 2 - this.canvas.width / 16;
backBtn.addComponent(cc.Button);
backBtn.on("click", () => {
if (!this.canTouch) {
return;
}
this.enterLastMenu();
})
},
......@@ -1902,6 +1908,9 @@ cc.Class({
// 返回上一级页面
enterLastMenu() {
const pageData = this.popRouteHistory();
this.loadViewByID(pageData.id, pageData.pid)
......@@ -1933,6 +1942,9 @@ cc.Class({
return
}
this.canTouch = false;
// 找到当前页面父节点信息 获取标题信息
const pData = await this.getDataByPid(pid);
let pName = "";
......@@ -1955,10 +1967,19 @@ cc.Class({
// 菜单加载菜单页面
this.showMenuView(resData.rows, pName);
}
this.canTouch = true;
},
// 跳转下一级菜单
enterNextMenu(data=null) {
if (!this.canTouch) {
return;
}
this.canTouch = false;
console.log("data.id: ", data.id);
this.getDataByPid(data.id, (resData) => {
if (!resData) {
......@@ -1981,6 +2002,10 @@ cc.Class({
} else {
this.showMenuView(resData.rows, data.text_en);
}
this.canTouch = true;
})
// this.showMenuView(data);
// this.levelView.active = true;
......
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