Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MonkyTree
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
NJ_MonkyTree
Commits
127c6c3d
Commit
127c6c3d
authored
Jun 13, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 替换掉了接口函数
parent
0fe595c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
24 deletions
+5
-24
oxford_front.ts
assets/oxford_front/scene/oxford_front.ts
+5
-24
No files found.
assets/oxford_front/scene/oxford_front.ts
View file @
127c6c3d
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
Attributes
from
"
../script/Attributes
"
;
import
Attributes
from
"
../script/Attributes
"
;
import
{
callNetworkApiGet
}
from
"
../script/util
"
;
// @ts-ignore
// @ts-ignore
import
{
assign
,
createMachine
,
interpret
,
actions
,
forwardTo
,
matchesState
}
from
"
../script/xstate
"
;
import
{
assign
,
createMachine
,
interpret
,
actions
,
forwardTo
,
matchesState
}
from
"
../script/xstate
"
;
const
{
pure
,
send
,
raise
,
sendParent
}
=
actions
;
const
{
pure
,
send
,
raise
,
sendParent
}
=
actions
;
...
@@ -57,7 +58,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -57,7 +58,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
debug
.
setDisplayStats
(
false
);
cc
.
debug
.
setDisplayStats
(
false
);
}
}
initialized
()
{
initialized
()
{
if
(
this
.
BASE_URL
&&
this
.
gameMachineService
)
{
if
(
this
.
gameMachineService
)
{
this
.
gameMachineService
.
start
();
this
.
gameMachineService
.
start
();
this
.
restore
();
this
.
restore
();
}
}
...
@@ -161,27 +162,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -161,27 +162,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
}
}
globalThis
.
aaa
=
this
;
this
.
initialized
();
const
that
=
this
;
// @ts-ignores
window
.
air
=
window
.
air
||
{};
// @ts-ignores
window
.
air
.
getEngineInfoCallback
=
function
({
isDev
}
)
{
console
.
log
(
'
isDev
'
+
(
+
isDev
));
if
(
+
isDev
)
{
// that.ROOT_PID = 21203;
that
.
BASE_URL
=
'
https://staging-teach.ireadabc.com
'
;
}
else
{
// that.ROOT_PID = 21203;
that
.
BASE_URL
=
'
https://openapi.iteachabc.com
'
;
}
that
.
initialized
();
}
// @ts-ignores
if
(
!
cc
.
sys
.
isNative
)
{
// @ts-ignores
window
.
air
.
getEngineInfoCallback
({
isDev
:
1
})
}
}
}
initUnitViewPager
()
{
initUnitViewPager
()
{
const
pages
=
this
.
UnitViewPager
.
getPages
();
const
pages
=
this
.
UnitViewPager
.
getPages
();
...
@@ -281,7 +262,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -281,7 +262,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
playBgMusic
(
this
.
bgMusic1
);
this
.
playBgMusic
(
this
.
bgMusic1
);
// event.type !== 'BACK'
// event.type !== 'BACK'
this
.
callNetworkApiGet
(
this
.
BASE_URL
+
'
/api/oxford/syllabus/v1/root/index/
'
+
1
+
'
?orgid=507
'
,
(
resp
:
any
)
=>
{
callNetworkApiGet
(
'
/api/oxford/syllabus/v1/root/index/1
'
,
{
orgid
:
507
}
,
(
resp
:
any
)
=>
{
resp
=
JSON
.
parse
(
resp
);
resp
=
JSON
.
parse
(
resp
);
if
(
resp
.
msg
==
'
success
'
)
{
if
(
resp
.
msg
==
'
success
'
)
{
let
{
rows
}
=
resp
let
{
rows
}
=
resp
...
@@ -327,7 +308,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -327,7 +308,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
width=4></outline>`
;
width=4></outline>`
;
});
});
this
.
callNetworkApiGet
(
this
.
BASE_URL
+
'
/api/syllabus/v1/tree?orgid=507&pid=
'
+
event
.
id
,
(
resp
:
any
)
=>
{
callNetworkApiGet
(
'
/api/syllabus/v1/tree
'
,
{
pid
:
event
.
id
}
,
(
resp
:
any
)
=>
{
resp
=
JSON
.
parse
(
resp
);
resp
=
JSON
.
parse
(
resp
);
if
(
resp
.
msg
==
'
success
'
)
{
if
(
resp
.
msg
==
'
success
'
)
{
let
{
rows
}
=
resp
;
let
{
rows
}
=
resp
;
...
...
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