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
b4fa4d57
Commit
b4fa4d57
authored
Mar 23, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1833508d
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
226 additions
and
150 deletions
+226
-150
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-0
default.thm.json
egret/resource/default.thm.json
+102
-101
HelpBloodSkin.exml
egret/resource/skins/HelpBloodSkin.exml
+3
-3
HelpInviteSkin.exml
egret/resource/skins/HelpInviteSkin.exml
+16
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+23
-31
HelpBloodPanel.ts
egret/src/panels/help/HelpBloodPanel.ts
+13
-7
HelpInvitePanel.ts
egret/src/panels/help/HelpInvitePanel.ts
+64
-0
doHelpNew.json
mock/happyclear/doHelpNew.json
+2
-2
home.json
mock/happyclear/home.json
+1
-6
No files found.
egret/libs/new_wx/MainBase.ts
View file @
b4fa4d57
...
@@ -79,6 +79,7 @@ import RechargePanel from "../../src/panels/RechargePanel";
...
@@ -79,6 +79,7 @@ import RechargePanel from "../../src/panels/RechargePanel";
import
BombTips2Panel
from
"../../src/panels/BombTips2Panel"
;
import
BombTips2Panel
from
"../../src/panels/BombTips2Panel"
;
import
BackIndexPanel
from
"../../src/panels/BackIndexPanel"
;
import
BackIndexPanel
from
"../../src/panels/BackIndexPanel"
;
import
HelpBloodPanel
from
"../../src/panels/help/HelpBloodPanel"
;
import
HelpBloodPanel
from
"../../src/panels/help/HelpBloodPanel"
;
import
HelpInvitePanel
from
"../../src/panels/help/HelpInvitePanel"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
constructor
()
{
...
@@ -168,6 +169,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -168,6 +169,7 @@ export default class MainBase extends eui.UILayer {
[
'shopTip'
,
{
cls
:
ShopTipPanel
}],
[
'shopTip'
,
{
cls
:
ShopTipPanel
}],
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'HelpBloodPanel'
,
{
cls
:
HelpBloodPanel
}],
[
'HelpBloodPanel'
,
{
cls
:
HelpBloodPanel
}],
[
'HelpInvitePanel'
,
{
cls
:
HelpInvitePanel
}],
];
];
const
scenes
=
[
const
scenes
=
[
...
...
egret/resource/default.thm.json
View file @
b4fa4d57
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/HelpBloodSkin.exml"
,
"resource/skins/HelpBloodSkin.exml"
,
"resource/skins/HelpInviteSkin.exml"
,
"resource/skins/ADSkin.exml"
,
"resource/skins/ADSkin.exml"
,
"resource/skins/ADSmallSkin.exml"
,
"resource/skins/ADSmallSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
...
...
egret/resource/skins/HelpBloodSkin.exml
View file @
b4fa4d57
...
@@ -8,9 +8,9 @@
...
@@ -8,9 +8,9 @@
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
source=
"help_blood_1_text_png"
y=
"0"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_standby"
source=
"help_blood_1_text_png"
y=
"0"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_success"
source=
"help_blood_success_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_success"
source=
"help_blood_success_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error"
source=
"help_blood_fail_text_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error
2002002026
"
source=
"help_blood_fail_text_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002016"
source=
"help_blood_fail_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002016"
source=
"help_blood_fail_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002036"
source=
"help_blood_fail_text3_png"
horizontalCenter=
"0"
/>
<e:Image
id=
"txt_error2002002036"
source=
"help_blood_fail_text3_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
source=
"help_blood_fail_text4_png"
x=
"379"
y=
"21
"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002025"
source=
"help_blood_fail_text4_png"
horizontalCenter=
"0
"
visible=
"false"
/>
</e:Group>
</e:Group>
</e:Skin>
</e:Skin>
\ No newline at end of file
egret/resource/skins/HelpInviteSkin.exml
0 → 100644
View file @
b4fa4d57
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"HelpInviteSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"help_blood_1_bg_png"
y=
"26"
horizontalCenter=
"0"
/>
<e:Group
y=
"855"
horizontalCenter=
"0"
>
<e:Image
id=
"helpbtn"
source=
"help_blood_1_btn_png"
x=
"0"
y=
"0"
/>
<e:Image
id=
"gobtn"
source=
"help_blood_fail_btn_png"
x=
"0"
y=
"0"
visible=
"false"
/>
</e:Group>
<e:Group
y=
"88"
width=
"100%"
horizontalCenter=
"0"
>
<e:Image
id=
"txt_standby"
source=
"help_blood_1_text_png"
y=
"0"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_success"
source=
"help_blood_success_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002026"
source=
"help_blood_fail_text_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002016"
source=
"help_blood_fail_text2_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002036"
source=
"help_blood_fail_text3_png"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Image
id=
"txt_error2002002025"
source=
"help_blood_fail_text4_png"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
b4fa4d57
...
@@ -55,47 +55,32 @@ export default class MapScene extends Scene {
...
@@ -55,47 +55,32 @@ export default class MapScene extends Scene {
private
icons
=
{};
private
icons
=
{};
private
actIcon
:
ActIcon
=
null
;
private
actIcon
:
ActIcon
=
null
;
private
sendInvite
()
{
private
sendInvite
(
panels
:
any
[],
parmas
:
any
[]
)
{
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
)
||
Utils
.
getRequestByKey
(
'token'
);
//0224新加用token取一边
const
code
=
Utils
.
getRequestByKey
(
'shareCode'
)
||
Utils
.
getRequestByKey
(
'token'
);
//0224新加用token取一边
if
(
!
code
)
return
;
if
(
!
code
)
return
false
;
if
(
doHelpFlag
)
{
if
(
doHelpFlag
)
{
return
;
return
false
;
}
}
const
sceneCode
=
Utils
.
getRequestByKey
(
'sceneCode'
)
const
sceneCode
=
Utils
.
getRequestByKey
(
'sceneCode'
)
if
(
sceneCode
==
CodeChannels
.
AddBlood
)
{
if
(
sceneCode
==
CodeChannels
.
AddBlood
)
{
const
netCallback
=
()
=>
{
doHelpFlag
=
true
;
};
const
netCallback
=
()
=>
{
doHelpFlag
=
true
;
};
PanelCtrl
.
instance
.
show
(
'HelpBloodPanel'
,{
netCallback
:
netCallback
,
code
:
code
});
panels
.
push
(
'HelpBloodPanel'
);
parmas
.
push
({
netCallback
:
netCallback
,
code
:
code
});
}
}
else
if
(
sceneCode
==
CodeChannels
.
RankPlay
)
{
//排行榜邀请好友的,不需要了
else
if
(
sceneCode
==
CodeChannels
.
RankPlay
)
{
//排行榜邀请好友的,不需要了
showToast
(
"欢迎加入游戏,去闯关吧"
);
showToast
(
"欢迎加入游戏,去闯关吧"
);
return
false
;
}
//剩下的就是邀请有礼和刮刮卡了,本身code上有区分
}
//剩下的就是邀请有礼和刮刮卡了,本身code上有区分
else
if
(
code
.
indexOf
(
"12345678"
)
==
-
1
)
{
// 邀请有礼
else
if
(
code
.
indexOf
(
"12345678"
)
==
-
1
)
{
// 邀请有礼
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
if
(
!
dojoin
)
{
if
(
!
dojoin
)
{
showToast
(
"开启消除之旅"
)
showToast
(
"开启消除之旅"
)
;
return
;
return
false
;
}
}
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
const
netCallback
=
()
=>
{
doHelpFlag
=
true
;
};
doHelpFlag
=
true
;
panels
.
push
(
'HelpInvitePanel'
);
switch
(
true
)
{
parmas
.
push
({
netCallback
:
netCallback
,
code
:
code
});
case
(
res
.
code
==
"400017"
):
showToast
(
"您不是新用户呢~"
);
break
;
case
(
res
.
code
==
"0000022"
):
showToast
(
"不可以给自己助力哦~"
);
break
;
case
(
res
.
code
==
"0200202"
):
showToast
(
"已经给好友助力过了哦~"
);
break
;
default
:
break
;
}
if
(
!
success
)
{
return
;
}
showToast
(
"助力成功"
);
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
},
code
,
dojoin
.
data
);
}
else
{
// 刮刮卡
}
else
{
// 刮刮卡
const
_code
=
code
.
slice
(
8
);
const
_code
=
code
.
slice
(
8
);
NetManager
.
ins
.
scratchDoHelp
((
success
,
res
)
=>
{
NetManager
.
ins
.
scratchDoHelp
((
success
,
res
)
=>
{
...
@@ -121,6 +106,7 @@ export default class MapScene extends Scene {
...
@@ -121,6 +106,7 @@ export default class MapScene extends Scene {
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
NetManager
.
ins
.
showLog
(
getlogItem
(
36
));
},
_code
);
},
_code
);
}
}
return
true
;
}
}
// 邀请有礼角标倒计时
// 邀请有礼角标倒计时
...
@@ -158,7 +144,7 @@ export default class MapScene extends Scene {
...
@@ -158,7 +144,7 @@ export default class MapScene extends Scene {
this
.
addIcon
();
// 添加Icon
this
.
addIcon
();
// 添加Icon
this
.
sendInvite
();
this
.
hcRedBoobBaseInfo
();
this
.
hcRedBoobBaseInfo
();
this
.
updateSignBtn
();
this
.
updateSignBtn
();
this
.
updateMyInfo
();
this
.
updateMyInfo
();
...
@@ -175,7 +161,13 @@ export default class MapScene extends Scene {
...
@@ -175,7 +161,13 @@ export default class MapScene extends Scene {
stopGamebg
();
stopGamebg
();
NetManager
.
ins
.
getSignInfo
(()
=>
{
NetManager
.
ins
.
getSignInfo
(()
=>
{
const
parmas
=
[];
const
panels
=
[];
const
panels
=
[];
const
result
=
this
.
sendInvite
(
panels
,
parmas
);
// if (result) {
// PanelCtrl.instance.showPanels(panels, parmas, this.onAllPanelHide);
// return;
// }
const
date
=
new
Date
();
const
date
=
new
Date
();
date
.
setHours
(
0
,
0
,
0
,
0
);
date
.
setHours
(
0
,
0
,
0
,
0
);
const
nowTimerStr
=
date
.
getTime
()
+
''
;
const
nowTimerStr
=
date
.
getTime
()
+
''
;
...
@@ -256,13 +248,13 @@ export default class MapScene extends Scene {
...
@@ -256,13 +248,13 @@ export default class MapScene extends Scene {
if
(
!
readCache
()
&&
getHomeData
().
levels
.
length
<=
0
)
{
//引导
if
(
!
readCache
()
&&
getHomeData
().
levels
.
length
<=
0
)
{
//引导
const
guide
=
new
GuideCon
(()
=>
{
const
guide
=
new
GuideCon
(()
=>
{
PanelCtrl
.
instance
.
showPanels
(
panels
,
[]
,
this
.
onAllPanelHide
);
PanelCtrl
.
instance
.
showPanels
(
panels
,
parmas
,
this
.
onAllPanelHide
);
});
});
this
.
addChild
(
guide
);
this
.
addChild
(
guide
);
guide
.
play
(
1
)
guide
.
play
(
1
)
// console.log(guide)
// console.log(guide)
}
else
{
//不用引导
}
else
{
//不用引导
PanelCtrl
.
instance
.
showPanels
(
panels
,
[]
,
this
.
onAllPanelHide
);
PanelCtrl
.
instance
.
showPanels
(
panels
,
parmas
,
this
.
onAllPanelHide
);
}
}
},
window
[
'signActivityId'
]);
},
window
[
'signActivityId'
]);
...
...
egret/src/panels/help/HelpBloodPanel.ts
View file @
b4fa4d57
...
@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel";
...
@@ -2,6 +2,7 @@ import Panel from "../../../libs/new_wx/components/Panel";
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
gotoNextLevel
}
from
"../gotoNextLevel"
;
export
default
class
HelpBloodPanel
extends
Panel
{
export
default
class
HelpBloodPanel
extends
Panel
{
netCallback
;
netCallback
;
...
@@ -9,8 +10,6 @@ export default class HelpBloodPanel extends Panel {
...
@@ -9,8 +10,6 @@ export default class HelpBloodPanel extends Panel {
start
(
data
)
{
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
this
.
code
=
data
.
code
;
'helpbtn'
;
'gobtn'
;
NetManager
.
ins
.
showLog
(
getlogItem
(
87
));
NetManager
.
ins
.
showLog
(
getlogItem
(
87
));
this
[
'gobtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'gobtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
...
@@ -21,21 +20,23 @@ export default class HelpBloodPanel extends Panel {
...
@@ -21,21 +20,23 @@ export default class HelpBloodPanel extends Panel {
onclick_gobtn
()
{
onclick_gobtn
()
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
88
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
88
));
this
.
hidePanel
();
// gotoNextLevel();
}
}
onClick
()
{
onClick
()
{
this
[
'helpbtn'
].
visible
=
false
;
this
[
'helpbtn'
].
visible
=
false
;
this
[
'gobtn'
].
visible
=
true
;
this
[
'gobtn'
].
visible
=
true
;
this
[
'txt_success'
].
visible
=
true
;
NetManager
.
ins
.
showLog
(
getlogItem
(
88
));
NetManager
.
ins
.
showLog
(
getlogItem
(
88
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
87
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
87
));
NetManager
.
ins
.
doHelpNew
((
s
,
res
)
=>
{
NetManager
.
ins
.
doHelpNew
((
s
,
res
)
=>
{
this
.
netCallback
();
this
.
netCallback
();
this
[
'txt_s
utxt_standbyccess'
].
visible
=
false
;
this
[
'txt_s
tandby'
].
visible
=
false
;
// doHelpFlag = true;
// doHelpFlag = true;
if
(
s
)
{
if
(
s
)
{
this
[
'txt_success'
].
visible
=
true
;
this
[
'txt_success'
].
visible
=
true
;
showToast
(
"助力成功!一起闯关赢现金吧"
)
//
showToast("助力成功!一起闯关赢现金吧")
}
else
{
}
else
{
var
codeMsgs
=
{
//具体code还没给
var
codeMsgs
=
{
//具体code还没给
"2002002016"
:
"不可以给自己助力哦~"
,
//
"2002002016"
:
"不可以给自己助力哦~"
,
//
...
@@ -47,7 +48,12 @@ export default class HelpBloodPanel extends Panel {
...
@@ -47,7 +48,12 @@ export default class HelpBloodPanel extends Panel {
"2002002015"
:
"口令不存在"
,
"2002002015"
:
"口令不存在"
,
"2002002026"
:
"好友今日被助力已达上限啦!"
"2002002026"
:
"好友今日被助力已达上限啦!"
}
}
if
(
res
&&
codeMsgs
[
res
.
code
]
&&
this
[
`txt_error
${
res
.
code
}
`
])
{
this
[
`txt_error
${
res
.
code
}
`
].
visible
=
true
;
}
else
{
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
// this.hidePanel();
}
}
}
},
this
.
code
)
},
this
.
code
)
}
}
...
...
egret/src/panels/help/HelpInvitePanel.ts
0 → 100644
View file @
b4fa4d57
import
Panel
from
"../../../libs/new_wx/components/Panel"
;
import
{
NetManager
}
from
"../../../libs/tw/manager/NetManager"
;
import
{
getlogItem
}
from
"../../Main"
;
import
{
showToast
}
from
"../../../libs/new_wx/ctrls/toastCtrl"
;
import
{
gotoNextLevel
}
from
"../gotoNextLevel"
;
import
{
DataManager
}
from
"../../../libs/tw/manager/DataManager"
;
export
default
class
HelpInvitePanel
extends
Panel
{
netCallback
;
code
;
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
// NetManager.ins.showLog(getlogItem(87));
this
[
'gobtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onclick_gobtn
,
this
);
this
[
'helpbtn'
].
once
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onClick
,
this
);
this
[
'txt_standby'
].
visible
=
true
;
this
[
'helpbtn'
].
visible
=
true
;
}
onclick_gobtn
()
{
// NetManager.ins.clickLog(getlogItem(88));
this
.
hidePanel
();
// gotoNextLevel();
}
onClick
()
{
this
[
'helpbtn'
].
visible
=
false
;
this
[
'gobtn'
].
visible
=
true
;
const
dojoin
=
DataManager
.
ins
.
getData
(
'hc_doJoin'
);
NetManager
.
ins
.
doHelp
((
success
,
res
)
=>
{
this
.
netCallback
();
if
(
success
)
{
}
else
{
if
(
res
.
code
==
"400017"
||
res
.
code
==
"0000022"
||
res
.
code
==
"0200202"
)
{
}
}
// switch (true) {
// case (res.code == "400017"):
// showToast("您不是新用户呢~");
// break;
// case (res.code == "0000022"):
// showToast("不可以给自己助力哦~");
// break;
// case (res.code == "0200202"):
// showToast("已经给好友助力过了哦~");
// break;
// default:
// break;
// }
// if (!success) {
// return;
// }
// showToast("助力成功");
// NetManager.ins.showLog(getlogItem(36));
},
this
.
code
,
dojoin
.
data
);
}
get
skinResKey
()
{
return
'helpGroup'
}
get
skinKey
()
{
return
'HelpInvite'
}
}
\ No newline at end of file
mock/happyclear/doHelpNew.json
View file @
b4fa4d57
{
{
"success"
:
tru
e
,
"success"
:
fals
e
,
"code"
:
"
0000000000
"
,
"code"
:
"
2002002036
"
,
"desc"
:
"OK"
,
"desc"
:
"OK"
,
"timestamp"
:
1571052938097
,
"timestamp"
:
1571052938097
,
"data"
:
{
"data"
:
{
...
...
mock/happyclear/home.json
View file @
b4fa4d57
...
@@ -2633,11 +2633,6 @@
...
@@ -2633,11 +2633,6 @@
"levelNum"
:
524
,
"levelNum"
:
524
,
"maxScore"
:
47440
,
"maxScore"
:
47440
,
"stars"
:
1
"stars"
:
1
},
{
"levelNum"
:
525
,
"maxScore"
:
47440
,
"stars"
:
1
}
}
],
],
...
@@ -2655,7 +2650,7 @@
...
@@ -2655,7 +2650,7 @@
"num"
:
3
"num"
:
3
}
}
],
],
"remainEnargy"
:
0
,
"remainEnargy"
:
1
,
"askForEnergy"
:
false
,
"askForEnergy"
:
false
,
"canReceiveTreasureBoxNum"
:
10
,
"canReceiveTreasureBoxNum"
:
10
,
"nextRangeStarsNum"
:
150
"nextRangeStarsNum"
:
150
...
...
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