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
1cb0b973
Commit
1cb0b973
authored
Oct 26, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f45f777a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
11 deletions
+32
-11
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+30
-9
turnablebaseInfo.json
mock/happyclear/turnablebaseInfo.json
+2
-2
No files found.
egret/src/panels/TurntablePanel/Turntable.ts
View file @
1cb0b973
...
...
@@ -73,18 +73,18 @@ export default class Turntable extends Panel {
}
onTapStart
()
{
//
this.setBtnTouch(false); // 锁定按钮
//
Loading.instace.show();
//
GDispatcher.dispatchEvent('queryPrize');
this
.
setBtnTouch
(
false
);
// 锁定按钮
Loading
.
instace
.
show
();
GDispatcher
.
dispatchEvent
(
'queryPrize'
);
//1换个姿势再来一次2 奖励溜走了3 离奖励只差一毫米
//抽奖结束
//如果是刮刮卡类型
this
.
updateIcon
();
loadSvga
(
getResPath
()
+
'resource/assets/svgas/turnprize.svga'
).
then
(
async
(
mv
:
any
)
=>
{
// await wait(100);
PanelCtrl
.
instance
.
show
(
'TurnPrize2Panel'
,
{
mv
:
mv
});
});
//
this.updateIcon();
//
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
//
// await wait(100);
//
PanelCtrl.instance.show('TurnPrize2Panel', {mv: mv});
//
});
}
updateIcon
()
{
...
...
@@ -108,6 +108,22 @@ export default class Turntable extends Panel {
* 开始游戏
*/
private
doJoin
()
{
NetManager
.
ins
.
hc_turnableDojoin
((
success
,
res
)
=>
{
Loading
.
instace
.
hide
();
if
(
!
success
){
return
;
}
this
.
rotateByPrize
(
res
.
data
.
option
.
categoryType
,
()
=>
{
// if(!res.lottery || res.lottery.type == 'thanks') { // 如果未中奖
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL);
// this.setBtnTouch(true); // 开启按钮
// } else {
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, res.lottery);
// GDispatcher.dispatchEvent('getCount'); // 更新免费抽奖次数
// this.setBtnTouch(true); // 开启按钮
// }
});
})
/////////////////////////////////////////// 开始转盘并查询奖品 ///////////////////////////////////////////
// hdGameDoDojoin((success, res) => {
//
...
...
@@ -201,12 +217,17 @@ export default class Turntable extends Panel {
if
(
!
success
)
{
return
;
}
let
prizeList
=
Utils
.
deepClone
(
res
.
data
.
prizeList
);
let
prizeList
=
[];
for
(
let
v
of
res
.
data
.
luckyDrawInfo
.
prizeList
){
prizeList
.
push
(
Utils
.
deepClone
(
v
));
}
prizeList
.
push
({
categoryType
:
'thanks'
,
},
{
categoryType
:
'scratch'
,
});
for
(
let
i
=
0
;
i
<
prizeList
.
length
;
i
++
)
{
let
v
=
prizeList
[
i
];
let
prizeImg
=
""
;
...
...
mock/happyclear/turnablebaseInfo.json
View file @
1cb0b973
...
...
@@ -32,12 +32,12 @@
"title"
:
"奖品信息"
},
{
"categoryType"
:
8
,
"categoryType"
:
3
,
"num"
:
10
,
"propType"
:
2
,
"rate"
:
"30"
,
"title"
:
"奖品信息"
}
,
}
]
},
"remainTimes"
:
1
,
...
...
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