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
db8a8b11
...
db8a8b116f41f873caaecb0d935da1accb2f4262
authored
2020-03-20 18:07:38 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改部分详情页
1 parent
ec8ef34c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
43 deletions
assets/Script/videoDetail.js
assets/resources/Prefab/pfbMovieDetailEpisodeCell.prefab
assets/resources/data_template/video_filecode_map_supercid.json
assets/Script/videoDetail.js
View file @
db8a8b1
...
...
@@ -66,27 +66,27 @@ cc.Class({
this
.
_nodeEpisodeListWrapper
=
cc
.
find
(
"EpisodeArea/EpisodeListWrapper"
,
this
.
node
);
this
.
_nodeEpisodeList
=
cc
.
find
(
"EpisodeList"
,
this
.
_nodeEpisodeListWrapper
);
this
.
initPrefab
();
//
this.initPrefab();
this
.
checkPfbReadyAndInitPage
();
this
.
checkDataReadyAndInitFocus
();
},
initPrefab
:
function
()
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
nodeEpisodeCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
nodeEpisodeCell
.
x
=
nodeEpisodeCell
.
width
/
2
+
(
i
)
*
(
nodeEpisodeCell
.
width
+
20
);
this
.
_nodeEpisodeList
.
addChild
(
nodeEpisodeCell
,
10
,
"EpisodeListCell"
+
i
);
let
fiEpisodeBlock
=
nodeEpisodeCell
.
addComponent
(
FocusInfo
);
fiEpisodeBlock
.
init
(
'{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgramPlayerFullScreen"}}]}'
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'episode_list_cell_'
+
i
]
=
nodeEpisodeCell
;
// let borderX = nodeEpisodeCell.x - nodeEpisodeCell.width / 2; //搞边框
// let borderY = nodeEpisodeCell.y - nodeEpisodeCell.height / 2;
// this._graphicsLine.roundRect(borderX, borderY, 278, 175, 20);//圆角矩形路径
// this._graphicsLine.stroke(); //绘制路径
}
},
//
initPrefab: function () {
//
for (let i = 0; i < 4; i++) {
//
let nodeEpisodeCell = cc.instantiate(this.PFB_EPISODE);
//
nodeEpisodeCell.x = nodeEpisodeCell.width / 2 + (i) * (nodeEpisodeCell.width + 20);
//
this._nodeEpisodeList.addChild(nodeEpisodeCell, 10, "EpisodeListCell" + i);
//
let fiEpisodeBlock = nodeEpisodeCell.addComponent(FocusInfo);
//
fiEpisodeBlock.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgramPlayerFullScreen"}}]}'
//
, true, null, null, 1.0);
//
this._aFocusTargets[0]['episode_list_cell_' + i] = nodeEpisodeCell;
//
// let borderX = nodeEpisodeCell.x - nodeEpisodeCell.width / 2; //搞边框
//
// let borderY = nodeEpisodeCell.y - nodeEpisodeCell.height / 2;
//
// this._graphicsLine.roundRect(borderX, borderY, 278, 175, 20);//圆角矩形路径
//
// this._graphicsLine.stroke(); //绘制路径
//
}
//
},
getGatherDetailList
:
function
()
{
Network
.
ajax
(
"GET"
,
Common
.
TOPDRAW_API_SERVER
+
"videoDetail/movie_detail_list_by_media.json"
,
null
,
null
,
...
...
@@ -96,25 +96,13 @@ cc.Class({
this
.
_oEpisode
=
oJSONResult
;
if
(
oJSONResult
.
businessCode
==
'success'
)
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
let
nodeEpisodeListCell
=
this
.
_nodeEpisodeList
.
getChildByName
(
"EpisodeListCell"
+
i
);
if
(
i
>=
oJSONResult
.
resultSet
.
length
)
{
//数据较少时隐藏其他多余预制体
nodeEpisodeListCell
.
active
=
false
;
//
continue
;
}
nodeEpisodeListCell
.
active
=
true
;
//恢复预制可见及可点击
let
nodeEpisodeListCell
=
cc
.
instantiate
(
this
.
PFB_EPISODE
);
nodeEpisodeCell
.
x
=
nodeEpisodeCell
.
width
/
2
+
(
i
)
*
(
nodeEpisodeCell
.
width
+
20
);
cc
.
find
(
"EpisodeNum/Text"
,
nodeEpisodeListCell
).
getComponent
(
cc
.
Label
).
string
=
oJSONResult
.
resultSet
[
i
].
name
;
// cc.find("TopArea/Name/NormalName/MidName", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText1", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText2", nodeGatherDetailListCell).getComponent(cc.Label).string = oJSONResult.resultSet[i].name;
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText1", nodeGatherDetailListCell).getComponent(cc.Label)._updateRenderData(true);
// cc.find("TopArea/Name/ActiveName/NameContainer/NameText/NameText2", nodeGatherDetailListCell).getComponent(cc.Label)._updateRenderData(true);
let
fiBlock
=
nodeEpisodeListCell
.
getComponent
(
FocusInfo
);
fiBlock
.
setTVLink
(
'{"click":[{"action":"ChangeScene","parameters":{"sceneName":"sceneProgramPlayerFullScreen",\
"appId":"'
+
this
.
_strAppId
+
'","id":"'
+
this
.
_iMediaId
+
'","episodeNum":"'
+
oJSONResult
.
resultSet
[
i
].
index
+
'",\
"mediaCode":"'
+
oJSONResult
.
resultSet
[
i
].
code
+
'","name":"'
+
oJSONResult
.
resultSet
[
i
].
name
+
'"}}]}'
);
let
fiEpisodeBlock
=
nodeEpisodeCell
.
addComponent
(
FocusInfo
);
fiEpisodeBlock
.
init
(
''
,
true
,
null
,
null
,
1.0
);
this
.
_aFocusTargets
[
0
][
'episode_list_cell_'
+
i
]
=
nodeEpisodeCell
;
}
if
(
!
this
.
_bIsNaviDataInit
)
{
...
...
assets/resources/Prefab/pfbMovieDetailEpisodeCell.prefab
View file @
db8a8b1
...
...
@@ -43,8 +43,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
278
,
"height":
49
"width":
104
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -119,8 +119,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
278
,
"height":
175
"width":
104
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -235,8 +235,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
278
,
"height":
49
"width":
104
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -311,8 +311,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
278
,
"height":
49
"width":
104
,
"height":
60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -430,7 +430,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
278
,
"width":
104
,
"height": 49
},
"_anchorPoint": {
...
...
assets/resources/data_template/video_filecode_map_supercid.json
0 → 100644
View file @
db8a8b1
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment