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
b19c448b
Commit
b19c448b
authored
Nov 08, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
240d6e87
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
Buy1Panel.ts
egret/src/panels/Buy1Panel.ts
+7
-1
Buy2Panel.ts
egret/src/panels/Buy2Panel.ts
+6
-1
Buy3Panel.ts
egret/src/panels/Buy3Panel.ts
+6
-1
No files found.
egret/src/panels/Buy1Panel.ts
View file @
b19c448b
...
...
@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
MainScene
from
"../mainScene/MainScene"
;
export
default
class
Buy1Panel
extends
Panel
{
buyBtn
:
eui
.
Button
...
...
@@ -39,7 +40,12 @@ export default class Buy1Panel extends Panel {
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
this
.
hidePanel
();
if
(
SceneCtrl
.
instance
.
currentScene
instanceof
MainScene
){
showToast
(
'兑换成功'
);
}
else
{
showToast2
();
}
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
...
...
egret/src/panels/Buy2Panel.ts
View file @
b19c448b
...
...
@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
MainScene
from
"../mainScene/MainScene"
;
export
default
class
Buy2Panel
extends
Panel
{
onTouchTap_closeBtn
(){
...
...
@@ -33,7 +34,11 @@ export default class Buy2Panel extends Panel {
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
if
(
SceneCtrl
.
instance
.
currentScene
instanceof
MainScene
){
showToast
(
'兑换成功'
);
}
else
{
showToast2
();
}
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
...
...
egret/src/panels/Buy3Panel.ts
View file @
b19c448b
...
...
@@ -8,6 +8,7 @@ import setGlow from "../setGlow";
import
getHomeData
from
"../getHomeData"
;
import
{
showToast2
}
from
"../../libs/new_wx/ctrls/toastCtrl2"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
MainScene
from
"../mainScene/MainScene"
;
export
default
class
Buy3Panel
extends
Panel
{
onTouchTap_closeBtn
(){
...
...
@@ -34,7 +35,11 @@ export default class Buy3Panel extends Panel {
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
if
(
SceneCtrl
.
instance
.
currentScene
instanceof
MainScene
){
showToast
(
'兑换成功'
);
}
else
{
showToast2
();
}
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
...
...
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