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
ef861fa8
Commit
ef861fa8
authored
Aug 22, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a009714c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
8 deletions
+18
-8
onNotSuccess.ts
egret/libs/new_wx/onNotSuccess.ts
+9
-7
BloodPanel.ts
egret/src/panels/BloodPanel.ts
+3
-1
Buy1Panel.ts
egret/src/panels/Buy1Panel.ts
+2
-0
Buy2Panel.ts
egret/src/panels/Buy2Panel.ts
+2
-0
Buy3Panel.ts
egret/src/panels/Buy3Panel.ts
+2
-0
No files found.
egret/libs/new_wx/onNotSuccess.ts
View file @
ef861fa8
import
{
Data
}
from
"../tw/data/Data"
;
import
{
Data
}
from
"../tw/data/Data"
;
import
{
NetName
}
from
"../tw/enum/NetName"
;
import
{
NetName
}
from
"../tw/enum/NetName"
;
import
showAlertPanel
from
"./ctrls/showAlertPane
l"
;
import
{
showToast
}
from
"./ctrls/toastCtr
l"
;
export
default
(
data
?:
Data
,
netname
?:
NetName
)
=>
{
export
default
(
data
?:
Data
,
netname
?:
NetName
)
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
return
show
AlertPanel
(
'网络异常
\
n请隔一段时间再尝试'
);
return
show
Toast
(
'网络异常
\
n请隔一段时间再尝试'
);
}
}
if
(
data
.
code
==
'E999999999'
)
//系统级别错误 系统异常,\n请刷新后重试。
if
(
data
.
code
==
'E999999999'
)
//系统级别错误 系统异常,\n请刷新后重试。
showAlertPanel
(
'网络异常
\
n请隔一段时间再尝试'
);
showToast
(
'网络异常
\
n请隔一段时间再尝试'
);
else
if
(
data
.
code
==
'C600004'
)
showToast
(
'元宝不足哦,快去玩游戏赢元宝吧'
);
else
if
(
data
.
code
==
'E100201001'
)
else
if
(
data
.
code
==
'E100201001'
)
show
AlertPanel
(
'请登录后重试。'
)
show
Toast
(
'请登录后重试。'
)
else
if
(
data
.
code
==
'E100201007'
)
{
else
if
(
data
.
code
==
'E100201007'
)
{
show
AlertPanel
(
`对不起\n您的
${
CFG
.
unitName
}
不足`
);
show
Toast
(
`对不起\n您的
${
CFG
.
unitName
}
不足`
);
}
}
else
if
(
data
.
code
==
'E100202007'
||
data
.
code
==
'E100202008'
||
data
.
code
==
'E100202009'
||
data
.
code
==
'E100202010'
)
else
if
(
data
.
code
==
'E100202007'
||
data
.
code
==
'E100202008'
||
data
.
code
==
'E100202009'
||
data
.
code
==
'E100202010'
)
show
AlertPanel
(
'对不起
\
n您的次数不足。'
)
show
Toast
(
'对不起
\
n您的次数不足。'
)
else
//其他异常
else
//其他异常
show
AlertPanel
(
'网络异常
\
n请隔一段时间再尝试'
)
show
Toast
(
'网络异常
\
n请隔一段时间再尝试'
)
}
}
// export default (data: Data) => {
// export default (data: Data) => {
// if (data.code == 'E999999999')
// if (data.code == 'E999999999')
...
...
egret/src/panels/BloodPanel.ts
View file @
ef861fa8
...
@@ -38,10 +38,12 @@ export default class BloodPanel extends Panel {
...
@@ -38,10 +38,12 @@ export default class BloodPanel extends Panel {
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
[
'buyBtn'
].
enabled
=
true
;
this
[
'buyBtn'
].
enabled
=
true
;
if
(
success
)
{
if
(
success
)
{
showToast
(
'购买成功'
);
NetManager
.
ins
.
hc_home
(()
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
this
.
updateData
();
this
.
updateData
();
SceneCtrl
.
instance
.
updateScene
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
])
},
window
[
'collectRuleId'
]);
}
}
},
1
);
},
1
);
}
}
...
...
egret/src/panels/Buy1Panel.ts
View file @
ef861fa8
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
PropType
from
"../PropType"
;
import
PropType
from
"../PropType"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
export
default
class
Buy1Panel
extends
Panel
{
export
default
class
Buy1Panel
extends
Panel
{
buyBtn
:
eui
.
Button
buyBtn
:
eui
.
Button
...
@@ -24,6 +25,7 @@ export default class Buy1Panel extends Panel {
...
@@ -24,6 +25,7 @@ export default class Buy1Panel extends Panel {
this
.
buyBtn
.
enabled
=
true
;
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
if
(
success
)
{
this
.
hidePanel
();
this
.
hidePanel
();
showToast
(
'购买成功'
);
NetManager
.
ins
.
hc_home
(()
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
SceneCtrl
.
instance
.
updateScene
();
SceneCtrl
.
instance
.
updateScene
();
},
window
[
'collectRuleId'
]);
},
window
[
'collectRuleId'
]);
...
...
egret/src/panels/Buy2Panel.ts
View file @
ef861fa8
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
PropType
from
"../PropType"
;
import
PropType
from
"../PropType"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
export
default
class
Buy2Panel
extends
Panel
{
export
default
class
Buy2Panel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
...
@@ -20,6 +21,7 @@ export default class Buy2Panel extends Panel {
...
@@ -20,6 +21,7 @@ export default class Buy2Panel extends Panel {
this
.
buyBtn
.
enabled
=
false
;
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
this
.
buyBtn
.
enabled
=
true
;
this
.
buyBtn
.
enabled
=
true
;
showToast
(
'购买成功'
);
if
(
success
)
{
if
(
success
)
{
this
.
hidePanel
();
this
.
hidePanel
();
NetManager
.
ins
.
hc_home
(()
=>
{
NetManager
.
ins
.
hc_home
(()
=>
{
...
...
egret/src/panels/Buy3Panel.ts
View file @
ef861fa8
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
...
@@ -3,6 +3,7 @@ import { NetManager } from "../../libs/tw/manager/NetManager";
import
PropType
from
"../PropType"
;
import
PropType
from
"../PropType"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
getlogItem
}
from
"../Main"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
export
default
class
Buy3Panel
extends
Panel
{
export
default
class
Buy3Panel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
...
@@ -20,6 +21,7 @@ export default class Buy3Panel extends Panel {
...
@@ -20,6 +21,7 @@ export default class Buy3Panel extends Panel {
NetManager
.
ins
.
clickLog
(
getlogItem
(
14
));
NetManager
.
ins
.
clickLog
(
getlogItem
(
14
));
this
.
buyBtn
.
enabled
=
false
;
this
.
buyBtn
.
enabled
=
false
;
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
NetManager
.
ins
.
hc_exchange
((
success
)
=>
{
showToast
(
'购买成功'
);
this
.
buyBtn
.
enabled
=
true
;
this
.
buyBtn
.
enabled
=
true
;
if
(
success
)
{
if
(
success
)
{
this
.
hidePanel
();
this
.
hidePanel
();
...
...
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