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
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
...
...
@@ -90,13 +90,13 @@
"_active": true,
"_components": [
{
"__id__":
99
"__id__":
104
},
{
"__id__": 10
0
"__id__": 10
5
},
{
"__id__": 10
1
"__id__": 10
6
}
],
"_prefab": null,
...
...
@@ -3354,16 +3354,19 @@
"__id__": 69
},
{
"__id__": 7
3
"__id__": 7
4
},
{
"__id__": 94
"__id__": 95
},
{
"__id__": 99
}
],
"_active": false,
"_components": [
{
"__id__":
98
"__id__":
103
}
],
"_prefab": null,
...
...
@@ -3432,6 +3435,9 @@
},
{
"__id__": 72
},
{
"__id__": 73
}
],
"_prefab": null,
...
...
@@ -3609,6 +3615,16 @@
"_N$target": null,
"_id": "c93W5rG/dLO4FA8C0kG/MY"
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_id": "a7oMGWaYRMiKv9fGk1f76I"
},
{
"__type__": "cc.Node",
"_name": "frame",
...
...
@@ -3618,28 +3634,28 @@
},
"_children": [
{
"__id__": 7
4
"__id__": 7
5
},
{
"__id__": 7
6
"__id__": 7
7
},
{
"__id__": 8
0
"__id__": 8
1
},
{
"__id__": 8
2
"__id__": 8
3
},
{
"__id__": 8
4
"__id__": 8
5
},
{
"__id__": 8
8
"__id__": 8
9
}
],
"_active": true,
"_components": [
{
"__id__": 9
3
"__id__": 9
4
}
],
"_prefab": null,
...
...
@@ -3695,13 +3711,13 @@
"_name": "headBack",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
5
"__id__": 7
6
}
],
"_prefab": null,
...
...
@@ -3757,7 +3773,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
4
"__id__": 7
5
},
"_enabled": true,
"_materials": [
...
...
@@ -3789,17 +3805,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [
{
"__id__": 7
7
"__id__": 7
8
}
],
"_active": true,
"_components": [
{
"__id__":
79
"__id__":
80
}
],
"_prefab": null,
...
...
@@ -3855,13 +3871,13 @@
"_name": "headImg",
"_objFlags": 0,
"_parent": {
"__id__": 7
6
"__id__": 7
7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
8
"__id__": 7
9
}
],
"_prefab": null,
...
...
@@ -3917,7 +3933,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
7
"__id__": 7
8
},
"_enabled": true,
"_materials": [
...
...
@@ -3949,7 +3965,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
6
"__id__": 7
7
},
"_enabled": true,
"_materials": [
...
...
@@ -3971,13 +3987,13 @@
"_name": "headTop",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
1
"__id__": 8
2
}
],
"_prefab": null,
...
...
@@ -4033,7 +4049,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
0
"__id__": 8
1
},
"_enabled": true,
"_materials": [
...
...
@@ -4065,13 +4081,13 @@
"_name": "nickname",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
3
"__id__": 8
4
}
],
"_prefab": null,
...
...
@@ -4127,7 +4143,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
2
"__id__": 8
3
},
"_enabled": true,
"_materials": [
...
...
@@ -4160,17 +4176,17 @@
"_name": "goldBg",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [
{
"__id__": 8
5
"__id__": 8
6
}
],
"_active": true,
"_components": [
{
"__id__": 8
7
"__id__": 8
8
}
],
"_prefab": null,
...
...
@@ -4226,13 +4242,13 @@
"_name": "goldNumber",
"_objFlags": 0,
"_parent": {
"__id__": 8
4
"__id__": 8
5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
6
"__id__": 8
7
}
],
"_prefab": null,
...
...
@@ -4288,7 +4304,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
5
"__id__": 8
6
},
"_enabled": true,
"_materials": [
...
...
@@ -4321,7 +4337,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
4
"__id__": 8
5
},
"_enabled": true,
"_materials": [
...
...
@@ -4353,20 +4369,20 @@
"_name": "BtnLogout",
"_objFlags": 0,
"_parent": {
"__id__": 7
3
"__id__": 7
4
},
"_children": [
{
"__id__":
89
"__id__":
90
}
],
"_active": true,
"_components": [
{
"__id__": 9
1
"__id__": 9
2
},
{
"__id__": 9
2
"__id__": 9
3
}
],
"_prefab": null,
...
...
@@ -4422,13 +4438,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 8
8
"__id__": 8
9
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
0
"__id__": 9
1
}
],
"_prefab": null,
...
...
@@ -4484,7 +4500,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__":
89
"__id__":
90
},
"_enabled": true,
"_materials": [
...
...
@@ -4517,7 +4533,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
8
"__id__": 8
9
},
"_enabled": true,
"_materials": [
...
...
@@ -4549,7 +4565,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
8
"__id__": 8
9
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4617,7 +4633,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
3
"__id__": 7
4
},
"_enabled": true,
"_materials": [
...
...
@@ -4654,14 +4670,14 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
},
{
"__id__": 96
},
{
"__id__": 97
},
{
"__id__": 98
}
],
"_prefab": null,
...
...
@@ -4717,7 +4733,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
4
"__id__": 9
5
},
"_enabled": true,
"_materials": [
...
...
@@ -4749,7 +4765,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
4
"__id__": 9
5
},
"_enabled": true,
"_normalMaterial": null,
...
...
@@ -4817,7 +4833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
4
"__id__": 9
5
},
"_enabled": true,
"alignMode": 1,
...
...
@@ -4839,6 +4855,202 @@
"_originalHeight": 0,
"_id": "e4EY7LkcFIqYdkh9Ctt6bi"
},
{
"__type__": "cc.Node",
"_name": "deleteAccount",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 100
},
{
"__id__": 101
},
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 75,
"g": 159,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 390,
"height": 37.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
423.33799999999997,
-320.854,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "03FV/oPNVDfZ8Z6hSHyUWV"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "不再使用?点击删除账号信息",
"_N$string": "不再使用?点击删除账号信息",
"_fontSize": 30,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 4,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "e7kVewYqtLIq/8//U0fi/L"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 21.662000000000035,
"_top": 0,
"_bottom": 20.246000000000038,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "65xDnPBlJM8bB8HLw1c40S"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "06eIOEUctNY41cuC5rt0iN"
},
{
"__type__": "cc.Widget",
"_name": "",
...
...
assets/NJ_YouLeChang/scene/NJ_YouLeChang.ts
View file @
fbf39d3a
...
...
@@ -197,6 +197,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
!
kidInfo
)
{
return
;
}
if
(
kidInfo
.
nick_name
===
'
游客
'
)
{
jumpToBundle
(
'
NJ_login
'
);
return
;
}
if
(
!
kidInfo
.
lastgameinfo
)
{
middleLayerComponent
.
showTips
(
"
还未开始学习!
"
);
return
;
...
...
@@ -208,13 +212,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayerComponent
.
loadOnlineCourseWare
(
syllabusId
,
false
,
coursewareId
);
});
const
btn_center
=
cc
.
find
(
'
Canvas/bg_ground/bg_bottom/btn_center
'
);
buttonOnClick
(
btn_center
,
()
=>
{
jumpToBundle
(
'
NJ_usercenter
'
);
buttonOnClick
(
btn_center
,
async
()
=>
{
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
'
);
buttonOnClick
(
avatar_border
,
()
=>
{
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
true
;
buttonOnClick
(
avatar_border
,
async
()
=>
{
const
kidInfo
=
await
middleLayerComponent
.
getUserInfo
();
if
(
kidInfo
.
nick_name
===
'
游客
'
)
{
jumpToBundle
(
'
NJ_login
'
);
}
else
{
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
true
;
}
},
0.7
);
const
BtnLogout
=
cc
.
find
(
'
Canvas/userInfo/frame/BtnLogout
'
);
...
...
@@ -235,5 +252,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick
(
btnClose
,
()
=>
{
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