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
1a20c129
...
1a20c1299984ea0ccfbe6cd5045ea778b6b8fd6b
authored
2020-04-14 19:51:40 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
supercid和cid从js端获取便于后续更新
专门给福建渠道造个fujian_main_recommend.json
1 parent
ec058611
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
457 additions
and
17 deletions
assets/Script/main.js
assets/Script/videoDetail.js
assets/resources/data_template/game_test_detail_list_by_ids.json → assets/resources/data_template/fujian_get_movie_detail.json
assets/resources/data_template/fujian_main_recommend.json
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/common/TopdrawSDKWrapper.java
assets/Script/main.js
View file @
1a20c12
...
...
@@ -380,7 +380,7 @@ cc.Class({
this
.
getRightRecommendRequest
();
return
;
}
Network
.
ajax
(
"GET"
,
Common
.
TOPDRAW_API_SERVER
+
"main/main_recommend.json"
,
null
,
null
,
Network
.
ajax
(
"GET"
,
Common
.
TOPDRAW_API_SERVER
+
"main/
fujian_
main_recommend.json"
,
null
,
null
,
function
(
strResponse
)
{
try
{
this
.
_oInit
.
main_recommend
=
strResponse
;
...
...
@@ -1439,10 +1439,6 @@ cc.Class({
doCurrentFocusTVLinkAction
:
function
(
strAction
)
{
let
strTVLink
=
this
.
_fiCurrentFocus
.
getTVLink
();
//福建测试视频播放功能
if
(
strTVLink
==
"{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"0\"}}]}"
)
{
strTVLink
=
"{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneVideoDetail\"}}]}"
;
}
cc
.
log
(
"tvlink==============="
+
strTVLink
);
// cc.log("tvlink===============" + this._oSceneContext._iPageIndex);
try
{
...
...
assets/Script/videoDetail.js
View file @
1a20c12
...
...
@@ -149,7 +149,7 @@ cc.Class({
//获取节目详情
checkPfbReadyAndInitPage
:
function
()
{
var
self
=
this
;
Network
.
ajax
(
"GET"
,
Common
.
TOPDRAW_API_SERVER
+
"videoDetail/
game_test_detail_list_by_ids
.json"
,
null
,
null
,
Network
.
ajax
(
"GET"
,
Common
.
TOPDRAW_API_SERVER
+
"videoDetail/
fujian_get_movie_detail
.json"
,
null
,
null
,
function
(
strResponse
)
{
try
{
var
oJSONResult
=
JSON
.
parse
(
strResponse
);
...
...
@@ -185,8 +185,18 @@ cc.Class({
this
.
getGatherDetailList
();
//获取剧集列表
// this.getPlayURLAndPlay();//先改为从java获取
//将fileCode修改成符合规范的格式
//给String扩展一个replaceAll方法
String
.
prototype
.
replaceAll
=
function
(
FindText
,
RepText
)
{
let
regExp
=
new
RegExp
(
FindText
,
'g'
);
return
this
.
replace
(
regExp
,
RepText
);
};
if
(
this
.
_oInit
!=
null
)
{
this
.
_oInit
.
fileCode
=
(
this
.
_oInit
.
fileCode
.
substring
(
this
.
_oInit
.
fileCode
.
indexOf
(
"_"
)
+
1
,
this
.
_oInit
.
fileCode
.
lastIndexOf
(
"_"
))).
replaceAll
(
"-"
,
""
);
}
cc
.
log
(
"fileCode| "
+
this
.
_oInit
.
fileCode
+
" | supercid |"
+
this
.
_oInit
.
supercid
+
" | cid | "
+
this
.
_oInit
.
cid
);
if
(
cc
.
sys
.
isNative
)
{
jsb
.
reflection
.
callStaticMethod
(
"org/cocos2dx/javascript/common/TopdrawSDKWrapper"
,
"getPlayUrl"
,
"(Ljava/lang/String;
)V"
,
"getPlayURLAndPlay"
);
jsb
.
reflection
.
callStaticMethod
(
"org/cocos2dx/javascript/common/TopdrawSDKWrapper"
,
"getPlayUrl"
,
"(Ljava/lang/String;
Ljava/lang/String;Ljava/lang/String;)V"
,
this
.
_oInit
.
supercid
,
this
.
_oInit
.
cid
,
"getPlayURLAndPlay"
);
}
}
else
{
...
...
@@ -220,7 +230,7 @@ cc.Class({
}
},
getPlayURLAndPlay
:
function
(
playUrl
,
mediaCode
)
{
getPlayURLAndPlay
:
function
(
playUrl
)
{
try
{
cc
.
log
(
"videoDetail.js -> getPlayURLAndPlay | "
+
playUrl
);
this
.
_ComOperation
.
initPlayer
(
64
,
56
,
564
,
317
,
true
,
true
);
//这里采用左右边距对应android坐标 fix jerry
...
...
@@ -228,7 +238,7 @@ cc.Class({
let
options
=
{};
// options.playurl = this._oInit.url;
options
.
playurl
=
playUrl
;
options
.
fileCode
=
media
Code
;
options
.
fileCode
=
this
.
_oInit
.
file
Code
;
this
.
_ComOperation
.
setURL
(
options
);
//测试播放地址
}
catch
(
error
)
{
if
(
cc
.
sys
.
isNative
)
{
...
...
assets/resources/data_template/
game_test_detail_list_by_ids
.json
→
assets/resources/data_template/
fujian_get_movie_detail
.json
View file @
1a20c12
...
...
@@ -3,9 +3,12 @@
"count"
:
1
,
"resultSet"
:
[
{
"name"
:
"
专注力 (21个亲子游戏)
"
,
"name"
:
"
魔法啥拉
"
,
"episode_number"
:
15
,
"current_episode_number"
:
15
,
"fileCode"
:
"file_997b7cb4-573c-4916-b575-4c0bc9476f9b_TS4M1080p"
,
"supercid"
:
"42dab385e29e4f0f99c3513939815a2c"
,
"cid"
:
"898abfacb6a34c19b36708ebb43ad044"
,
"description"
:
"简介:作为人气作品《魔法沙拉》的全新续作,《魔法沙拉2》拥有3个全3个全新的玩法模式:爽快到炸裂的竞速模式,诙谐幽默的娱乐模式3个全以及紧张刺激的挑战模式,都将让您感受到完全不一样......"
,
"url"
:
"http://mirror.aarnet.edu.au/pub/TED-talks/911Mothers_2010W-480p.mp4"
,
"images"
:
{
...
...
assets/resources/data_template/fujian_main_recommend.json
0 → 100644
View file @
1a20c12
{
"name"
:
"Recommend"
,
"resultSet"
:
[
{
"name"
:
"ViewPager"
,
"height"
:
358
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame1"
,
"resultSet"
:
[
{
"name"
:
"Carousel0"
,
"code"
:
"promotionItem_fd456495-2e32-44e1-9d92-q4ert34"
,
"left"
:
64
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/block1_1.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.cake
\"
}}]}"
,
"width"
:
270
,
"height"
:
167
},
{
"name"
:
"dailyRecommend"
,
"code"
:
"promotionItem_4ca66642-33d0-41c9-9913-g5erhwgw5er"
,
"left"
:
64
,
"top"
:
191
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.candy
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block1_2.png"
,
"width"
:
270
,
"height"
:
167
}
]
}
},
{
"name"
:
"轮播下方图片"
,
"height"
:
167
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame1"
,
"resultSet"
:
[
{
"name"
:
"Carousel1"
,
"code"
:
"promotionItem_fd456495-2e32-44e1-9d92-450227d4afa3"
,
"left"
:
64
,
"top"
:
0
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.shuyishu
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block2_1.png"
,
"width"
:
270
,
"height"
:
167
},
{
"name"
:
"dailyRecommend2"
,
"code"
:
"promotionItem_4ca66642-33d0-41c9-9913-df131a79a375"
,
"left"
:
359
,
"top"
:
0
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.orbbec.motor
\"
,
\"
activityName
\"
:
\"
com.orbbec.u3d.OrbbecActivity
\"
,
\"
downloadUrl
\"
:
\"
apk/com.orbbec.motor_v1.2.11_20190704.apk
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block2_2.jpg"
,
"width"
:
270
,
"height"
:
167
},
{
"name"
:
"dailyRecommend3"
,
"code"
:
"promotionItem_c5f58c16-48a5-4796-ab52-rwvh6u5j55"
,
"left"
:
652
,
"top"
:
0
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.orbbec.garbage
\"
,
\"
activityName
\"
:
\"
com.orbbec.u3d.OrbbecActivity
\"
,
\"
downloadUrl
\"
:
\"
apk/com.orbbec.garbage_v2.0.8_bc6_20190826.apk
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block2_3.png"
,
"width"
:
270
,
"height"
:
167
},
{
"name"
:
"dailyRecommend4"
,
"code"
:
"promotionItem_c5f58c16-48a5-4796-ab52-41679fc88a6d"
,
"left"
:
946
,
"top"
:
0
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.guesscolor
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block2_4.png"
,
"width"
:
270
,
"height"
:
167
}
]
}
},
{
"name"
:
"特色推荐"
,
"height"
:
153
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame2"
,
"resultSet"
:
[
{
"name"
:
"Title"
,
"code"
:
"promotionItem_8a4a1762-22e8-4a1e-ae4yh54hw5"
,
"left"
:
63
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/font_2.png"
,
"width"
:
128
,
"height"
:
45
,
"disable"
:
true
},
{
"name"
:
"SpecialList"
,
"layout"
:
"horizontal"
,
"position"
:
[
63
,
60
],
"width"
:
1153
,
"height"
:
88
,
"disable"
:
true
,
"childrenSize"
:
[
172
,
88
],
"childrenMargin"
:
[
16
,
24
,
0
,
0
],
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"subjectList"
,
"resultSet"
:
[
{
"name"
:
"Subject1"
,
"imageURL"
:
"upload/image/main/block4_1.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
0
\"
}}]}"
,
"code"
:
"promotionItem_e432ac2d-c1f3-4daehr4w5g4w5yh4w5yh"
},
{
"name"
:
"Subject2"
,
"imageURL"
:
"upload/image/main/block4_2.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
1
\"
}}]}"
,
"code"
:
"promotionItem_f90b7ff3-1f36-401erhb54wyh4th"
},
{
"name"
:
"Subject3"
,
"imageURL"
:
"upload/image/main/block4_3.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
2
\"
}}]}"
,
"code"
:
"promotionItem_e29b33e4-8954-4eerthy6rthg54er"
},
{
"name"
:
"Subject4"
,
"imageURL"
:
"upload/image/main/block4_4.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
3
\"
}}]}"
,
"code"
:
"promotionItem_e29b33e4-8954-vwregv54thw6"
},
{
"name"
:
"Subject5"
,
"imageURL"
:
"upload/image/main/block4_5.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
4
\"
}}]}"
,
"code"
:
"promotionItem_e29b33e4-8954-bq4wrjhwbt4t"
},
{
"name"
:
"Subject6"
,
"imageURL"
:
"upload/image/main/block4_6.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameCategory
\"
,
\"
currentIndex
\"
:
\"
5
\"
}}]}"
,
"code"
:
"promotionItem_57aea4b3-7716-4we5j56trhgser2"
}
]
},
"dataTmpl"
:
"tmplPromotionGroupCell2"
,
"childClass"
:
"subject_list_cell"
}
]
}
},
{
"name"
:
"热门必玩上方图"
,
"height"
:
258
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame3"
,
"resultSet"
:
[
{
"name"
:
"Title"
,
"code"
:
"promotionItem_ca662698-17fe-436b-erhtrehgw4e54"
,
"left"
:
63
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/font_3.png"
,
"width"
:
158
,
"height"
:
45
,
"disable"
:
true
},
{
"name"
:
"SingerList1"
,
"code"
:
"promotionItem_0a911d4c-9223-4d49-se5hj54uh4w5g45w"
,
"left"
:
63
,
"top"
:
61
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.Orbbec.MortaKombat
\"
,
\"
activityName
\"
:
\"
com.orbbec.u3d.OrbbecActivity
\"
,
\"
downloadUrl
\"
:
\"
apk/com.Orbbec.MortaKombat_v2.1.4_bc55_20190717_Release.apk
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block5_1.jpg"
,
"width"
:
564
,
"height"
:
228
},
{
"name"
:
"SingerList2"
,
"code"
:
"promotionItem_c388af5a-0351-43c4-e5sjhu45h54wh45h"
,
"left"
:
653
,
"top"
:
61
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.Orbbec.MortaKombat
\"
,
\"
activityName
\"
:
\"
com.orbbec.u3d.OrbbecActivity
\"
,
\"
downloadUrl
\"
:
\"
apk/com.Orbbec.MortaKombat_v2.1.4_bc55_20190717_Release.apk
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block5_1.jpg"
,
"width"
:
564
,
"height"
:
228
}
]
}
},
{
"name"
:
"热门必玩下方图"
,
"height"
:
252
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame3"
,
"resultSet"
:
[
{
"name"
:
"SingerList3"
,
"code"
:
"promotionItem_c388af5a-0351-43c4we5jh45j45jh54hj"
,
"left"
:
63
,
"top"
:
24
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.candy
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block5_3.png"
,
"width"
:
368
,
"height"
:
228
},
{
"name"
:
"SingerList4"
,
"code"
:
"promotionItem_c388af5a-0351-43c4j56j54hw4h54"
,
"left"
:
456
,
"top"
:
24
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.shuyishu
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block5_4.png"
,
"width"
:
368
,
"height"
:
228
},
{
"name"
:
"SingerList5"
,
"code"
:
"promotionItem_c388af5a-0351-43c4-w45jh45h54h5h"
,
"left"
:
848
,
"top"
:
24
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.haidao
\"
}}]}"
,
"imageURL"
:
"upload/image/main/block5_5.png"
,
"width"
:
368
,
"height"
:
228
}
]
}
},
{
"name"
:
"block高分排行榜"
,
"height"
:
329
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame2"
,
"resultSet"
:
[
{
"name"
:
"Title"
,
"code"
:
"promotionItem_8a4a1762-22e8-4a1e5h45g45g545gw"
,
"left"
:
63
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/font_4.png"
,
"width"
:
158
,
"height"
:
45
,
"disable"
:
true
},
{
"name"
:
"highScore"
,
"layout"
:
"horizontal"
,
"position"
:
[
61
,
60
],
"width"
:
1153
,
"disable"
:
true
,
"childrenSize"
:
[
172
,
268
],
"childrenMargin"
:
[
0
,
23
,
0
,
0
],
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"subjectList"
,
"resultSet"
:
[
{
"name"
:
"AR环保课堂"
,
"imageURL"
:
"upload/image/main/AR环保课堂172-228.png"
,
"title_visible"
:
1
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.orbbec.garbage
\"
,
\"
activityName
\"
:
\"
com.orbbec.u3d.OrbbecActivity
\"
,
\"
downloadUrl
\"
:
\"
apk/com.orbbec.garbage_v2.0.8_bc6_20190826.apk
\"
}}]}"
,
"code"
:
"highScore_e432ac2d-c1f3-4d44es5h5eg5wrht1"
},
{
"name"
:
"猜猜我是谁"
,
"imageURL"
:
"upload/image/main/猜猜我是谁172-228.png"
,
"title_visible"
:
1
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.guess
\"
}}]}"
,
"code"
:
"highScore_f90b7ff3-1f36-40serhr5h45h"
},
{
"name"
:
"飞檐走壁"
,
"imageURL"
:
"upload/image/main/飞檐走壁172-228.png"
,
"title_visible"
:
1
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.feiyanzoubi
\"
}}]}"
,
"code"
:
"highScore_e29b33e4wegverger"
},
{
"name"
:
"欢乐叠蛋糕"
,
"imageURL"
:
"upload/image/main/欢乐叠蛋糕172-228.png"
,
"title_visible"
:
1
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.cake
\"
}}]}"
,
"code"
:
"highScore_57aea4b3-7716-awergebvetrhbbre"
},
{
"name"
:
"火箭小象"
,
"imageURL"
:
"upload/image/main/火箭小象172-228.png"
,
"title_visible"
:
1
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.bird
\"
}}]}"
,
"code"
:
"highScore_57aea4b3-7716-42awrebverfbv"
},
{
"name"
:
"记忆翻牌"
,
"imageURL"
:
"upload/image/main/记忆翻牌172-228.png"
,
"title_visible"
:
1
,
"tvlink2"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.orbbec.basketball
\"
}}]}"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneGameDetail
\"
,
\"
packageName
\"
:
\"
com.topdraw.xhx.fanpai
\"
}}]}"
,
"code"
:
"highScore_57aea4b3-7716-4224-bc77-43272c35ee32"
}
]
},
"dataTmpl"
:
"tmplPromotionGroupCell2"
,
"childClass"
:
"subject_list_cell"
}
]
}
},
{
"name"
:
"block适龄游戏"
,
"height"
:
259
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame2"
,
"resultSet"
:
[
{
"name"
:
"Title"
,
"code"
:
"promotionItem_8a4a1762-22e8-4a1e-8ce3-1fe81412855a"
,
"left"
:
63
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/font_5.png"
,
"width"
:
126
,
"height"
:
45
,
"disable"
:
true
},
{
"name"
:
"SubjectList"
,
"layout"
:
"horizontal"
,
"position"
:
[
61
,
60
],
"width"
:
1153
,
"disable"
:
true
,
"childrenSize"
:
[
270
,
167
],
"childrenMargin"
:
[
0
,
24
,
0
,
0
],
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"subjectList"
,
"resultSet"
:
[
{
"name"
:
"Subject1"
,
"imageURL"
:
"upload/image/main/block7_1.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneVideoDetail
\"
}}]}"
,
"code"
:
"promotionItem_e432ac2d-c1f3-4d44-a42b-7000971affa1"
},
{
"name"
:
"Subject2"
,
"imageURL"
:
"upload/image/main/block7_2.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneVideoDetail
\"
}}]}"
,
"code"
:
"promotionItem_f90b7ff3-1f36-4019-9e77-cef871902343"
},
{
"name"
:
"Subject3"
,
"imageURL"
:
"upload/image/main/block7_3.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneVideoDetail
\"
}}]}"
,
"code"
:
"promotionItem_e29b33e4-8954-4ef9-a6fc-0d844c909c67"
},
{
"name"
:
"Subject4"
,
"imageURL"
:
"upload/image/main/block7_4.png"
,
"tvlink"
:
"{
\"
click
\"
:[{
\"
action
\"
:
\"
ChangeScene
\"
,
\"
parameters
\"
:{
\"
sceneName
\"
:
\"
sceneVideoDetail
\"
}}]}"
,
"code"
:
"promotionItem_57aea4b3-7716-4FGRACWGVRTee32"
}
]
},
"dataTmpl"
:
"tmplPromotionGroupCell2"
,
"childClass"
:
"subject_list_cell"
}
]
}
},
{
"name"
:
"backToTop"
,
"height"
:
92
,
"hasChildFrame"
:
true
,
"data"
:
{
"name"
:
"frame7"
,
"resultSet"
:
[
{
"name"
:
"backToTop"
,
"code"
:
"promotionItem_f3975526-213a-4292-95ea-ab39897e1560"
,
"left"
:
536
,
"top"
:
0
,
"imageURL"
:
"upload/image/main/icon_back.png"
,
"width"
:
216
,
"height"
:
88
,
"containerId"
:
"back2Top"
}
]
}
}
]
}
\ No newline at end of file
build/jsb-link/frameworks/runtime-src/proj.android-studio/app/src/org/cocos2dx/javascript/common/TopdrawSDKWrapper.java
View file @
1a20c12
...
...
@@ -64,16 +64,16 @@ public class TopdrawSDKWrapper {
return
MelodyApplication
.
sdk
.
getUserID
();
}
public
static
void
getPlayUrl
(
final
String
strJSCallBack
)
{
public
static
void
getPlayUrl
(
final
String
str
Supercid
,
final
String
strCid
,
final
String
str
JSCallBack
)
{
Log
.
d
(
TAG
,
"getPlayUrl start..."
+
strJSCallBack
);
String
epgServer
=
CommonUtils
.
getServer
(
_activity
)
+
HTTP_AUTHORIZE
;
String
token
=
CommonUtils
.
getToken
(
_activity
);
String
supercid
=
"42dab385e29e4f0f99c3513939815a2c"
;
//测试用例 电视剧则使用掐头去尾及"-"的mediaCode,电影或单片使用"-1"
String
supercid
=
strSupercid
;
//测试用例 电视剧则使用掐头去尾及"-"的mediaCode,电影或单片使用"-1"
String
businessType
=
"1"
;
// 业务类型,1:vod、2:LIVETV。新cp大多是注入点播,此处填1即可
String
contentType
=
"0"
;
// 内容类型,0:视频VOD、1:视频频道、300:节目单。同businessType相似,此处填0即可。
String
playType
=
"1"
;
// 必填,根据demo固定为1,文档未说明该字段
String
tid
=
"-1"
;
// 栏目编号,OTT大屏的cp点播注入不涉及绑定栏目,此处统一填写为-1
String
cid
=
"898abfacb6a34c19b36708ebb43ad044"
;
//测试用例 电视剧的单集使用掐头去尾及"-"的episodeCode,电影单片使用掐头去尾及"-"的mediaCode
String
cid
=
strCid
;
//测试用例 电视剧的单集使用掐头去尾及"-"的episodeCode,电影单片使用掐头去尾及"-"的mediaCode
String
idflag
=
"1"
;
// 标识cid和supcid的编号类型,统一传1,标识编号为C2接口的内容code。这个字段必需提供,不提供会导致鉴权失败。
JSONObject
mapParams
=
new
JSONObject
();
...
...
@@ -103,15 +103,13 @@ public class TopdrawSDKWrapper {
JSONObject
joUrl
=
jaUrls
.
getJSONObject
(
0
);
if
(
null
!=
joUrl
)
{
final
String
strPlayURL
=
joUrl
.
getString
(
"playurl"
);
// final String mediaCode = joUrl.getString("mediacode");
final
String
mediaCode
=
"997b7cb4573c4916b5754c0bc9476f9b"
;
//测试写死
Log
.
d
(
TAG
,
"获取播放链接:"
+
strPlayURL
+
" | mediaCode | "
+
mediaCode
);
Log
.
d
(
TAG
,
"获取播放链接:"
+
strPlayURL
);
_activity
.
runOnGLThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
Cocos2dxJavascriptJavaBridge
.
evalString
(
"cc.find('Canvas',cc.director.getScene()).getComponent(cc.Topdraw.TVCanvas)."
+
strJSCallBack
+
"('"
+
strPlayURL
+
"'
,'"
+
mediaCode
+
"'
);"
"cc.find('Canvas',cc.director.getScene()).getComponent(cc.Topdraw.TVCanvas)."
+
strJSCallBack
+
"('"
+
strPlayURL
+
"');"
);
}
...
...
Please
register
or
sign in
to post a comment