Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
457eabf4
Commit
457eabf4
authored
Mar 05, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bbb86211
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
23 deletions
+107
-23
MainBase.ts
egret/libs/new_wx/MainBase.ts
+17
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+38
-23
getAdBtn.ts
egret/src/mapScene/getAdBtn.ts
+10
-0
getIconGroup.ts
egret/src/mapScene/getIconGroup.ts
+21
-0
getInviteBtn.ts
egret/src/mapScene/getInviteBtn.ts
+12
-0
getSignBtn.ts
egret/src/mapScene/getSignBtn.ts
+9
-0
No files found.
egret/libs/new_wx/MainBase.ts
View file @
457eabf4
...
...
@@ -478,6 +478,13 @@ export default class MainBase extends eui.UILayer {
})
}
getInviteInfo
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
getInviteInfo
(()
=>
{
r
();
})
});
}
getSignConfig
()
{
return
new
Promise
((
r
)
=>
{
...
...
@@ -518,6 +525,14 @@ export default class MainBase extends eui.UILayer {
});
}
hbRainBaseInfo
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
hbRainBaseInfo
(
async
()
=>
{
r
();
});
});
}
hcHome
()
{
return
new
Promise
((
r
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
...
...
@@ -545,6 +560,8 @@ export default class MainBase extends eui.UILayer {
this
.
getBackReward
(),
this
.
hcRedBoobBaseInfo
(),
this
.
getSignConfig
(),
this
.
getInviteInfo
(),
this
.
hbRainBaseInfo
(),
]);
//获取分享加体力的shareCode,不影响初始化场景,不进await
NetManager
.
ins
.
getUserShareCode
(()
=>
{
})
...
...
egret/src/mapScene/MapScene.ts
View file @
457eabf4
...
...
@@ -33,6 +33,10 @@ import TaskCenterIcon from "./icon/TaskCenterIcon";
import
HbBombIcon
from
"./icon/HbBombIcon"
;
import
{
createEffect1MovieClip
}
from
"../effect/createEffect1"
;
import
{
CodeChannels
}
from
"../panels/ShareCodePanel"
;
import
getIconGroup
from
"./getIconGroup"
;
import
getSignBtn
from
"./getSignBtn"
;
import
getAdBtn
from
"./getAdBtn"
;
import
getInviteBtn
from
"./getInviteBtn"
;
let
doHelpFlag
=
false
;
// let doScratchHelpFlag = false;
...
...
@@ -182,6 +186,8 @@ export default class MapScene extends Scene {
this
.
updateMyInfo
();
this
.
updateAdData
();
GDispatcher
.
dispatchEvent
(
"getInviteInfo"
);
// 查询邀请信息,控制邀请有礼角标
this
.
updateIconLayout
();
this
[
'avatar'
].
mask
=
this
[
'avatarMask'
];
if
(
getBgOn
()
&&
MapScene
[
'firstPlayBgTag'
]
==
true
)
{
...
...
@@ -803,6 +809,7 @@ export default class MapScene extends Scene {
if
(
!
success
||
!
res
.
data
)
{
return
;
}
const
flag
=
res
.
data
.
completeFlag
;
switch
(
true
)
{
case
(
flag
==
0
):
// 未完成
...
...
@@ -870,11 +877,18 @@ export default class MapScene extends Scene {
PanelCtrl
.
instance
.
show
(
'invite'
,
res
.
data
);
})
}
updateIcon
(){
//1234变化的情况
updateIconLayout
()
{
const
btnList
=
[];
if
(
getSignBtn
())
btnList
.
push
(
'signGroup'
);
if
(
getInviteBtn
())
btnList
.
push
(
'inviteGroup'
);
if
(
getAdBtn
())
btnList
.
push
(
'adBtn'
);
if
(
getIconGroup
())
btnList
.
push
(
'activitys'
);
//0不显示,否则显示
btnList
.
forEach
((
btnName
,
index
)
=>
{
const
btn
=
this
[
btnName
];
btn
.
y
=
172.57
+
index
*
150
;
});
this
[
'guideInner'
].
y
=
this
[
'activitys'
].
y
-
273
;
}
//////////////////////////////////////// 邀请有礼角标 //////////////////////////////////////////////
/**
...
...
@@ -888,6 +902,7 @@ export default class MapScene extends Scene {
if
(
!
success
||
!
res
.
data
)
{
return
;
}
this
.
updateIconLayout
();
const
flag
=
res
.
data
.
completeFlag
;
if
(
this
.
inviteTimer
)
{
this
.
inviteTimer
.
stop
();
...
...
@@ -897,8 +912,8 @@ export default class MapScene extends Scene {
this
[
"inviteGroup"
].
visible
=
true
;
this
[
"inviteGroup"
].
touchEnabled
=
true
;
if
(
!
mapAdvert
||
mapAdvert
.
enable
==
false
)
{
this
[
'activitys'
].
y
=
458
;
this
[
'guideInner'
].
y
=
185
;
//
this['activitys'].y = 458;
//
this['guideInner'].y = 185;
}
NetManager
.
ins
.
showLog
(
getlogItem
(
33
));
this
[
"inviteTipsBg"
].
visible
=
true
;
...
...
@@ -914,8 +929,8 @@ export default class MapScene extends Scene {
this
[
"inviteGroup"
].
visible
=
true
;
this
[
"inviteGroup"
].
touchEnabled
=
true
;
if
(
!
mapAdvert
||
mapAdvert
.
enable
==
false
)
{
this
[
'activitys'
].
y
=
458
;
this
[
'guideInner'
].
y
=
185
;
//
this['activitys'].y = 458;
//
this['guideInner'].y = 185;
}
this
[
"inviteTipsBg"
].
visible
=
true
;
this
[
"inviteTips"
].
visible
=
true
;
...
...
@@ -926,8 +941,8 @@ export default class MapScene extends Scene {
this
[
"inviteGroup"
].
visible
=
true
;
this
[
"inviteGroup"
].
touchEnabled
=
true
;
if
(
!
mapAdvert
||
mapAdvert
.
enable
==
false
)
{
this
[
'activitys'
].
y
=
458
;
this
[
'guideInner'
].
y
=
185
;
//
this['activitys'].y = 458;
//
this['guideInner'].y = 185;
}
NetManager
.
ins
.
showLog
(
getlogItem
(
33
));
this
[
"inviteTipsBg"
].
visible
=
false
;
...
...
@@ -937,8 +952,8 @@ export default class MapScene extends Scene {
this
[
"inviteGroup"
].
visible
=
true
;
this
[
"inviteGroup"
].
touchEnabled
=
true
;
if
(
!
mapAdvert
||
mapAdvert
.
enable
==
false
)
{
this
[
'activitys'
].
y
=
458
;
this
[
'guideInner'
].
y
=
185
;
//
this['activitys'].y = 458;
//
this['guideInner'].y = 185;
}
NetManager
.
ins
.
showLog
(
getlogItem
(
33
));
this
[
"inviteTipsBg"
].
visible
=
true
;
...
...
@@ -949,8 +964,8 @@ export default class MapScene extends Scene {
this
[
"inviteGroup"
].
visible
=
true
;
this
[
"inviteGroup"
].
touchEnabled
=
true
;
if
(
!
mapAdvert
||
mapAdvert
.
enable
==
false
)
{
this
[
'activitys'
].
y
=
458
;
this
[
'guideInner'
].
y
=
185
;
//
this['activitys'].y = 458;
//
this['guideInner'].y = 185;
}
NetManager
.
ins
.
showLog
(
getlogItem
(
33
));
this
[
"inviteTipsBg"
].
visible
=
false
;
...
...
@@ -959,13 +974,13 @@ export default class MapScene extends Scene {
case
(
flag
==
6
):
// 无入口
this
[
"inviteGroup"
].
visible
=
false
;
this
[
"inviteGroup"
].
touchEnabled
=
false
;
this
[
'adBtn'
].
y
=
323.76
;
//
this['adBtn'].y = 323.76;
if
(
mapAdvert
&&
mapAdvert
.
enable
)
{
this
[
'guideInner'
].
y
=
185
;
this
[
'activitys'
].
y
=
458
;
//
this['guideInner'].y = 185;
//
this['activitys'].y = 458;
}
else
{
this
[
'guideInner'
].
y
=
30
;
this
[
'activitys'
].
y
=
303.76
;
//
this['guideInner'].y = 30;
//
this['activitys'].y = 303.76;
}
break
;
default
:
...
...
@@ -1242,10 +1257,10 @@ export default class MapScene extends Scene {
})
}
updateSignBtn
(){
this
[
'signGroup'
].
visible
=
false
;
updateSignBtn
()
{
this
[
'signGroup'
].
visible
=
false
;
const
getSignConfig
=
DataManager
.
ins
.
getData
(
'getSignConfig'
);
if
(
getSignConfig
&&
getSignConfig
.
data
&&
getSignConfig
.
data
.
closeStatus
)
{
if
(
getSignConfig
&&
getSignConfig
.
data
&&
getSignConfig
.
data
.
closeStatus
)
{
this
[
'signGroup'
].
visible
=
true
;
}
...
...
egret/src/mapScene/getAdBtn.ts
0 → 100644
View file @
457eabf4
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
()
=>
{
const
hc_advert
:
any
=
DataManager
.
ins
.
getData
(
'hc_advert'
).
data
||
{};
let
{
mapAdvert
}
=
hc_advert
;
if
(
mapAdvert
==
null
)
mapAdvert
=
{
enable
:
false
,
advertList
:
[]
}
return
mapAdvert
.
enable
;
}
egret/src/mapScene/getIconGroup.ts
0 → 100644
View file @
457eabf4
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
export
default
()
=>
{
let
count
=
0
;
let
hc_redBombBaseInfo
=
DataManager
.
ins
.
getData
(
'hc_redBombBaseInfo'
);
if
(
hc_redBombBaseInfo
.
success
&&
hc_redBombBaseInfo
.
data
)
{
count
++
;
}
let
hbrain
=
DataManager
.
ins
.
getData
(
NetName
.
HBRAIN_BASEINFO
);
if
(
hbrain
.
success
&&
hbrain
.
data
)
{
const
data
=
hbrain
.
data
if
(
data
.
currentSession
)
{
count
++
;
}
else
if
(
data
.
nextSession
)
{
count
++
;
}
}
return
count
;
}
\ No newline at end of file
egret/src/mapScene/getInviteBtn.ts
0 → 100644
View file @
457eabf4
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
export
default
()
=>
{
const
inviteInfo
=
DataManager
.
ins
.
getData
(
NetName
.
GET_INVATE_INFO
);
if
(
inviteInfo
&&
inviteInfo
.
success
&&
inviteInfo
.
data
)
{
const
flag
=
inviteInfo
.
data
.
completeFlag
;
if
(
flag
>=
0
&&
flag
<=
5
)
return
1
if
(
flag
==
6
)
return
0
;
}
return
0
;
}
egret/src/mapScene/getSignBtn.ts
0 → 100644
View file @
457eabf4
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetName
}
from
"../../libs/tw/enum/NetName"
;
export
default
()
=>
{
const
getSignConfig
=
DataManager
.
ins
.
getData
(
'getSignConfig'
);
if
(
getSignConfig
&&
getSignConfig
.
data
)
return
getSignConfig
.
data
.
closeStatus
;
return
false
;
}
\ No newline at end of file
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