Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dg_dictation_menu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
dg_dictation_menu
Commits
94e14cc5
Commit
94e14cc5
authored
May 23, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
5047d496
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
dg_dictation_menu.js
assets/dg_dictation_menu/scene/dg_dictation_menu.js
+25
-0
No files found.
assets/dg_dictation_menu/scene/dg_dictation_menu.js
View file @
94e14cc5
...
@@ -385,6 +385,8 @@ cc.Class({
...
@@ -385,6 +385,8 @@ cc.Class({
];
];
this
.
canTouch
=
true
;
this
.
routeArr
=
[];
this
.
routeArr
=
[];
this
.
pageIDHistroy
=
[];
// 用于存储各级ID 用于前进、后退、上次学习
this
.
pageIDHistroy
=
[];
// 用于存储各级ID 用于前进、后退、上次学习
...
@@ -631,6 +633,10 @@ cc.Class({
...
@@ -631,6 +633,10 @@ cc.Class({
backBtn
.
y
=
this
.
canvas
.
height
/
2
-
this
.
canvas
.
width
/
16
;
backBtn
.
y
=
this
.
canvas
.
height
/
2
-
this
.
canvas
.
width
/
16
;
backBtn
.
addComponent
(
cc
.
Button
);
backBtn
.
addComponent
(
cc
.
Button
);
backBtn
.
on
(
"
click
"
,
()
=>
{
backBtn
.
on
(
"
click
"
,
()
=>
{
if
(
!
this
.
canTouch
)
{
return
;
}
this
.
enterLastMenu
();
this
.
enterLastMenu
();
})
})
},
},
...
@@ -1902,6 +1908,9 @@ cc.Class({
...
@@ -1902,6 +1908,9 @@ cc.Class({
// 返回上一级页面
// 返回上一级页面
enterLastMenu
()
{
enterLastMenu
()
{
const
pageData
=
this
.
popRouteHistory
();
const
pageData
=
this
.
popRouteHistory
();
this
.
loadViewByID
(
pageData
.
id
,
pageData
.
pid
)
this
.
loadViewByID
(
pageData
.
id
,
pageData
.
pid
)
...
@@ -1933,6 +1942,9 @@ cc.Class({
...
@@ -1933,6 +1942,9 @@ cc.Class({
return
return
}
}
this
.
canTouch
=
false
;
// 找到当前页面父节点信息 获取标题信息
// 找到当前页面父节点信息 获取标题信息
const
pData
=
await
this
.
getDataByPid
(
pid
);
const
pData
=
await
this
.
getDataByPid
(
pid
);
let
pName
=
""
;
let
pName
=
""
;
...
@@ -1955,10 +1967,19 @@ cc.Class({
...
@@ -1955,10 +1967,19 @@ cc.Class({
// 菜单加载菜单页面
// 菜单加载菜单页面
this
.
showMenuView
(
resData
.
rows
,
pName
);
this
.
showMenuView
(
resData
.
rows
,
pName
);
}
}
this
.
canTouch
=
true
;
},
},
// 跳转下一级菜单
// 跳转下一级菜单
enterNextMenu
(
data
=
null
)
{
enterNextMenu
(
data
=
null
)
{
if
(
!
this
.
canTouch
)
{
return
;
}
this
.
canTouch
=
false
;
console
.
log
(
"
data.id:
"
,
data
.
id
);
console
.
log
(
"
data.id:
"
,
data
.
id
);
this
.
getDataByPid
(
data
.
id
,
(
resData
)
=>
{
this
.
getDataByPid
(
data
.
id
,
(
resData
)
=>
{
if
(
!
resData
)
{
if
(
!
resData
)
{
...
@@ -1981,6 +2002,10 @@ cc.Class({
...
@@ -1981,6 +2002,10 @@ cc.Class({
}
else
{
}
else
{
this
.
showMenuView
(
resData
.
rows
,
data
.
text_en
);
this
.
showMenuView
(
resData
.
rows
,
data
.
text_en
);
}
}
this
.
canTouch
=
true
;
})
})
// this.showMenuView(data);
// this.showMenuView(data);
// this.levelView.active = true;
// this.levelView.active = true;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment