Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_YouLeChang
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_YouLeChang
Commits
fbf39d3a
Commit
fbf39d3a
authored
Oct 08, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 为了IOS过审
parent
010c0c1f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
299 additions
and
56 deletions
+299
-56
NJ_YouLeChang.fire
assets/NJ_YouLeChang/scene/NJ_YouLeChang.fire
+264
-52
NJ_YouLeChang.ts
assets/NJ_YouLeChang/scene/NJ_YouLeChang.ts
+35
-4
No files found.
assets/NJ_YouLeChang/scene/NJ_YouLeChang.fire
View file @
fbf39d3a
This diff is collapsed.
Click to expand it.
assets/NJ_YouLeChang/scene/NJ_YouLeChang.ts
View file @
fbf39d3a
...
@@ -197,6 +197,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -197,6 +197,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
!
kidInfo
)
{
if
(
!
kidInfo
)
{
return
;
return
;
}
}
if
(
kidInfo
.
nick_name
===
'
游客
'
)
{
jumpToBundle
(
'
NJ_login
'
);
return
;
}
if
(
!
kidInfo
.
lastgameinfo
)
{
if
(
!
kidInfo
.
lastgameinfo
)
{
middleLayerComponent
.
showTips
(
"
还未开始学习!
"
);
middleLayerComponent
.
showTips
(
"
还未开始学习!
"
);
return
;
return
;
...
@@ -208,13 +212,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -208,13 +212,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayerComponent
.
loadOnlineCourseWare
(
syllabusId
,
false
,
coursewareId
);
middleLayerComponent
.
loadOnlineCourseWare
(
syllabusId
,
false
,
coursewareId
);
});
});
const
btn_center
=
cc
.
find
(
'
Canvas/bg_ground/bg_bottom/btn_center
'
);
const
btn_center
=
cc
.
find
(
'
Canvas/bg_ground/bg_bottom/btn_center
'
);
buttonOnClick
(
btn_center
,
()
=>
{
buttonOnClick
(
btn_center
,
async
()
=>
{
jumpToBundle
(
'
NJ_usercenter
'
);
const
kidInfo
=
await
middleLayerComponent
.
getUserInfo
();
if
(
!
kidInfo
)
{
return
;
}
if
(
kidInfo
.
nick_name
===
'
游客
'
)
{
jumpToBundle
(
'
NJ_login
'
);
}
else
{
jumpToBundle
(
'
NJ_usercenter
'
);
}
});
});
const
avatar_border
=
cc
.
find
(
'
Canvas/avatar_border
'
);
const
avatar_border
=
cc
.
find
(
'
Canvas/avatar_border
'
);
buttonOnClick
(
avatar_border
,
()
=>
{
buttonOnClick
(
avatar_border
,
async
()
=>
{
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
true
;
const
kidInfo
=
await
middleLayerComponent
.
getUserInfo
();
if
(
kidInfo
.
nick_name
===
'
游客
'
)
{
jumpToBundle
(
'
NJ_login
'
);
}
else
{
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
true
;
}
},
0.7
);
},
0.7
);
const
BtnLogout
=
cc
.
find
(
'
Canvas/userInfo/frame/BtnLogout
'
);
const
BtnLogout
=
cc
.
find
(
'
Canvas/userInfo/frame/BtnLogout
'
);
...
@@ -235,5 +252,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -235,5 +252,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick
(
btnClose
,
()
=>
{
buttonOnClick
(
btnClose
,
()
=>
{
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
false
;
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
false
;
});
});
if
(
cc
.
sys
.
isNative
&&
cc
.
sys
.
os
==
cc
.
sys
.
OS_IOS
)
{
// 整个IF都是用于IOS过审
cc
.
find
(
`Canvas/userInfo/deleteAccount`
).
active
=
true
;
buttonOnClick
(
cc
.
find
(
'
Canvas/userInfo/deleteAccount
'
),
()
=>
{
middleLayerComponent
.
showConfirm
(
"
确定退出并删除账号?
"
,
()
=>
{
const
phone
=
cc
.
sys
.
localStorage
.
getItem
(
'
phone
'
);
cc
.
sys
.
localStorage
.
setItem
(
'
phone
'
,
`
${
phone
}
_x`
);
cc
.
sys
.
localStorage
.
setItem
(
'
token
'
,
''
);
jumpToBundle
(
'
NJ_login
'
);
});
});
}
}
}
}
}
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