Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
aebd3ff3
Commit
aebd3ff3
authored
Jan 09, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
背包奖品高亮
parent
1add4ae7
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
443 additions
and
192 deletions
+443
-192
MyBagItem.prefab
assets/Bundles/MyBagPanel/MyBagItem.prefab
+286
-113
MyBagPanel.prefab
assets/Bundles/MyBagPanel/MyBagPanel.prefab
+121
-47
MyBagPanel.ts
assets/Scripts/Panels/MyBagPanel.ts
+35
-31
gameStore.ts
assets/Scripts/store/gameStore.ts
+1
-1
No files found.
assets/Bundles/MyBagPanel/MyBagItem.prefab
View file @
aebd3ff3
This diff is collapsed.
Click to expand it.
assets/Bundles/MyBagPanel/MyBagPanel.prefab
View file @
aebd3ff3
...
...
@@ -25,20 +25,20 @@
"_active": true,
"_components": [
{
"__id__": 1
08
"__id__": 1
12
},
{
"__id__": 11
0
"__id__": 11
4
},
{
"__id__": 11
2
"__id__": 11
6
},
{
"__id__": 11
4
"__id__": 11
8
}
],
"_prefab": {
"__id__": 1
19
"__id__": 1
23
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -97,14 +97,14 @@
"_active": true,
"_components": [
{
"__id__": 10
3
"__id__": 10
7
},
{
"__id__": 10
5
"__id__": 10
9
}
],
"_prefab": {
"__id__": 1
07
"__id__": 1
11
},
"_lpos": {
"__type__": "cc.Vec3",
...
...
@@ -1714,7 +1714,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y":
12.5
,
"y":
0
,
"z": 0
},
"_lrot": {
...
...
@@ -1754,8 +1754,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 8
2
0,
"height": 4
25
"width": 8
8
0,
"height": 4
00
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1780,11 +1780,11 @@
"__prefab": {
"__id__": 70
},
"_alignFlags":
20
,
"_alignFlags":
45
,
"_target": null,
"_left": 0,
"_right": 0,
"_top":
84
,
"_top":
0
,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
...
...
@@ -1794,8 +1794,8 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight":
0
,
"_originalWidth":
82
0,
"_originalHeight":
425
,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
...
...
@@ -2068,7 +2068,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 8
2
0,
"width": 8
8
0,
"height": 400
},
"_anchorPoint": {
...
...
@@ -2094,11 +2094,11 @@
"__prefab": {
"__id__": 86
},
"_alignFlags": 2
0
,
"_alignFlags": 2
1
,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_top":
18
0,
"_bottom": 20,
"_horizontalCenter": 0,
"_verticalCenter": 0,
...
...
@@ -2109,7 +2109,7 @@
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_originalHeight":
40
0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
...
...
@@ -2151,15 +2151,21 @@
},
{
"__id__": 100
},
{
"__id__": 102
},
{
"__id__": 104
}
],
"_prefab": {
"__id__": 10
2
"__id__": 10
6
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -
7
7.5,
"y": -
8
7.5,
"z": 0
},
"_lrot": {
...
...
@@ -2252,8 +2258,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 8
20
,
"height": 42
5
"width": 8
46
,
"height": 42
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2278,11 +2284,11 @@
"__prefab": {
"__id__": 93
},
"_alignFlags":
20
,
"_alignFlags":
45
,
"_target": null,
"_left":
0
,
"_right":
0
,
"_top":
84
,
"_left":
27
,
"_right":
27
,
"_top":
0
,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 0,
...
...
@@ -2292,8 +2298,8 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight":
0
,
"_originalWidth":
82
0,
"_originalHeight":
425
,
"_alignMode": 2,
"_lockFlags": 0,
"_id": ""
...
...
@@ -2314,7 +2320,7 @@
"__prefab": {
"__id__": 95
},
"mask":
tru
e,
"mask":
fals
e,
"scrollEnabled": true,
"scrollDirection": 1,
"mode": 0,
...
...
@@ -2335,7 +2341,7 @@
{
"__type__": "_yx_editor_register_cell_info",
"prefab": {
"__uuid__": "
8fb09e0b-1eb3-4b77-99fd-784445492b24
",
"__uuid__": "
5420d619-9574-4e5e-806a-f2c54d4c1af7
",
"__expectedType__": "cc.Prefab"
},
"identifier": "cell",
...
...
@@ -2368,8 +2374,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
82
0,
"height": 42
5
"width":
90
0,
"height": 42
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2394,12 +2400,12 @@
"__prefab": {
"__id__": 101
},
"_alignFlags":
20
,
"_alignFlags":
44
,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom":
10
,
"_bottom":
0.5
,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
...
...
@@ -2408,7 +2414,7 @@
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalWidth":
85
0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
...
...
@@ -2418,6 +2424,74 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "08cNJIoHRGT5pDcV12mg1Y"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 88
},
"_enabled": true,
"__prefab": {
"__id__": 103
},
"_type": 0,
"_inverted": false,
"_segments": 64,
"_alphaThreshold": 0.1,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "d6wtnJVHxDZqpE4Zq2fO5D"
},
{
"__type__": "cc.Graphics",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 88
},
"_enabled": true,
"__prefab": {
"__id__": 105
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_lineWidth": 1,
"_strokeColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_lineJoin": 2,
"_lineCap": 0,
"_fillColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 0
},
"_miterLimit": 10,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63GDoWejtED6vZ972naZRo"
},
{
"__type__": "cc.PrefabInfo",
"root": {
...
...
@@ -2441,7 +2515,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 10
4
"__id__": 10
8
},
"_contentSize": {
"__type__": "cc.Size",
...
...
@@ -2469,7 +2543,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 1
06
"__id__": 1
10
},
"_customMaterial": null,
"_srcBlendFactor": 2,
...
...
@@ -2527,7 +2601,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 1
09
"__id__": 1
13
},
"_contentSize": {
"__type__": "cc.Size",
...
...
@@ -2555,7 +2629,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 11
1
"__id__": 11
5
},
"_alignFlags": 18,
"_target": null,
...
...
@@ -2591,7 +2665,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 11
3
"__id__": 11
7
},
"closeBtn": {
"__id__": 3
...
...
@@ -2615,13 +2689,13 @@
"__id__": 32
},
"Prize_List": {
"__id__":
94
"__id__":
71
},
"None_list": {
"__id__": 75
},
"Tool_List": {
"__id__":
71
"__id__":
94
},
"_id": ""
},
...
...
@@ -2639,17 +2713,17 @@
},
"_enabled": true,
"__prefab": {
"__id__": 11
5
"__id__": 11
9
},
"skinNodeArr": [
{
"__id__": 1
16
"__id__": 1
20
},
{
"__id__": 1
17
"__id__": 1
21
},
{
"__id__": 1
18
"__id__": 1
22
}
],
"_genSkinNode": true,
...
...
assets/Scripts/Panels/MyBagPanel.ts
View file @
aebd3ff3
...
...
@@ -61,8 +61,8 @@ export class MyBagPanel extends Panel {
this
.
tab
=
TAB
.
PRIZE
;
this
.
closeBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickClose
,
this
);
this
.
prize_btn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
click
Sheng
,
this
);
this
.
tool_btn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
click
Single
,
this
);
this
.
prize_btn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
click
Prize
,
this
);
this
.
tool_btn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
click
Tool
,
this
);
}
...
...
@@ -73,46 +73,46 @@ export class MyBagPanel extends Panel {
}
this
.
Prize_List
.
numberOfItems
=
()
=>
this
.
prizeDate
.
length
;
this
.
Prize_List
.
onCellDisplay
=
this
.
on
Sheng
CellDisplay
;
this
.
Prize_List
.
onCellDisplay
=
this
.
on
Prize
CellDisplay
;
const
shengLayout
=
new
YXFlowLayout
();
shengLayout
.
itemSize
=
new
Size
(
820
,
160
);
this
.
Prize_List
.
layout
=
shengLayout
;
const
prizeLayout
=
new
YXFlowLayout
();
prizeLayout
.
itemSize
=
new
Size
(
880
,
200
);
prizeLayout
.
verticalSpacing
=
-
30
;
this
.
Prize_List
.
layout
=
prizeLayout
;
this
.
Prize_List
.
reloadData
();
this
.
Tool_List
.
numberOfItems
=
()
=>
this
.
toolDate
.
length
;
this
.
Tool_List
.
onCellDisplay
=
this
.
on
Single
CellDisplay
;
this
.
Tool_List
.
onCellDisplay
=
this
.
on
Tool
CellDisplay
;
const
singleLayout
=
new
YXFlowLayout
();
singleLayout
.
itemSize
=
new
Size
(
820
,
160
);
this
.
Tool_List
.
layout
=
singleLayout
;
const
toolLayout
=
new
YXFlowLayout
();
toolLayout
.
itemSize
=
new
Size
(
280
,
368
);
toolLayout
.
priority
=
YXFlowLayout
.
Priority
.
LEFT
;
toolLayout
.
verticalSpacing
=
-
20
;
this
.
Tool_List
.
layout
=
toolLayout
;
this
.
Tool_List
.
reloadData
();
showWaiting
(
true
);
await
Promise
.
all
([
this
.
update
Sheng
(),
this
.
update
Singl
e
(),
this
.
update
Tool
(),
this
.
update
Priz
e
(),
]);
hideWaiting
();
}
update
(
deltaTime
:
number
)
{
}
clickClose
=
()
=>
{
this
.
hidePanel
();
};
// 点击奖品
click
Sheng
()
{
click
Prize
()
{
this
.
tab
=
TAB
.
PRIZE
;
// this.Prize.getChildByName(`goCheck`).active = true;
}
// 道具
click
Single
()
{
click
Tool
()
{
if
(
!
store
.
checkActTime
())
return
;
this
.
tab
=
TAB
.
TOOL
;
...
...
@@ -120,20 +120,20 @@ export class MyBagPanel extends Panel {
/****** 数据 ******/
// 刷新道具
async
update
Sheng
()
{
async
update
Tool
()
{
const
{
success
,
data
}
=
await
sendWebNet
(
WebNetName
.
queryGameItem
);
if
(
!
success
)
return
;
this
.
prize
Date
=
data
.
spInfo
;
this
.
Prize
_List
.
reloadData
();
this
.
tool
Date
=
data
.
spInfo
;
this
.
Tool
_List
.
reloadData
();
this
.
Prize_List
.
node
.
active
=
this
.
prize
Date
.
length
>
0
;
this
.
Tool_List
.
node
.
active
=
this
.
tool
Date
.
length
>
0
;
}
prizeIdType
=
{};
// 刷新奖品
async
update
Singl
e
()
{
async
update
Priz
e
()
{
const
{
success
,
data
=
[]
}
=
await
sendWebNet
(
WebNetName
.
prizeDetail
);
const
{
success
:
suc
,
data
:
d
}
=
await
sendWebNet
(
WebNetName
.
prizeType
);
...
...
@@ -172,19 +172,19 @@ export class MyBagPanel extends Panel {
this
.
None_list
.
active
=
true
;
}
this
.
tool
Date
=
records
;
this
.
Tool
_List
.
reloadData
();
this
.
prize
Date
=
records
;
this
.
Prize
_List
.
reloadData
();
this
.
Tool_List
.
node
.
active
=
this
.
tool
Date
.
length
>
0
;
this
.
Prize_List
.
node
.
active
=
this
.
prize
Date
.
length
>
0
;
}
// 给每个cell设置数据
on
Sheng
CellDisplay
=
(
cell
:
Node
,
indexPath
:
YXIndexPath
,
collectionView
:
YXCollectionView
)
=>
{
const
data
=
this
.
prize
Date
[
indexPath
.
item
];
on
Tool
CellDisplay
=
(
cell
:
Node
,
indexPath
:
YXIndexPath
,
collectionView
:
YXCollectionView
)
=>
{
const
data
=
this
.
tool
Date
[
indexPath
.
item
];
this
.
onCellDisplay
(
cell
,
data
,
TAB
.
TOOL
);
};
on
Singl
eCellDisplay
=
(
cell
:
Node
,
indexPath
:
YXIndexPath
,
collectionView
:
YXCollectionView
)
=>
{
const
data
=
this
.
tool
Date
[
indexPath
.
item
];
on
Priz
eCellDisplay
=
(
cell
:
Node
,
indexPath
:
YXIndexPath
,
collectionView
:
YXCollectionView
)
=>
{
const
data
=
this
.
prize
Date
[
indexPath
.
item
];
this
.
onCellDisplay
(
cell
,
data
,
TAB
.
PRIZE
);
};
...
...
@@ -200,7 +200,8 @@ export class MyBagPanel extends Panel {
prizeId
=
""
,
spNum
=
0
,
spImg
=
""
,
dressingStatus
=
0
dressingStatus
=
0
,
lightFlag
=
false
,
}
=
data
;
const
isPrize
=
type
==
TAB
.
PRIZE
;
...
...
@@ -224,6 +225,9 @@ export class MyBagPanel extends Panel {
cell
.
getChildByName
(
`name`
).
getComponent
(
Label
).
string
=
strFormat
(
name
||
spName
,
32
);
cell
.
getChildByName
(
`time`
).
getComponent
(
Label
).
string
=
gmtCreate
?
dateFormatter
(
gmtCreate
,
"yyyy.MM.dd hh:mm"
)
:
"剩余数量:"
+
spNum
;
cell
.
getChildByName
(
"img"
).
getComponent
(
Sprite
).
spriteFrame
=
icon
||
spImg
;
cell
.
getChildByName
(
"light"
).
active
=
!!
lightFlag
;
};
clickToCheck
=
(
url
,
id
,
prizeId
)
=>
{
...
...
assets/Scripts/store/gameStore.ts
View file @
aebd3ff3
...
...
@@ -138,7 +138,7 @@ class GameStore {
}
if
(
score
>=
this
.
startInfo
.
slideScore
)
{
param
.
slideValue
=
await
startNecCaptcha
(
"1ee4615751874cbeaea4dd4681930f61"
,
3
).
catch
(()
=>
{
param
.
slideValue
=
await
startNecCaptcha
(
"1ee4615751874cbeaea4dd4681930f61"
,
10
).
catch
(()
=>
{
showToast
(
"校验失败"
);
changeScene
(
HomeScene
);
return
false
;
...
...
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