Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
8bad1ccb
Commit
8bad1ccb
authored
Sep 26, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 基础服务
parent
8fed7b7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
29 deletions
+25
-29
middleLayerBase.ts
assets/middleLayer_for_kyxq/script/middleLayerBase.ts
+25
-29
No files found.
assets/middleLayer_for_kyxq/script/middleLayerBase.ts
View file @
8bad1ccb
...
...
@@ -133,35 +133,31 @@ export abstract class middleLayerBase extends cc.Component {
resolve
(
this
.
ENGINE_INFO
);
return
;
}
if
((
<
any
>
window
).
air
.
engineInfo
)
{
const
engineInfo
=
JSON
.
parse
((
<
any
>
window
).
air
.
engineInfo
);
if
(
engineInfo
.
isDev
==
1
)
{
engineInfo
.
domain
=
"
http://staging-teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://staging-openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
521
;
}
else
{
engineInfo
.
domain
=
"
http://teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
519
;
}
this
.
ENGINE_INFO
=
engineInfo
;
resolve
(
engineInfo
);
return
;
}
(
<
any
>
window
).
courseware
.
getEngineInfo
(()
=>
{
const
engineInfo
=
JSON
.
parse
((
<
any
>
window
).
air
.
engineInfo
);
if
(
engineInfo
.
isDev
==
1
)
{
engineInfo
.
domain
=
"
http://staging-teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://staging-openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
521
;
}
else
{
engineInfo
.
domain
=
"
http://teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
519
;
}
this
.
ENGINE_INFO
=
engineInfo
;
resolve
(
engineInfo
);
});
const
loopEngineInfo
=
()
=>
{
this
.
scheduleOnce
(()
=>
{
if
(
!
(
<
any
>
window
).
air
.
engineInfo
)
{
loopEngineInfo
();
return
;
}
if
(
this
.
ENGINE_INFO
)
{
resolve
(
this
.
ENGINE_INFO
);
return
;
}
const
engineInfo
=
JSON
.
parse
((
<
any
>
window
).
air
.
engineInfo
);
if
(
engineInfo
.
isDev
==
1
)
{
engineInfo
.
domain
=
"
http://staging-teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://staging-openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
521
;
}
else
{
engineInfo
.
domain
=
"
http://teach.cdn.ireadabc.com/
"
;
engineInfo
.
apiBase
=
'
http://openapi.iteachabc.com
'
;
engineInfo
.
orgId
=
519
;
}
this
.
ENGINE_INFO
=
engineInfo
;
resolve
(
engineInfo
);
},
0.05
);
};
loopEngineInfo
();
});
}
asyncCallNetworkApiGet
(
uri
,
data
):
Promise
<
any
>
{
...
...
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