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
50ad7f59
Commit
50ad7f59
authored
Oct 12, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:wanghongyuan/xiaoxiaole into dev
parents
9bb65f02
65738edc
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
13 deletions
+104
-13
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+14
-0
MapSkin.exml
egret/resource/skins/MapSkin.exml
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+33
-11
InviteCutTimePanel.ts
egret/src/panels/InviteCutTimePanel.ts
+5
-0
InvitePanel.ts
egret/src/panels/InvitePanel.ts
+3
-0
InvitePrizePanel.ts
egret/src/panels/InvitePrizePanel.ts
+6
-0
config.js
mock/config.js
+6
-0
acceptInvitationInfo.json
mock/happyclear/acceptInvitationInfo.json
+19
-0
acceptInvitationPrize.json
mock/happyclear/acceptInvitationPrize.json
+16
-0
getInviteInfo.json
mock/happyclear/getInviteInfo.json
+1
-1
No files found.
egret/libs/tw/manager/NetManager.ts
View file @
50ad7f59
...
@@ -2014,5 +2014,19 @@ export class NetManager extends ABNetManager {
...
@@ -2014,5 +2014,19 @@ export class NetManager extends ABNetManager {
};
};
this
.
send
(
net
);
this
.
send
(
net
);
}
}
public
acceptInvitationPrize
(
callback
:
Function
):
void
{
const
net
:
INetData
=
{
name
:
NetName
.
ACCEPT_INVITATION
,
uri
:
'/customActivity/happyclear/acceptInvitationPrize'
,
type
:
'post'
,
dataType
:
'json'
,
param
:
{
activityId
:
DataManager
.
ins
.
customCfgData
.
actId
,
},
callback
:
callback
};
this
.
send
(
net
);
}
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
}
}
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
50ad7f59
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
</e:skinName>
</e:skinName>
</e:Button>
</e:Button>
<e:Group
x=
"84.67"
y=
"0"
>
<e:Group
x=
"84.67"
y=
"0"
>
<e:Image
source=
"invite_txtbg_png"
x=
"0"
y=
"0"
touchEnabled=
"false"
/>
<e:Image
id=
"inviteTipsBg"
source=
"invite_txtbg_png"
x=
"0"
y=
"0"
touchEnabled=
"false"
/>
<e:Label
id=
"inviteTips"
text=
"待领取取"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"16"
/>
<e:Label
id=
"inviteTips"
text=
"待领取取"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xffffff"
size=
"16"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
...
...
egret/src/mapScene/MapScene.ts
View file @
50ad7f59
...
@@ -20,6 +20,7 @@ import getResPath from "../../libs/new_tc/getResPath";
...
@@ -20,6 +20,7 @@ import getResPath from "../../libs/new_tc/getResPath";
import
CountDown
from
"./CountDown"
;
import
CountDown
from
"./CountDown"
;
import
AvatarComp
from
"./AvatarComp"
;
import
AvatarComp
from
"./AvatarComp"
;
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
tr
=
egret
.
sys
.
tr
;
export
default
class
MapScene
extends
Scene
{
export
default
class
MapScene
extends
Scene
{
...
@@ -391,17 +392,30 @@ export default class MapScene extends Scene {
...
@@ -391,17 +392,30 @@ export default class MapScene extends Scene {
case
(
flag
==
0
):
// 未完成
case
(
flag
==
0
):
// 未完成
PanelCtrl
.
instance
.
show
(
'invite'
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
'invite'
,
res
.
data
);
break
;
break
;
case
(
flag
==
1
):
// 完成未开奖 待领奖
case
(
flag
==
1
):
// 完成未开奖 待领奖 请求领奖接口
NetManager
.
ins
.
acceptInvitationPrize
((
success
,
res
)
=>
{
if
(
!
success
){
return
;
}
console
.
log
(
res
.
data
);
if
(
res
.
data
.
completeFlag
==
3
){
showToast
(
"哎呀,萌狮开小差啦!
\n
过会再来看吧!"
);
}
else
{
PanelCtrl
.
instance
.
show
(
'invitePrize'
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
'invitePrize'
,
res
.
data
);
}
});
break
;
break
;
case
(
flag
==
2
):
// 领奖成功
case
(
flag
==
2
):
// 领奖成功 倒计时
case
(
flag
==
3
):
// 领奖失败 倒计时
PanelCtrl
.
instance
.
show
(
'inviteCutTime'
,
res
.
data
);
PanelCtrl
.
instance
.
show
(
'inviteCutTime'
,
res
.
data
);
break
;
case
(
flag
==
3
):
// 领奖失败
break
;
break
;
case
(
flag
==
4
):
// 可以开启下一次发任务
case
(
flag
==
4
):
// 可以开启下一次发任务
NetManager
.
ins
.
acceptInvitationInfo
((
success
,
res
)
=>
{
if
(
!
success
){
return
;
}
PanelCtrl
.
instance
.
show
(
'invite'
,
res
.
data
);
});
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -421,6 +435,8 @@ export default class MapScene extends Scene {
...
@@ -421,6 +435,8 @@ export default class MapScene extends Scene {
let
flag
=
res
.
data
.
completeFlag
;
let
flag
=
res
.
data
.
completeFlag
;
switch
(
true
)
{
switch
(
true
)
{
case
(
flag
==
0
):
// 未完成 显示倒计时
case
(
flag
==
0
):
// 未完成 显示倒计时
this
[
"inviteTipsBg"
].
visible
=
true
;
this
[
"inviteTips"
].
visible
=
true
;
this
.
cutTime
=
res
.
data
.
endTime
-
res
.
data
.
sysTime
+
1000
;
this
.
cutTime
=
res
.
data
.
endTime
-
res
.
data
.
sysTime
+
1000
;
console
.
log
(
this
.
cutTime
);
console
.
log
(
this
.
cutTime
);
this
.
timer
=
new
egret
.
Timer
(
1000
,
0
);
this
.
timer
=
new
egret
.
Timer
(
1000
,
0
);
...
@@ -429,13 +445,19 @@ export default class MapScene extends Scene {
...
@@ -429,13 +445,19 @@ export default class MapScene extends Scene {
this
.
cutTimer
();
this
.
cutTimer
();
break
;
break
;
case
(
flag
==
1
):
// 完成未开奖 待领奖 显示待领奖
case
(
flag
==
1
):
// 完成未开奖 待领奖 显示待领奖
this
[
"inviteTipsBg"
].
visible
=
true
;
this
[
"inviteTips"
].
visible
=
true
;
this
[
"inviteTips"
].
text
=
"待领奖"
;
this
[
"inviteTips"
].
text
=
"待领奖"
;
break
;
break
;
case
(
flag
==
2
):
// 领奖成功
case
(
flag
==
2
):
// 领奖成功 无角标
break
;
case
(
flag
==
3
):
// 领奖失败 无角标
case
(
flag
==
3
):
// 领奖失败
this
[
"inviteTipsBg"
].
visible
=
false
;
this
[
"inviteTips"
].
visible
=
false
;
break
;
break
;
case
(
flag
==
4
):
// 可以开启下一次发任务
case
(
flag
==
4
):
// 可以开启下一次发任务 显示立即到账
this
[
"inviteTipsBg"
].
visible
=
true
;
this
[
"inviteTips"
].
visible
=
true
;
this
[
"inviteTips"
].
text
=
"立即到账"
;
break
;
break
;
default
:
default
:
break
;
break
;
...
...
egret/src/panels/InviteCutTimePanel.ts
View file @
50ad7f59
...
@@ -40,6 +40,11 @@ export default class InviteCutTimePanel extends Panel {
...
@@ -40,6 +40,11 @@ export default class InviteCutTimePanel extends Panel {
}
}
onTouchOK
()
{
onTouchOK
()
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
]){
changeMapScene
();
super
.
hidePanel
();
return
;
}
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
}
}
...
...
egret/src/panels/InvitePanel.ts
View file @
50ad7f59
...
@@ -64,6 +64,9 @@ export default class InvitePanel extends Panel {
...
@@ -64,6 +64,9 @@ export default class InvitePanel extends Panel {
initUI
()
{
initUI
()
{
this
.
setWXShareTip
();
this
.
setWXShareTip
();
this
.
prizeImg
.
source
=
this
.
data
.
img
;
this
.
prizeImg
.
source
=
this
.
data
.
img
;
if
(
!
this
.
data
.
invitationUser
){
this
.
data
.
invitationUser
=
[];
}
let
dNum
=
this
.
data
.
invitationCount
-
this
.
data
.
invitationUser
.
length
;
let
dNum
=
this
.
data
.
invitationCount
-
this
.
data
.
invitationUser
.
length
;
this
.
numLabel
.
text
=
`仅差
${
dNum
}
人可获得`
;
this
.
numLabel
.
text
=
`仅差
${
dNum
}
人可获得`
;
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
for
(
let
i
=
0
;
i
<
dNum
;
i
++
)
{
...
...
egret/src/panels/InvitePrizePanel.ts
View file @
50ad7f59
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
getHomeData
from
"../getHomeData"
;
import
getHomeData
from
"../getHomeData"
;
import
{
changeMapScene
}
from
"../startScene/StartScene"
;
/**
/**
* 邀请规则面板
* 邀请规则面板
...
@@ -37,6 +38,11 @@ export default class InvitePrizePanel extends Panel {
...
@@ -37,6 +38,11 @@ export default class InvitePrizePanel extends Panel {
}
}
onTouchOK
()
{
onTouchOK
()
{
if
((
getHomeData
().
levels
.
length
+
1
)
>
window
[
'last_level'
]){
changeMapScene
();
super
.
hidePanel
();
return
;
}
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
PanelCtrl
.
instance
.
show
(
"StartPanel"
,
getHomeData
().
levels
.
length
+
1
);
}
}
...
...
mock/config.js
View file @
50ad7f59
...
@@ -128,6 +128,12 @@ const config = {
...
@@ -128,6 +128,12 @@ const config = {
'/customActivity/happyclear/invitationInfo'
:
{
'/customActivity/happyclear/invitationInfo'
:
{
data
:
'./happyclear/getInviteInfo.json'
data
:
'./happyclear/getInviteInfo.json'
},
},
'/customActivity/happyclear/acceptInvitationInfo'
:{
data
:
'./happyclear/acceptInvitationInfo.json'
},
'/customActivity/happyclear/acceptInvitationPrize'
:{
data
:
'./happyclear/acceptInvitationPrize.json'
}
}
}
for
(
let
item
in
config
)
{
for
(
let
item
in
config
)
{
...
...
mock/happyclear/acceptInvitationInfo.json
0 → 100644
View file @
50ad7f59
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
"data"
:
{
"invitationId"
:
"活动id"
,
"invitationCount"
:
0
,
"img"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"sysTime"
:
1570630215000
,
"endTime"
:
1570672800000
,
"completeFlag"
:
0
,
"openPrizMsg"
:
"图片"
,
"prizeType"
:
"nickname"
,
"prizeName"
:
"nickname"
,
"prizeImg"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"facePrice"
:
"avatar"
}
}
\ No newline at end of file
mock/happyclear/acceptInvitationPrize.json
0 → 100644
View file @
50ad7f59
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
"data"
:
{
"invitationId"
:
"活动id"
,
"img"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"completeFlag"
:
1
,
"openPrizMsg"
:
"图片"
,
"prizeType"
:
"nickname"
,
"prizeName"
:
"nickname"
,
"prizeImg"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
,
"facePrice"
:
"avatar"
}
}
\ No newline at end of file
mock/happyclear/getInviteInfo.json
View file @
50ad7f59
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"avatar"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
"avatar"
:
"http://yun.duiba.com.cn/db_games/xiaoxiaole.jpg"
}
}
],
],
"completeFlag"
:
0
,
"completeFlag"
:
1
,
"openPrizeMsg"
:
"图片"
,
"openPrizeMsg"
:
"图片"
,
"prizeType"
:
"nickname"
,
"prizeType"
:
"nickname"
,
"prizeName"
:
"nickname"
,
"prizeName"
:
"nickname"
,
...
...
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