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
edac4bc5
...
edac4bc534d0ba9d1769384503bc610d137afcc1
authored
2020-03-17 14:27:23 +0800
by
金学艇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改走马灯内容在main_layout.json中加载
1 parent
537a48d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
assets/Script/gameDetail.js
assets/Script/main.js
assets/resources/data_template/main_layout.json
assets/Script/gameDetail.js
View file @
edac4bc
...
...
@@ -287,7 +287,7 @@ cc.Class({
cc
.
find
(
"Desc/LabelDesc"
,
this
.
node
).
getComponent
(
cc
.
Label
).
string
=
description
;
//搞标签
let
iTitleWidth
=
cc
.
find
(
"Desc/Title"
,
this
.
node
).
width
;
let
aTag
=
oJSONResult
.
resultSet
[
0
].
tag
.
split
(
"
,
"
);
let
aTag
=
oJSONResult
.
resultSet
[
0
].
tag
.
split
(
"
)
"
);
// cc.log("tag数量:" + aTag.length);
for
(
let
i
=
0
;
i
<
aTag
.
length
;
i
++
)
{
if
(
!
aTag
[
i
])
continue
;
...
...
assets/Script/main.js
View file @
edac4bc
...
...
@@ -108,8 +108,6 @@ cc.Class({
//搞轮播图
this
.
initViewPager
();
//搞通知框
this
.
initNotifyBox
();
//升级相关
this
.
getUpdateDesc
();
this
.
getMainLayoutJsonRequest
();
...
...
@@ -153,19 +151,6 @@ cc.Class({
},
this
,
"uuid"
);
},
initNotifyBox
:
function
()
{
let
nodeLabel
=
cc
.
find
(
"scrollContent/notify/Label"
,
this
.
node
);
nodeLabel
.
width
=
656
;
let
compMarquee
=
nodeLabel
.
addComponent
(
"Marquee"
);
compMarquee
.
active
=
true
;
let
aStrLabel
=
[];
aStrLabel
[
0
]
=
"111王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! "
;
aStrLabel
[
1
]
=
"222王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! "
;
aStrLabel
[
2
]
=
"333王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! "
;
compMarquee
.
init
(
null
,
aStrLabel
);
compMarquee
.
setUIWithFocus
();
},
//升级框内容
getUpdateDesc
:
function
()
{
let
updateTitle
=
cc
.
find
(
"update/update_panel/update_title"
,
this
.
node
);
...
...
@@ -198,6 +183,10 @@ cc.Class({
// cc.log("远程数据:"+strResponse);
var
oJSONResult
=
JSON
.
parse
(
strResponse
);
self
.
_oInit
.
oMainLayoutJson
=
oJSONResult
;
//走马灯数据=========
this
.
_oInit
.
aMarquee
=
oJSONResult
.
marquee
.
split
(
";"
);
// cc.log("走马灯获取的数据:" + this._oInit.aMarquee[1]);
//=========
self
.
getTopNaviRequest
(
"topNavi"
);
self
.
getTopNaviRequest
(
"topCell"
);
...
...
@@ -216,6 +205,8 @@ cc.Class({
cc
.
find
(
"scrollContent/BlockShadow"
,
this
.
node
).
active
=
false
;
}
//搞通知框
this
.
initNotifyBox
();
}
catch
(
error
)
{
cc
.
log
(
"Business Exception:Get getMainLayoutJsonRequest..."
+
error
);
}
...
...
@@ -225,6 +216,16 @@ cc.Class({
},
this
,
"uuid"
);
},
//走马灯通知
initNotifyBox
:
function
()
{
let
nodeLabel
=
cc
.
find
(
"scrollContent/notify/Label"
,
this
.
node
);
nodeLabel
.
width
=
656
;
let
compMarquee
=
nodeLabel
.
addComponent
(
"Marquee"
);
compMarquee
.
active
=
true
;
compMarquee
.
init
(
null
,
this
.
_oInit
.
aMarquee
);
compMarquee
.
setUIWithFocus
();
},
//请求顶部个人中心和订购按钮
getTopNaviRequest
:
function
(
strCellName
)
{
// Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_layout.json", null, null,
...
...
assets/resources/data_template/main_layout.json
View file @
edac4bc
...
...
@@ -3,6 +3,7 @@
"name"
:
"首页"
,
"code"
:
"eb954b1e-712e-415c-ba27-ddcf60f64adf"
,
"layout"
:
"absolute"
,
"marquee"
:
"111王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! ;222王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! ;333王者佩奇:我已打卡消耗110卡路里,来和我玩同款【竞技运动】小游戏吧! "
,
"children"
:
[
{
"name"
:
"Navigator"
,
...
...
Please
register
or
sign in
to post a comment