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
ebf253c0
Commit
ebf253c0
authored
Mar 20, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix20200326' into dev
parents
9e6afd87
70debc38
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
81 deletions
+52
-81
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-0
default.thm.json
egret/resource/default.thm.json
+1
-0
HelpBloodSkin.exml
egret/resource/skins/HelpBloodSkin.exml
+5
-0
MapScene.ts
egret/src/mapScene/MapScene.ts
+4
-27
StartPanel.ts
egret/src/panels/StartPanel.ts
+1
-53
HelpBloodPanel.ts
egret/src/panels/help/HelpBloodPanel.ts
+38
-0
home.json
mock/happyclear/home.json
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
ebf253c0
...
@@ -78,6 +78,7 @@ import ShopTipPanel from "../../src/panels/ShopTipPanel";
...
@@ -78,6 +78,7 @@ import ShopTipPanel from "../../src/panels/ShopTipPanel";
import
RechargePanel
from
"../../src/panels/RechargePanel"
;
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"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
constructor
()
{
...
@@ -166,6 +167,7 @@ export default class MainBase extends eui.UILayer {
...
@@ -166,6 +167,7 @@ export default class MainBase extends eui.UILayer {
[
'taskCenterNoPrize'
,
{
cls
:
TaskCenterNoPrize
}],
[
'taskCenterNoPrize'
,
{
cls
:
TaskCenterNoPrize
}],
[
'shopTip'
,
{
cls
:
ShopTipPanel
}],
[
'shopTip'
,
{
cls
:
ShopTipPanel
}],
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'recharge'
,
{
cls
:
RechargePanel
}],
[
'HelpBloodPanel'
,
{
cls
:
HelpBloodPanel
}],
];
];
const
scenes
=
[
const
scenes
=
[
...
...
egret/resource/default.thm.json
View file @
ebf253c0
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
"skins"
:
{},
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"exmls"
:
[
"resource/skins/HelpBloodSkin.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
0 → 100644
View file @
ebf253c0
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"HelpBloodSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Image
source=
"help_blood_1_bg_png"
y=
"26"
horizontalCenter=
"0"
/>
<e:Image
source=
"help_blood_1_btn_png"
y=
"752"
horizontalCenter=
"0"
/>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
ebf253c0
...
@@ -55,39 +55,16 @@ export default class MapScene extends Scene {
...
@@ -55,39 +55,16 @@ export default class MapScene extends Scene {
private
icons
=
{};
private
icons
=
{};
private
actIcon
:
ActIcon
=
null
;
private
actIcon
:
ActIcon
=
null
;
sendInvite
()
{
private
sendInvite
()
{
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
;
if
(
doHelpFlag
)
{
if
(
doHelpFlag
)
{
return
;
return
;
}
}
//0224修改,取sceneCode,
const
sceneCode
=
Utils
.
getRequestByKey
(
'sceneCode'
)
const
sceneCode
=
Utils
.
getRequestByKey
(
'sceneCode'
)
if
(
sceneCode
==
CodeChannels
.
AddBlood
)
{
//加体力的,0228到时会修改成助力,这里要加逻辑
if
(
sceneCode
==
CodeChannels
.
AddBlood
)
{
//if (window["test0228"]) {//测试助力,到时失败code再和后端对接
const
netCallback
=
()
=>
{
doHelpFlag
=
true
;
};
NetManager
.
ins
.
doHelpNew
((
s
,
res
)
=>
{
PanelCtrl
.
instance
.
show
(
'HelpBloodPanel'
,{
netCallback
:
netCallback
,
code
:
code
});
doHelpFlag
=
true
;
if
(
s
)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
83
))
showToast
(
"助力成功!一起闯关赢现金吧"
)
}
else
{
var
codeMsgs
=
{
//具体code还没给
"2002002016"
:
"不可以给自己助力哦~"
,
//
"2002002036"
:
"已经给好友助力过了哦~"
,
// "2002002037": "已经给好友助力过了哦~",
"2002002025"
:
"今日助力次数已达上限啦!"
,
//新加的,还没给,其他的都用助力失败
"2002002013"
:
"口令无效,请复制正确的口令!"
,
"2002002015"
:
"口令不存在"
,
"2002002026"
:
"好友今日被助力已达上限啦!"
}
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
},
code
)
// } else {
// showToast("欢迎小主,闯关就能拿现金~");
// }
}
}
else
if
(
sceneCode
==
CodeChannels
.
RankPlay
)
{
//排行榜邀请好友的,不需要了
else
if
(
sceneCode
==
CodeChannels
.
RankPlay
)
{
//排行榜邀请好友的,不需要了
showToast
(
"欢迎加入游戏,去闯关吧"
);
showToast
(
"欢迎加入游戏,去闯关吧"
);
...
...
egret/src/panels/StartPanel.ts
View file @
ebf253c0
...
@@ -155,59 +155,7 @@ export default class StartPanel extends Panel {
...
@@ -155,59 +155,7 @@ export default class StartPanel extends Panel {
onTap_startBtn
()
{
onTap_startBtn
()
{
const
homeData
=
getHomeData
();
const
homeData
=
getHomeData
();
if
(
homeData
.
remainEnargy
<=
0
)
{
if
(
homeData
.
remainEnargy
<=
0
)
{
if
(
/*homeData.askForEnergy*/
this
.
askForEnergyCount
)
{
PanelCtrl
.
instance
.
show
(
'blood2Panel'
);
PanelCtrl
.
instance
.
show
(
'blood2Panel'
);
}
else
{
if
(
iswx
())
{
getShareUrl
(
this
.
stage
);
NetManager
.
ins
.
hc_askForEnergy
((
success
)
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功~'
);
});
})
}
else
{
// if (window["test0228"]) {
//如果之前没获取到,就再发接口,几率很低
if
(
!
DataManager
.
ins
.
getData
(
"getUserShareCode"
))
{
this
.
touchEnabled
=
false
this
.
touchChildren
=
false
NetManager
.
ins
.
getUserShareCode
((
s
,
res
)
=>
{
this
.
touchEnabled
=
true
this
.
touchChildren
=
true
if
(
!
s
)
{
showToast
(
"获取分享信息失败,请重试"
)
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
res
.
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
)
}
})
}
else
{
showShareCodePanel
(
CodeChannels
.
AddBlood
,
DataManager
.
ins
.
getData
(
"getUserShareCode"
).
data
,
()
=>
{
wait
(
2000
).
then
(()
=>
{
showToast
(
'分享成功'
);
});
}
);
}
// } else {
// showShareCodePanel(CodeChannels.AddBlood, null, () => {
// NetManager.ins.hc_askForEnergy((success) => {
// NetManager.ins.hc_home(() => {
// SceneCtrl.instance.updateScene();
// }, window['collectRuleId']);
// wait(2000).then(() => {
// showToast('分享成功');
// });
// })
// });
// }
}
}
return
;
return
;
}
}
...
...
egret/src/panels/help/HelpBloodPanel.ts
0 → 100644
View file @
ebf253c0
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"
;
export
default
class
HelpBloodPanel
extends
Panel
{
netCallback
;
code
;
start
(
data
)
{
this
.
netCallback
=
data
.
netCallback
;
this
.
code
=
data
.
code
;
}
onClick
(){
NetManager
.
ins
.
doHelpNew
((
s
,
res
)
=>
{
this
.
netCallback
();
// doHelpFlag = true;
if
(
s
)
{
NetManager
.
ins
.
showLog
(
getlogItem
(
83
))
showToast
(
"助力成功!一起闯关赢现金吧"
)
}
else
{
var
codeMsgs
=
{
//具体code还没给
"2002002016"
:
"不可以给自己助力哦~"
,
//
"2002002036"
:
"已经给好友助力过了哦~"
,
// "2002002037": "已经给好友助力过了哦~",
"2002002025"
:
"今日助力次数已达上限啦!"
,
//新加的,还没给,其他的都用助力失败
"2002002013"
:
"口令无效,请复制正确的口令!"
,
"2002002015"
:
"口令不存在"
,
"2002002026"
:
"好友今日被助力已达上限啦!"
}
showToast
(
res
&&
codeMsgs
[
res
.
code
]
?
codeMsgs
[
res
.
code
]
:
"助力失败"
);
}
},
this
.
code
)
}
get
skinResKey
()
{
return
'helpGroup'
}
}
\ No newline at end of file
mock/happyclear/home.json
View file @
ebf253c0
...
@@ -2780,7 +2780,7 @@
...
@@ -2780,7 +2780,7 @@
"num"
:
3
"num"
:
3
}
}
],
],
"remainEnargy"
:
99
,
"remainEnargy"
:
0
,
"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