Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_njstar
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_njstar
Commits
2dc85e94
Commit
2dc85e94
authored
1 year ago
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
8f84c5cd
master
v23
v22
v21
v19
v18
v17
v16
v15
v14
v13
v12
v11
v10
v9
v8
v7
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
952 additions
and
980 deletions
+952
-980
middleLayer_for_njstar.fire
.../middleLayer_for_njstar/scene/middleLayer_for_njstar.fire
+943
-930
middleLayer.ts
assets/middleLayer_for_njstar/script/middleLayer.ts
+8
-49
supportToos.js
assets/middleLayer_for_njstar/script/supportToos.js
+1
-1
No files found.
assets/middleLayer_for_njstar/scene/middleLayer_for_njstar.fire
View file @
2dc85e94
This source diff could not be displayed because it is too large. You can
view the blob
instead.
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_njstar/script/middleLayer.ts
View file @
2dc85e94
...
@@ -70,11 +70,11 @@ export default class NewClass extends middleLayerBase {
...
@@ -70,11 +70,11 @@ export default class NewClass extends middleLayerBase {
if
(
video
)
{
if
(
video
)
{
cc
.
find
(
"
Canvas/Main Camera
"
).
getComponent
(
cc
.
Camera
).
backgroundColor
=
cc
.
color
(
0
,
0
,
0
,
0
);
cc
.
find
(
"
Canvas/Main Camera
"
).
getComponent
(
cc
.
Camera
).
backgroundColor
=
cc
.
color
(
0
,
0
,
0
,
0
);
video
.
stayOnBottom
=
true
;
video
.
stayOnBottom
=
true
;
setTimeout
(()
=>
{
//
setTimeout(() => {
cc
.
macro
.
ENABLE_TRANSPARENT_CANVAS
=
true
;
//
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
},
1000
);
//
}, 1000);
}
else
{
}
else
{
cc
.
macro
.
ENABLE_TRANSPARENT_CANVAS
=
false
;
//
cc.macro.ENABLE_TRANSPARENT_CANVAS = false;
}
}
}
}
...
@@ -866,8 +866,10 @@ export default class NewClass extends middleLayerBase {
...
@@ -866,8 +866,10 @@ export default class NewClass extends middleLayerBase {
activeLevels
=
null
;
activeLevels
=
null
;
isLogin
=
false
;
isLogin
=
false
;
async
start
()
{
async
start
()
{
this
.
node
.
zIndex
=
9999
;
// this.node.zIndex = 9999;
this
.
loadOnlineBundle
(
'
op_02
'
);
cc
.
game
.
addPersistRootNode
(
this
.
node
);
cc
.
game
.
addPersistRootNode
(
this
.
node
);
return
;
// await this.checkVersion();
// await this.checkVersion();
if
(
this
.
isDev
==
1
)
{
if
(
this
.
isDev
==
1
)
{
...
@@ -881,48 +883,6 @@ export default class NewClass extends middleLayerBase {
...
@@ -881,48 +883,6 @@ export default class NewClass extends middleLayerBase {
cc
.
find
(
'
middleLayer/cross
'
).
active
=
false
;
cc
.
find
(
'
middleLayer/cross
'
).
active
=
false
;
cc
.
find
(
'
middleLayer/free
'
).
active
=
false
;
cc
.
find
(
'
middleLayer/free
'
).
active
=
false
;
if
(
this
.
type
==
"
aixuebao
"
)
{
await
this
.
asyncCallNetworkApiGet
(
`/api/aixuebao/v1/engine/active`
,
{
engineid
:
this
.
engine_uuid
,
product
:
'
oxford
'
});
// 机器码授权免登陆 (爱学宝)
const
{
token
}
=
await
this
.
asyncCallNetworkApiPost
(
`/api/oxfordlite/v1/engine/login`
,
{
engine_uuid
:
this
.
engine_uuid
});
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
token
);
}
// 处理苹果支付的异常回调
(
<
any
>
window
).
air
.
startBuyToAppStoreCallBack
=
async
(
res
)
=>
{
console
.
log
(
`===成功调用startBuyToAppStoreCallBack===
${
res
}
`
);
cc
.
find
(
`middleLayer/exception_pay_win`
).
active
=
true
;
if
(
typeof
(
res
)
==
'
string
'
)
{
res
=
JSON
.
parse
(
res
);
}
if
(
res
.
error
)
{
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
`支付失败\n
${
res
.
error
}
`
;
setTimeout
(()
=>
{
cc
.
find
(
`middleLayer/exception_pay_win`
).
active
=
false
;
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
"
正在处理支付订单
\n
请勿关闭App
"
;
},
2000
);
return
;
}
const
orderData
=
await
this
.
asyncCallNetworkApiPost
(
`/api/oxford/v1/paid/ios/order/save`
,
{
productid
:
res
.
productid
,
puid
:
res
.
puid
,
iospaidcode
:
res
.
receiptData
});
if
(
orderData
.
code
!=
200
)
{
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
`支付失败[
${
orderData
.
code
}
]\n请联系客服`
;
return
;
}
cc
.
find
(
`middleLayer/exception_pay_win/buy_status_text`
).
getComponent
(
cc
.
Label
).
string
=
`购买成功!\n快去探索绘玩绘拼自然拼读世界吧!`
;
cc
.
find
(
`middleLayer/exception_pay_win/active_btn`
).
active
=
true
;
// 回调给苹果订单处理成功了
(
<
any
>
window
).
courseware
.
callOcMethod
(
"
orderToSeverSuccess
"
,
{});
}
this
.
showWaitingLetters
();
this
.
showWaitingLetters
();
this
.
onMiddleLayerLoadingFinish
();
this
.
onMiddleLayerLoadingFinish
();
...
@@ -941,7 +901,6 @@ export default class NewClass extends middleLayerBase {
...
@@ -941,7 +901,6 @@ export default class NewClass extends middleLayerBase {
// 游客功能
// 游客功能
this
.
isLogin
=
false
;
this
.
isLogin
=
false
;
this
.
loadOnlineBundle
(
'
NJ_YouLeChang
'
);
this
.
loadOnlineBundle
(
'
NJ_YouLeChang
'
);
// this.loadOnlineBundle('NJ_login');
}
}
this
.
initListener
();
this
.
initListener
();
...
...
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_njstar/script/supportToos.js
View file @
2dc85e94
...
@@ -139,7 +139,7 @@ export function supportMethod (method, param) {
...
@@ -139,7 +139,7 @@ export function supportMethod (method, param) {
}
}
}
else
if
(
cc
.
sys
.
isBrowser
)
{
}
else
if
(
cc
.
sys
.
isBrowser
)
{
if
(
method
==
'
getEngineInfo
'
){
if
(
method
==
'
getEngineInfo
'
){
window
.
air
.
getEngineInfoCallback
({
isDev
:
0
,
uuid
:
'
debug-njstar-xxxxxx
'
});
window
.
air
.
getEngineInfoCallback
({
isDev
:
1
,
uuid
:
'
debug-njstar-xxxxxx
'
});
}
else
if
(
method
==
'
startTest
'
)
{
}
else
if
(
method
==
'
startTest
'
)
{
// 初始化参数
// 初始化参数
initSkKouYuParms
(
param
.
params
,
'
para.eval
'
);
initSkKouYuParms
(
param
.
params
,
'
para.eval
'
);
...
...
This diff is collapsed.
Click to expand it.
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