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
f2ad9cb4
Commit
f2ad9cb4
authored
Jun 06, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 用户信息页
parent
060c04e3
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1703 additions
and
7 deletions
+1703
-7
NJ_YouLeChang.fire
assets/NJ_YouLeChang/scene/NJ_YouLeChang.fire
+1459
-3
NJ_YouLeChang.ts
assets/NJ_YouLeChang/scene/NJ_YouLeChang.ts
+16
-4
userinfo.meta
assets/NJ_YouLeChang/textures/userinfo.meta
+12
-0
btn.png
assets/NJ_YouLeChang/textures/userinfo/btn.png
+0
-0
btn.png.meta
assets/NJ_YouLeChang/textures/userinfo/btn.png.meta
+36
-0
btnClose.png
assets/NJ_YouLeChang/textures/userinfo/btnClose.png
+0
-0
btnClose.png.meta
assets/NJ_YouLeChang/textures/userinfo/btnClose.png.meta
+36
-0
frame.png
assets/NJ_YouLeChang/textures/userinfo/frame.png
+0
-0
frame.png.meta
assets/NJ_YouLeChang/textures/userinfo/frame.png.meta
+36
-0
goldBg.png
assets/NJ_YouLeChang/textures/userinfo/goldBg.png
+0
-0
goldBg.png.meta
assets/NJ_YouLeChang/textures/userinfo/goldBg.png.meta
+36
-0
headBack.png
assets/NJ_YouLeChang/textures/userinfo/headBack.png
+0
-0
headBack.png.meta
assets/NJ_YouLeChang/textures/userinfo/headBack.png.meta
+36
-0
headImg.png
assets/NJ_YouLeChang/textures/userinfo/headImg.png
+0
-0
headImg.png.meta
assets/NJ_YouLeChang/textures/userinfo/headImg.png.meta
+36
-0
No files found.
assets/NJ_YouLeChang/scene/NJ_YouLeChang.fire
View file @
f2ad9cb4
This diff is collapsed.
Click to expand it.
assets/NJ_YouLeChang/scene/NJ_YouLeChang.ts
View file @
f2ad9cb4
...
...
@@ -63,11 +63,25 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
const
kidInfo
=
await
middleLayer
.
getComponent
(
'
middleLayer
'
).
getUserInfo
();
cc
.
find
(
"
Canvas/avatar_border/nick_name
"
).
getComponent
(
cc
.
Label
).
string
=
kidInfo
.
nick_name
;
const
avatarUrl
=
middleLayer
.
getComponent
(
'
middleLayer
'
).
getHeadUrl
(
kidInfo
.
avatar_url
||
1
);
const
avatarUrl
=
middleLayer
.
getComponent
(
'
middleLayer
'
).
getHeadUrl
(
kidInfo
.
avatar_url
||
1
);
getSpriteFrimeByUrl
(
avatarUrl
,
(
spriteFrame
)
=>
{
cc
.
find
(
"
Canvas/avatar_border/defaulte_avatar
"
).
getComponent
(
cc
.
Sprite
).
spriteFrame
=
spriteFrame
;
});
this
.
initUserInfoView
();
}
async
initUserInfoView
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
{
return
;
}
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
userInfo
=
await
middleLayerComponent
.
getUserInfo
();
console
.
log
(
'
userInfo =
'
,
userInfo
);
// middleLayerComponent.showConfirm("确定退出?", () => {
// jumpToBundle('NJ_login');
// });
}
initListener
()
{
...
...
@@ -107,9 +121,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
const
avatar_border
=
cc
.
find
(
'
Canvas/avatar_border
'
);
buttonOnClick
(
avatar_border
,
()
=>
{
middleLayerComponent
.
showConfirm
(
"
确定退出?
"
,
()
=>
{
jumpToBundle
(
'
NJ_login
'
);
});
cc
.
find
(
'
Canvas/userInfo
'
).
active
=
true
;
});
}
}
assets/NJ_YouLeChang/textures/userinfo.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "1.1.2",
"uuid": "1dfa5d69-7877-481a-9234-e125c5ce29dc",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/btn.png
0 → 100644
View file @
f2ad9cb4
3.73 KB
assets/NJ_YouLeChang/textures/userinfo/btn.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "6d829687-515f-4372-81fb-b7735c7d8321",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 223,
"height": 62,
"platformSettings": {},
"subMetas": {
"btn": {
"ver": "1.0.4",
"uuid": "09115fa4-ba9f-4f80-8b96-cf1977075e57",
"rawTextureUuid": "6d829687-515f-4372-81fb-b7735c7d8321",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 223,
"height": 62,
"rawWidth": 223,
"rawHeight": 62,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/btnClose.png
0 → 100644
View file @
f2ad9cb4
3.67 KB
assets/NJ_YouLeChang/textures/userinfo/btnClose.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "652a0a60-8be2-4467-98a2-e3195cf14d10",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 54,
"height": 57,
"platformSettings": {},
"subMetas": {
"btnClose": {
"ver": "1.0.4",
"uuid": "221cb354-ffbc-42df-8d06-a59eabf188b5",
"rawTextureUuid": "652a0a60-8be2-4467-98a2-e3195cf14d10",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 54,
"height": 57,
"rawWidth": 54,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/frame.png
0 → 100644
View file @
f2ad9cb4
21.5 KB
assets/NJ_YouLeChang/textures/userinfo/frame.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "8a29a16c-711d-49b6-ae1c-eabd648e0380",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "point",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 718,
"height": 518,
"platformSettings": {},
"subMetas": {
"frame": {
"ver": "1.0.4",
"uuid": "6e87b526-8c04-47a0-a01e-df9c594fd0b9",
"rawTextureUuid": "8a29a16c-711d-49b6-ae1c-eabd648e0380",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 718,
"height": 517,
"rawWidth": 718,
"rawHeight": 518,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/goldBg.png
0 → 100644
View file @
f2ad9cb4
3.52 KB
assets/NJ_YouLeChang/textures/userinfo/goldBg.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "4236da30-13eb-4adf-ab11-2f1d28646aeb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 267,
"height": 51,
"platformSettings": {},
"subMetas": {
"goldBg": {
"ver": "1.0.4",
"uuid": "440ac7d0-d364-4c1c-9bae-09297f0d8ca1",
"rawTextureUuid": "4236da30-13eb-4adf-ab11-2f1d28646aeb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 267,
"height": 51,
"rawWidth": 267,
"rawHeight": 51,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/headBack.png
0 → 100644
View file @
f2ad9cb4
1.87 KB
assets/NJ_YouLeChang/textures/userinfo/headBack.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "05580bb1-24dd-4f17-9c92-d4f58d15ab8a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 96,
"height": 101,
"platformSettings": {},
"subMetas": {
"headBack": {
"ver": "1.0.4",
"uuid": "9c4402b5-31f8-4c25-994a-52b471ac894d",
"rawTextureUuid": "05580bb1-24dd-4f17-9c92-d4f58d15ab8a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 96,
"height": 101,
"rawWidth": 96,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/NJ_YouLeChang/textures/userinfo/headImg.png
0 → 100644
View file @
f2ad9cb4
4.54 KB
assets/NJ_YouLeChang/textures/userinfo/headImg.png.meta
0 → 100644
View file @
f2ad9cb4
{
"ver": "2.3.5",
"uuid": "7a29be13-b2cd-479a-bcdf-0f26ffc385dd",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 86,
"height": 108,
"platformSettings": {},
"subMetas": {
"headImg": {
"ver": "1.0.4",
"uuid": "3a503e3a-adef-4882-8efb-2f06d4df9f85",
"rawTextureUuid": "7a29be13-b2cd-479a-bcdf-0f26ffc385dd",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0.5,
"trimX": 0,
"trimY": 0,
"width": 85,
"height": 107,
"rawWidth": 86,
"rawHeight": 108,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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