Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
apk_product
/
ForFun
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
9f06fd5b
...
9f06fd5b5b3567688fca9b1e256cc6a4d186c437
authored
2020-03-10 11:50:02 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改详情页
2.优化首页
1 parent
c42acafc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
74 deletions
assets/Scene/sceneGameDetail.fire
assets/Script/gameDetail.js
assets/resources/data_template/game_detail_type_list.json
assets/Scene/sceneGameDetail.fire
View file @
9f06fd5
...
...
@@ -17,7 +17,7 @@
"__id__": 2
}
],
"_active":
tru
e,
"_active":
fals
e,
"_components": [],
"_prefab": null,
"_opacity": 255,
...
...
@@ -207,7 +207,7 @@
"array": [
0,
0,
271.06
01806640625
,
271.06
59484863281
,
0,
0,
0,
...
...
@@ -387,8 +387,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
172
,
"height":
172
"width":
564
,
"height":
317
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -399,8 +399,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-
490
,
214
,
-
294
,
145.5
,
0,
0,
0,
...
...
@@ -469,7 +469,7 @@
"_alignFlags": 9,
"_left": 64,
"_right": 0,
"_top":
60
,
"_top":
56
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -616,7 +616,7 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-272
,
120
,
272.5,
0,
0,
...
...
@@ -1348,7 +1348,7 @@
"ctor": "Float32Array",
"array": [
-78,
-
49
.400001525878906,
-
36
.400001525878906,
0,
0,
0,
...
...
@@ -1415,9 +1415,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
260
,
"_left":
652
,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -1471,8 +1471,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
76
,
-
49
.400001525878906,
54
,
-
36
.400001525878906,
0,
0,
0,
...
...
@@ -1539,9 +1539,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
41
4,
"_left":
78
4,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -1595,8 +1595,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
2
89
,
-
49
.400001525878906,
2
43
,
-
36
.400001525878906,
0,
0,
0,
...
...
@@ -1663,9 +1663,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
607
,
"_left":
953
,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -1722,7 +1722,7 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
260
,
"_left":
652
,
"_right": 0,
"_top": 56,
"_bottom": 0,
...
...
@@ -1778,8 +1778,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-293.760009765625
,
2
23
.10000610351562,
88.23999786376953
,
2
36
.10000610351562,
0,
0,
0,
...
...
@@ -1846,9 +1846,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
324
,
"_left":
706
,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -1902,8 +1902,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-123.9749984741211
,
2
23
.10000610351562,
238.02499389648438
,
2
36
.10000610351562,
0,
0,
0,
...
...
@@ -1970,9 +1970,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
476
,
"_left":
838
,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2026,8 +2026,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
122.1500015258789
,
2
23
.10000610351562,
454.1499938964844
,
2
36
.10000610351562,
0,
0,
0,
...
...
@@ -2094,9 +2094,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
711
,
"_left":
1043
,
"_right": 0,
"_top": 1
18
,
"_top": 1
05
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2138,7 +2138,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
956
,
"width":
564
,
"height": 60
},
"_anchorPoint": {
...
...
@@ -2150,8 +2150,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
98
,
1
70
,
294
,
1
91
,
0,
0,
0,
...
...
@@ -2218,9 +2218,9 @@
"__id__": 2
},
"_alignFlags": 9,
"_left":
260
,
"_left":
652
,
"_right": 0,
"_top": 1
60
,
"_top": 1
39
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2262,8 +2262,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2
78
,
"height":
7
2
"width": 2
00
,
"height":
5
2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2274,8 +2274,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-450
,
67
,
112
,
13
,
0,
0,
0,
...
...
@@ -2342,9 +2342,9 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left":
51
,
"_left":
652
,
"_right": 0,
"_top":
257
,
"_top":
321
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2480,8 +2480,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 5
72
,
"height":
72
"width": 5
64
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2492,8 +2492,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
4,
66
,
29
4,
107
,
0,
0,
0,
...
...
@@ -2560,9 +2560,9 @@
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left":
358
,
"_left":
652
,
"_right": 0,
"_top": 2
58
,
"_top": 2
23
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2617,7 +2617,7 @@
"ctor": "Float32Array",
"array": [
-512,
-
33.349998474121094
,
-
73.3499984741211
,
0,
0,
0,
...
...
@@ -2684,7 +2684,7 @@
"_alignFlags": 9,
"_left": 64,
"_right": 0,
"_top":
36
5,
"_top":
40
5,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -2728,7 +2728,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1216,
"height":
227
"height":
152
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2752,7 +2752,7 @@
"ctor": "Float32Array",
"array": [
32,
-18
7.5
,
-18
2
,
0,
0,
0,
...
...
@@ -2806,7 +2806,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1236,
"height":
25
0
"height":
18
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -2959,7 +2959,7 @@
"_alignFlags": 9,
"_left": 64,
"_right": 0,
"_top": 4
34
,
"_top": 4
66
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -3795,6 +3795,7 @@
"_aTouchContext": [],
"_defaultBackScene": null,
"_oFocusScaleFactorInfo": null,
"_bShowExitBox": false,
"PFB_CATEGORY": {
"__uuid__": "9e0214ed-5de0-4667-a660-d4fa85a5de1d"
},
...
...
assets/Script/gameDetail.js
View file @
9f06fd5
...
...
@@ -283,8 +283,8 @@ cc.Class({
cc
.
find
(
"Desc/LabelTime"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
0
].
updateTime
;
//这里给描述做拦截,防止字数多超出栏目
var
description
=
oJSONResult
.
resultSet
[
0
].
description
;
if
(
description
.
length
>
150
)
{
description
=
description
.
substring
(
0
,
150
)
+
"..."
;
if
(
description
.
length
>
55
)
{
description
=
description
.
substring
(
0
,
55
)
+
"..."
;
}
cc
.
find
(
"Desc/LabelDesc"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
description
;
//搞标签
...
...
@@ -294,8 +294,8 @@ cc.Class({
let
nodeShadow
=
cc
.
find
(
"Desc/Title/Shadow"
+
i
,
this
.
node
);
nodeShadow
.
active
=
true
;
nodeShadow
.
getChildByName
(
"Label"
).
getComponent
(
cc
.
Label
).
string
=
aTag
[
i
];
cc
.
log
(
"字体宽度:"
+
(
260
+
iTitleWidth
+
16
+
i
*
108
));
nodeShadow
.
getComponent
(
cc
.
Widget
).
left
=
260
+
iTitleWidth
+
16
+
i
*
108
;
// cc.log("字体宽度:" + (856
+ iTitleWidth + 16 + i * 108));
nodeShadow
.
getComponent
(
cc
.
Widget
).
left
=
652
+
iTitleWidth
+
16
+
i
*
108
;
}
this
.
_strEpisodeImg
=
oJSONResult
.
resultSet
[
0
].
images
.
list
[
0
].
fileUrl
;
...
...
@@ -359,7 +359,7 @@ cc.Class({
if
(
0
==
nodeInitFocus
.
name
.
indexOf
(
'Button'
))
{
this
.
_cFocus
.
hide
();
cc
.
loader
.
loadRes
(
"GameDetail/icon_button_open"
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
nodeInitFocus
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
nodeInitFocus
.
height
,
nodeInitFocus
.
width
,
nodeInitFocus
.
height
));
nodeInitFocus
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
72
,
278
,
72
));
});
}
...
...
@@ -500,13 +500,13 @@ cc.Class({
if
(
0
==
fiFrom
.
node
.
getName
().
indexOf
(
'ButtonOpen'
))
{
cc
.
loader
.
loadRes
(
"GameDetail/icon_button_open"
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
fiFrom
.
node
.
width
,
fiFrom
.
node
.
height
));
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
278
,
72
));
});
}
if
(
0
==
fiFrom
.
node
.
getName
().
indexOf
(
'ButtonVip'
))
{
cc
.
loader
.
loadRes
(
"GameDetail/icon_banner"
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
fiFrom
.
node
.
width
,
fiFrom
.
node
.
height
));
fiFrom
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
0
,
572
,
72
));
});
}
...
...
@@ -535,14 +535,14 @@ cc.Class({
if
(
0
==
fiTo
.
node
.
getName
().
indexOf
(
'ButtonOpen'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
"GameDetail/icon_button_open"
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
fiTo
.
node
.
height
,
fiTo
.
node
.
width
,
fiTo
.
node
.
height
));
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
72
,
278
,
72
));
});
}
if
(
0
==
fiTo
.
node
.
getName
().
indexOf
(
'ButtonVip'
))
{
// fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
cc
.
loader
.
loadRes
(
"GameDetail/icon_banner"
,
cc
.
Texture2D
,
function
(
err
,
texture
)
{
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
fiTo
.
node
.
height
,
fiTo
.
node
.
width
,
fiTo
.
node
.
height
));
fiTo
.
node
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
,
cc
.
rect
(
0
,
72
,
572
,
72
));
});
}
},
...
...
assets/resources/data_template/game_detail_type_list.json
View file @
9f06fd5
...
...
@@ -11,8 +11,8 @@
"extension"
:
".png"
,
"enable"
:
true
,
"fileUrl"
:
"GameDetail/AR环保课堂.jpg"
,
"width"
:
368
,
"height"
:
227
"width"
:
270
,
"height"
:
152
}
]
},
...
...
@@ -23,8 +23,8 @@
"extension"
:
".png"
,
"enable"
:
true
,
"fileUrl"
:
"GameDetail/AR环保课堂2.jpg"
,
"width"
:
368
,
"height"
:
227
"width"
:
270
,
"height"
:
152
}
]
},
...
...
@@ -35,8 +35,8 @@
"extension"
:
".png"
,
"enable"
:
true
,
"fileUrl"
:
"GameDetail/AR环保课堂3.jpg"
,
"width"
:
368
,
"height"
:
227
"width"
:
270
,
"height"
:
152
}
]
},
...
...
@@ -47,8 +47,8 @@
"extension"
:
".png"
,
"enable"
:
true
,
"fileUrl"
:
"GameDetail/icon_game.png"
,
"width"
:
368
,
"height"
:
227
"width"
:
270
,
"height"
:
152
}
]
},
...
...
@@ -59,8 +59,8 @@
"extension"
:
".png"
,
"enable"
:
true
,
"fileUrl"
:
"GameDetail/icon_game.png"
,
"width"
:
368
,
"height"
:
227
"width"
:
270
,
"height"
:
152
}
]
}
...
...
Please
register
or
sign in
to post a comment