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
67209cf9
Commit
67209cf9
authored
Oct 25, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9fc63e49
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
146 additions
and
18 deletions
+146
-18
MainBase.ts
egret/libs/new_wx/MainBase.ts
+2
-0
Toast2.ts
egret/libs/new_wx/components/Toast2.ts
+21
-0
toastCtrl2.ts
egret/libs/new_wx/ctrls/toastCtrl2.ts
+27
-0
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-0
default.thm.json
egret/resource/default.thm.json
+2
-0
BagQuitSkin.exml
egret/resource/skins/BagQuitSkin.exml
+15
-13
Toast2Skin.exml
egret/resource/skins/Toast2Skin.exml
+7
-0
BagQuitPanel.ts
egret/src/panels/BagQuitPanel.ts
+32
-0
Buy1Panel.ts
egret/src/panels/Buy1Panel.ts
+11
-1
Buy2Panel.ts
egret/src/panels/Buy2Panel.ts
+9
-1
Buy3Panel.ts
egret/src/panels/Buy3Panel.ts
+9
-1
ExchangePanel.ts
egret/src/panels/ExchangePanel.ts
+9
-1
exchange.json
mock/happyclear/exchange.json
+1
-1
No files found.
egret/libs/new_wx/MainBase.ts
View file @
67209cf9
...
...
@@ -55,6 +55,7 @@ import RulePanel2 from "./components/RulePanel2";
import
ScratchPanel
from
"../../src/panels/ScratchPanel"
;
import
ScratchPrizePanel
from
"../../src/panels/ScratchPrizePanel"
;
import
TurntablePanel
from
"../../src/panels/TurntablePanel/TurntablePanel"
;
import
BagQuitPanel
from
"../../src/panels/BagQuitPanel"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
...
...
@@ -74,6 +75,7 @@ export default class MainBase extends eui.UILayer {
[
ModuleTypes
.
PRIZE_PANEL
,
{
cls
:
PrizePanel
}],
[
ModuleTypes
.
NO_PRIZE_PANEL
,
{
cls
:
NoPrizePanel
}],
[
'bag'
,
{
cls
:
BagPanel
}],
[
'bagquit'
,
{
cls
:
BagQuitPanel
}],
[
'bloodPanel'
,
{
cls
:
BloodPanel
}],
[
'blood2Panel'
,
{
cls
:
BloodPanel2
}],
[
'GoldPanel'
,
{
cls
:
GoldPanel
}],
...
...
egret/libs/new_wx/components/Toast2.ts
0 → 100644
View file @
67209cf9
import
ComponentBase
from
"./ComponentBase"
;
import
{
HtmlTextParser
}
from
"../HtmlTextParser"
;
import
{
gotoNextLevel
}
from
"../../../src/panels/gotoNextLevel"
;
export
default
class
Toast2
extends
ComponentBase
{
get
skinResKey
()
{
return
'common'
}
get
skinKey
():
string
{
return
'Toast2'
}
toastLabel
:
eui
.
Label
;
start
()
{
this
.
toastLabel
.
textFlow
=
(
new
HtmlTextParser
).
parser
(
'<u>继续闯关赢好礼</u>'
);
this
.
toastLabel
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,()
=>
{
gotoNextLevel
();
egret
.
Tween
.
removeTweens
(
this
);
this
.
alpha
=
0
;
},
this
);
return
this
;
}
}
\ No newline at end of file
egret/libs/new_wx/ctrls/toastCtrl2.ts
0 → 100644
View file @
67209cf9
import
layers
from
"../views/layers"
;
import
Toast2
from
"../components/Toast2"
;
let
inited
=
false
;
let
_toast
:
Toast2
;
const
initToast
=
()
=>
{
if
(
!
inited
)
{
inited
=
true
;
const
toast
=
new
Toast2
();
toast
.
loadSkin
();
layers
.
toastLayer
.
addChild
(
toast
);
toast
.
alpha
=
0
;
_toast
=
toast
;
}
return
_toast
;
}
export
const
showToast2
=
()
=>
{
const
toast
=
initToast
().
start
();
egret
.
Tween
.
removeTweens
(
toast
);
const
tw
=
egret
.
Tween
.
get
(
toast
);
tw
.
set
({
y
:
-
200
,
alpha
:
1
}).
to
({
y
:
400
},
500
,
egret
.
Ease
.
quartOut
)
.
wait
(
3500
)
.
to
({
alpha
:
0
},
300
)
}
egret/libs/tw/manager/NetManager.ts
View file @
67209cf9
...
...
@@ -904,6 +904,7 @@ export class NetManager extends ABNetManager {
uri
:
window
[
'duiba'
]
+
'/customActivity/happyclear/exchange'
,
type
:
'post'
,
dataType
:
'json'
,
hideMsg
:
true
,
param
:
d
,
callback
:
callback
};
...
...
egret/resource/default.thm.json
View file @
67209cf9
...
...
@@ -12,6 +12,7 @@
"resource/skins/BagItem2Skin.exml"
,
"resource/skins/BagItemSkin.exml"
,
"resource/skins/BagSkin.exml"
,
"resource/skins/BagQuitSkin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/BloodSkin.exml"
,
"resource/skins/Box2Skin.exml"
,
...
...
@@ -71,6 +72,7 @@
"resource/skins/TaskPrizeSkin.exml"
,
"resource/skins/TaskSkin.exml"
,
"resource/skins/ToastSkin.exml"
,
"resource/skins/Toast2Skin.exml"
,
"resource/skins/TurntablePanelSkin.exml"
,
"resource/skins/VScrollBarSkin.exml"
],
...
...
egret/resource/skins/BagQuitSkin.exml
View file @
67209cf9
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"BagQuitSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Skin
class=
"BagQuitSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"bag退出弹窗_png"
y=
"211"
horizontalCenter=
"0"
/>
<e:Button
label=
""
x=
"158"
y=
"476"
>
<e:Group
y=
"490"
horizontalCenter=
"0"
>
<e:Button
id=
"quitbtn"
label=
""
x=
"0"
y=
"0"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"bag退出按钮_png"
source.down=
"bag退出按钮_png"
source.disabled=
"bag退出按钮_png"
/>
...
...
@@ -9,7 +10,7 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
label=
""
x=
"473.44"
y=
"546.5
"
>
<e:Button
id=
"resumebtn"
label=
""
x=
"291.73"
y=
"0
"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"bag继续按钮_png"
source.down=
"bag继续按钮_png"
source.disabled=
"bag继续按钮_png"
/>
...
...
@@ -17,6 +18,7 @@
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Button
id=
"closeBtn"
label=
""
x=
"611.94"
y=
"201.92"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
...
...
egret/resource/skins/Toast2Skin.exml
0 → 100644
View file @
67209cf9
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"Toast2Skin"
width=
"750"
height=
"122"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"168a2aff0ee"
/>
<e:Image
id=
"bg"
source=
"toast_png"
y=
"0"
scale9Grid=
"131,22,48,10"
width=
"403"
height=
"122"
horizontalCenter=
"0"
/>
<e:Label
text=
"购买成功"
verticalAlign=
"middle"
textAlign=
"center"
height=
"61"
textColor=
"0xffffff"
size=
"28"
lineSpacing=
"15"
anchorOffsetX=
"0"
y=
"6.08"
horizontalCenter=
"0"
/>
<e:Label
id=
"toastLabel"
text=
"继续闯关赢好礼"
verticalAlign=
"middle"
textAlign=
"center"
textColor=
"0xFFFFFF"
size=
"28"
lineSpacing=
"15"
anchorOffsetX=
"0"
y=
"72.12"
horizontalCenter=
"0"
/>
</e:Skin>
\ No newline at end of file
egret/src/panels/BagQuitPanel.ts
0 → 100644
View file @
67209cf9
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
BagItemRenderer
from
"./bag/BagItemRenderer"
;
import
BagIte2mRenderer
from
"./bag/BagItemRenderer2"
;
import
{
getPropNums
}
from
"../getHomeData"
;
import
PropType
from
"../PropType"
;
export
default
class
BagQuitPanel
extends
Panel
{
panel
:
string
start
(
data
)
{
super
.
start
();
this
.
showlog
();
this
.
panel
=
data
;
}
showlog
()
{
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
}
initEvents
()
{
super
.
initEvents
();
this
[
'resumebtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onresumebtn
,
this
)
}
onresumebtn
()
{
PanelCtrl
.
instance
.
show
(
this
.
panel
)
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
],
this
[
'quitbtn'
]]
}
get
skinKey
()
{
return
'BagQuit'
}
}
\ No newline at end of file
egret/src/panels/Buy1Panel.ts
View file @
67209cf9
...
...
@@ -6,9 +6,17 @@ import { getlogItem } from "../Main";
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
setGlow
from
"../setGlow"
;
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
Buy1Panel
extends
Panel
{
buyBtn
:
eui
.
Button
onTouchTap_closeBtn
(){
super
.
onTouchTap_closeBtn
();
PanelCtrl
.
instance
.
show
(
'bagquit'
,
'Buy1'
)
}
start
(
data
)
{
super
.
start
();
...
...
@@ -31,10 +39,12 @@ export default class Buy1Panel extends Panel {
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
showToast
(
'兑换成功'
);
showToast
2
(
);
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
'哎呀,购买失败!
\
n元宝返回咯~'
)
}
},
PropType
.
HAMMER
);
//兑换道具
}
...
...
egret/src/panels/Buy2Panel.ts
View file @
67209cf9
...
...
@@ -6,8 +6,14 @@ import { getlogItem } from "../Main";
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
setGlow
from
"../setGlow"
;
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
Buy2Panel
extends
Panel
{
onTouchTap_closeBtn
(){
super
.
onTouchTap_closeBtn
();
PanelCtrl
.
instance
.
show
(
'bagquit'
,
'Buy2'
)
}
start
(
data
)
{
super
.
start
();
...
...
@@ -26,12 +32,14 @@ export default class Buy2Panel extends Panel {
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
showToast
(
'兑换成功'
);
showToast
2
(
);
if
(
success
)
{
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
'哎呀,购买失败!
\
n元宝返回咯~'
)
}
},
PropType
.
BOOM
);
//兑换道具
}
...
...
egret/src/panels/Buy3Panel.ts
View file @
67209cf9
...
...
@@ -6,8 +6,14 @@ import { getlogItem } from "../Main";
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
setGlow
from
"../setGlow"
;
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
Buy3Panel
extends
Panel
{
onTouchTap_closeBtn
(){
super
.
onTouchTap_closeBtn
();
PanelCtrl
.
instance
.
show
(
'bagquit'
,
'Buy3'
)
}
start
(
data
)
{
super
.
start
();
...
...
@@ -26,13 +32,15 @@ export default class Buy3Panel extends Panel {
NetManager
.
ins
.
clickLog
(
getlogItem
(
14
));
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
showToast
(
'兑换成功'
);
showToast
2
(
);
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
'哎呀,购买失败!
\
n元宝返回咯~'
)
}
},
PropType
.
CHANCE_NUM
);
//兑换道具
}
...
...
egret/src/panels/ExchangePanel.ts
View file @
67209cf9
...
...
@@ -6,8 +6,14 @@ import { getlogItem } from "../Main";
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
setGlow
from
"../setGlow"
;
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
export
default
class
ExchangePanel
extends
Panel
{
onTouchTap_closeBtn
(){
super
.
onTouchTap_closeBtn
();
PanelCtrl
.
instance
.
show
(
'bagquit'
,
'ExchangePanel'
)
}
start
(
data
)
{
super
.
start
();
...
...
@@ -26,13 +32,15 @@ export default class ExchangePanel extends Panel {
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
showToast
(
'兑换成功!去玩游戏~'
);
showToast
2
(
);
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
}
else
{
showToast
(
'哎呀,购买失败!
\
n元宝返回咯~'
)
}
},
PropType
.
CASH_NUM
);
//兑换道具
}
...
...
mock/happyclear/exchange.json
View file @
67209cf9
{
"success"
:
true
"success"
:
1
}
\ 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