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
d9fd726b
Commit
d9fd726b
authored
Aug 27, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
41c4dfad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
17 deletions
+33
-17
NoPrizePanel.ts
egret/libs/new_wx/components/NoPrizePanel.ts
+14
-5
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+14
-7
onNotSuccess.ts
egret/libs/new_wx/onNotSuccess.ts
+3
-3
NetManager.ts
egret/libs/tw/manager/NetManager.ts
+1
-1
getPlugOrderStatus.json
mock/json/getPlugOrderStatus.json
+1
-1
No files found.
egret/libs/new_wx/components/NoPrizePanel.ts
View file @
d9fd726b
...
...
@@ -11,7 +11,7 @@ export default class NoPrizePanel extends Panel {
start
(
data
)
{
super
.
start
();
// this.data.score = `本局分数 ${DataManager.ins.getData('ngameSubmit').data.score}`;
this
.
_level
=
parseInt
(
data
.
level
+
''
);
this
.
_level
=
parseInt
(
data
.
level
+
''
);
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
16
));
...
...
@@ -21,6 +21,14 @@ export default class NoPrizePanel extends Panel {
const
hc_submitData
=
DataManager
.
ins
.
getData
(
'hc_submit'
).
data
;
this
.
setStar
(
hc_submitData
.
stars
);
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
},
this
);
}
showlog
()
{
...
...
@@ -29,13 +37,14 @@ export default class NoPrizePanel extends Panel {
onTouchTap_closeBtn
()
{
super
.
onTouchTap_closeBtn
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
// if (this._level + 1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
// SceneCtrl.instance.change(ModuleTypes.START_SCENE);
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]
,
this
[
'goBtn'
]
]
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
setStar
(
nums
:
number
)
{
if
(
nums
==
0
)
{
setGray
(
this
[
'pic1'
]);
...
...
egret/libs/new_wx/components/PrizePanel.ts
View file @
d9fd726b
...
...
@@ -17,15 +17,21 @@ export default class PrizePanel extends Panel {
// this.img.height = this.picBigWidth / this.bigPicRatio;
// showCustomLog(lottery);
this
.
_level
=
parseInt
(
data
.
level
+
''
);
this
.
_level
=
parseInt
(
data
.
level
+
''
);
this
.
data
.
img
=
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
).
lottery
.
imgurl
;
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
},
this
);
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
},
this
);
this
.
showlog
();
NetManager
.
ins
.
hc_home
(()
=>
{
},
window
[
'collectRuleId'
]);
...
...
@@ -54,10 +60,11 @@ export default class PrizePanel extends Panel {
onTouchTap_closeBtn
():
any
{
super
.
onTouchTap_closeBtn
();
if
(
this
.
_level
+
1
<=
70
)
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
,
{
level
:
this
.
_level
+
1
});
else
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
SceneCtrl
.
instance
.
change
(
ModuleTypes
.
START_SCENE
);
// if (this._level +1 <= 70)
// SceneCtrl.instance.change(ModuleTypes.START_SCENE, { level: this._level + 1 });
// else
// SceneCtrl.instance.change(ModuleTypes.START_SCENE);
// SceneCtrl.instance.change(ModuleTypes.MAP_SCENE, createData());
}
...
...
@@ -68,5 +75,5 @@ export default class PrizePanel extends Panel {
useBtn
:
eui
.
Button
;
get
skinKey
()
{
return
'Prize'
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]
,
this
[
'goBtn'
]
]
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
}
\ No newline at end of file
egret/libs/new_wx/onNotSuccess.ts
View file @
d9fd726b
...
...
@@ -11,16 +11,16 @@ export default (data?: Data, netname?: NetName) => {
else
if
(
data
.
code
==
'2002007013'
)
showToast
(
'元宝不足哦,快去玩游戏赢元宝吧'
);
else
if
(
data
.
code
==
'E100202007'
||
data
.
code
==
'E100202008'
||
data
.
code
==
'E100202009'
||
data
.
code
==
'E100202010'
)
showToast
(
'
对不起,您的体力不足~
'
);
showToast
(
'
体力不足啦~邀请好友或去商城获得体力吧
'
);
else
if
(
data
.
code
==
'E1002070002'
||
data
.
code
==
'E1002070001'
)
{
showToast
(
'游戏分数提交失败~
\
n如有疑问,请联系客服'
)
}
else
if
(
data
.
code
==
'600005'
)
showToast
(
'体力值已达上限,不可购买'
)
else
if
(
data
.
code
==
'444444'
)
showToast
(
'操作太频繁,请稍后再试'
)
showToast
(
'操作太频繁,请稍后再试'
)
;
else
//其他异常
showToast
(
'活动太火爆了
\
n请稍后再来'
)
showToast
(
'活动太火爆了
\
n请稍后再来'
)
;
}
// export default (data: Data) => {
// if (data.code == 'E999999999')
...
...
egret/libs/tw/manager/NetManager.ts
View file @
d9fd726b
...
...
@@ -1817,7 +1817,7 @@ export class NetManager extends ABNetManager {
if
(
!
net
.
hideMsg
)
{
GDispatcher
.
dispatchEvent
(
ABNetManager
.
ERROR
,
net
);
showToast
(
'
活动太火爆了
\
n请稍后再来
'
);
showToast
(
'
网络开小差了,再试一次吧
'
);
}
}
// tslint:disable-next-line:max-file-line-count
...
...
mock/json/getPlugOrderStatus.json
View file @
d9fd726b
...
...
@@ -2,7 +2,7 @@
"result"
:
2
,
"lotteryCode"
:
1
,
"success"
:
true
,
"lotter
1
y"
:
{
"lottery"
:
{
"id"
:
1385
,
"imgurl"
:
"//yun.duiba.com.cn/developer/img/activityTool/slotMachine/virtual.png"
,
"isAppHidden"
:
true
,
...
...
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