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
2399f224
Commit
2399f224
authored
Nov 01, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6795a36f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
70 deletions
+93
-70
TurntableSkin.exml
egret/resource/skins/TurntableSkin.exml
+6
-6
ScratchPanel.ts
egret/src/panels/ScratchPanel.ts
+1
-1
RotaryData.ts
egret/src/panels/TurntablePanel/RotaryData.ts
+28
-5
Turntable.ts
egret/src/panels/TurntablePanel/Turntable.ts
+58
-58
No files found.
egret/resource/skins/TurntableSkin.exml
View file @
2399f224
...
@@ -6,27 +6,27 @@
...
@@ -6,27 +6,27 @@
<e:Group
id=
"panel"
anchorOffsetX=
"253.5"
anchorOffsetY=
"253.5"
rotation=
"0"
horizontalCenter=
"0"
verticalCenter=
"0"
width=
"507"
height=
"507"
>
<e:Group
id=
"panel"
anchorOffsetX=
"253.5"
anchorOffsetY=
"253.5"
rotation=
"0"
horizontalCenter=
"0"
verticalCenter=
"0"
width=
"507"
height=
"507"
>
<e:Image
scaleX=
"1"
scaleY=
"1"
anchorOffsetX=
"253.5"
anchorOffsetY=
"253.5"
rotation=
"0"
horizontalCenter=
"0"
verticalCenter=
"0"
source=
"turntable_panel_png"
/>
<e:Image
scaleX=
"1"
scaleY=
"1"
anchorOffsetX=
"253.5"
anchorOffsetY=
"253.5"
rotation=
"0"
horizontalCenter=
"0"
verticalCenter=
"0"
source=
"turntable_panel_png"
/>
<e:Group
id=
"prize0"
y=
"-10"
x=
"179"
>
<e:Group
id=
"prize0"
y=
"-10"
x=
"179"
>
<e:Image
id=
"img0"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img0"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_wealth_png"
/>
<e:Label
id=
"lab0"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xe33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab0"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xe33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
id=
"prize1"
y=
"187"
x=
"-11"
rotation=
"-60"
>
<e:Group
id=
"prize1"
y=
"187"
x=
"-11"
rotation=
"-60"
>
<e:Image
id=
"img1"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img1"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_oupon_png"
/>
<e:Label
id=
"lab1"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab1"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
id=
"prize2"
y=
"450"
x=
"64"
rotation=
"-120"
>
<e:Group
id=
"prize2"
y=
"450"
x=
"64"
rotation=
"-120"
>
<e:Image
id=
"img2"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img2"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_prop_png"
/>
<e:Label
id=
"lab2"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab2"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
id=
"prize3"
y=
"516.5"
rotation=
"-180"
x=
"329"
>
<e:Group
id=
"prize3"
y=
"516.5"
rotation=
"-180"
x=
"329"
>
<e:Image
id=
"img3"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img3"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_scratch_png"
/>
<e:Label
id=
"lab3"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab3"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
id=
"prize4"
y=
"320.1"
rotation=
"-240"
x=
"519.18"
>
<e:Group
id=
"prize4"
y=
"320.1"
rotation=
"-240"
x=
"519.18"
>
<e:Image
id=
"img4"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img4"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_thanks_png"
/>
<e:Label
id=
"lab4"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab4"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
<e:Group
id=
"prize5"
y=
"56.5"
rotation=
"-300"
x=
"444.18"
>
<e:Group
id=
"prize5"
y=
"56.5"
rotation=
"-300"
x=
"444.18"
>
<e:Image
id=
"img5"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
/>
<e:Image
id=
"img5"
y=
"50"
width=
"83"
height=
"83"
rotation=
"0"
horizontalCenter=
"0"
source=
"turntable_gameTime_png"
/>
<e:Label
id=
"lab5"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Label
id=
"lab5"
text=
"Label"
y=
"0"
size=
"24"
rotation=
"0"
textAlign=
"center"
verticalAlign=
"middle"
anchorOffsetX=
"75"
width=
"150"
anchorOffsetY=
"0"
height=
"50"
skewX=
"0"
textColor=
"0xE33330"
horizontalCenter=
"0"
visible=
"false"
/>
</e:Group>
</e:Group>
</e:Group>
</e:Group>
...
...
egret/src/panels/ScratchPanel.ts
View file @
2399f224
...
@@ -250,7 +250,7 @@ class ScratchItem extends eui.ItemRenderer {
...
@@ -250,7 +250,7 @@ class ScratchItem extends eui.ItemRenderer {
let
shareCode
=
res
.
data
;
// 分享码
let
shareCode
=
res
.
data
;
// 分享码
let
code
=
"12345678"
+
shareCode
;
let
code
=
"12345678"
+
shareCode
;
CFG
.
wxShareLink
=
window
[
'h5URL2'
]
+
"&shareCode="
+
code
;
// 分享链接
CFG
.
wxShareLink
=
window
[
'h5URL2'
]
+
"&shareCode="
+
code
;
// 分享链接
CFG
.
wxShareTitle
=
'
来自萌狮的好友申请
'
;
CFG
.
wxShareTitle
=
'
萌狮消消消
'
;
CFG
.
wxShareDesc
=
'超好玩的萌狮消消乐,快来和我一起玩吧~'
;
CFG
.
wxShareDesc
=
'超好玩的萌狮消消乐,快来和我一起玩吧~'
;
CFG
.
wxShareImg
=
"http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg"
;
CFG
.
wxShareImg
=
"http://yun.duiba.com.cn/db_games/xiaoxiaole2.jpg"
;
if
(
iswx
())
{
//微信端
if
(
iswx
())
{
//微信端
...
...
egret/src/panels/TurntablePanel/RotaryData.ts
View file @
2399f224
let
RotaryData
=
{
let
RotaryData
=
{
key
:
[
key
:
[],
],
data
:
{
data
:
{
4
:
[
{
start
:
0
*
60
-
20
,
end
:
0
*
60
+
20
}
],
5
:
[
{
start
:
1
*
60
-
20
,
end
:
1
*
60
+
20
}
],
6
:
[
{
start
:
1
*
60
-
20
,
end
:
1
*
60
+
20
}
],
7
:
[
{
start
:
1
*
60
-
20
,
end
:
1
*
60
+
20
}
],
3
:
[
{
start
:
2
*
60
-
20
,
end
:
2
*
60
+
20
}
],
scratch
:
[
{
start
:
3
*
60
-
20
,
end
:
3
*
60
+
20
}
],
thanks
:
[
{
start
:
4
*
60
-
20
,
end
:
4
*
60
+
20
}
],
1
:
[
{
start
:
4
*
60
-
20
,
end
:
4
*
60
+
20
}
],
2
:
[
{
start
:
5
*
60
-
20
,
end
:
5
*
60
+
20
}
],
}
}
};
};
...
...
egret/src/panels/TurntablePanel/Turntable.ts
View file @
2399f224
...
@@ -257,64 +257,64 @@ export default class Turntable extends Panel {
...
@@ -257,64 +257,64 @@ export default class Turntable extends Panel {
this
.
remainTimes
=
data
.
remainTimes
;
this
.
remainTimes
=
data
.
remainTimes
;
this
.
nextTimeNeedCoin
=
data
.
nextTimeNeedCoin
;
this
.
nextTimeNeedCoin
=
data
.
nextTimeNeedCoin
;
// 添加奖品
//
//
添加奖品
let
prizeList
=
[];
//
let prizeList = [];
for
(
let
v
of
data
.
luckyDrawInfo
.
prizeList
)
{
//
for(let v of data.luckyDrawInfo.prizeList) {
if
(
v
.
categoryType
==
1
)
{
//
if(v.categoryType == 1) {
continue
;
//
continue;
}
//
}
prizeList
.
push
(
Utils
.
deepClone
(
v
));
//
prizeList.push(Utils.deepClone(v));
}
//
}
//
prizeList
.
unshift
({
//
prizeList.unshift({
categoryType
:
'thanks'
,
//
categoryType: 'thanks',
},
{
//
}, {
categoryType
:
'scratch'
,
//
categoryType: 'scratch',
});
//
});
//
for
(
let
i
=
0
;
i
<
prizeList
.
length
;
i
++
)
{
//
for(let i = 0; i < prizeList.length; i++) {
let
v
=
prizeList
[
i
];
//
let v = prizeList[i];
let
prizeImg
=
""
;
//
let prizeImg = "";
switch
(
v
.
categoryType
)
{
//
switch(v.categoryType) {
case
"scratch"
:
//
case "scratch":
prizeImg
=
"turntable_scratch_png"
;
//
prizeImg = "turntable_scratch_png";
break
;
//
break;
case
"thanks"
:
//
case "thanks":
prizeImg
=
"turntable_thanks_png"
;
//
prizeImg = "turntable_thanks_png";
break
;
//
break;
case
1
:
//
case 1:
prizeImg
=
"turntable_thanks_png"
;
//
prizeImg = "turntable_thanks_png";
break
;
//
break;
case
2
:
//
case 2:
prizeImg
=
"turntable_gameTime_png"
;
//
prizeImg = "turntable_gameTime_png";
break
;
//
break;
case
3
:
//
case 3:
prizeImg
=
`turnable_icon
${
v
.
propType
}
_png`
;
//
prizeImg = `turnable_icon${v.propType}_png`;
break
;
//
break;
case
4
:
//
case 4:
prizeImg
=
"turntable_wealth_png"
;
//
prizeImg = "turntable_wealth_png";
break
;
//
break;
case
5
:
//
case 5:
prizeImg
=
"turntable_oupon_png"
;
//
prizeImg = "turntable_oupon_png";
break
;
//
break;
case
6
:
//
case 6:
prizeImg
=
"turntable_oupon_png"
;
//
prizeImg = "turntable_oupon_png";
break
;
//
break;
case
7
:
//
case 7:
prizeImg
=
"turntable_oupon_png"
;
//
prizeImg = "turntable_oupon_png";
break
;
//
break;
//
default
:
//
default:
break
;
//
break;
}
//
}
v
.
prizeImg
=
prizeImg
;
//
v.prizeImg = prizeImg;
RotaryData
.
key
.
push
(
v
.
categoryType
);
//
RotaryData.key.push(v.categoryType);
if
(
i
>=
6
)
{
//
if(i >= 6) {
continue
;
//
continue;
}
//
}
RotaryData
.
data
[
v
.
categoryType
]
=
[{
start
:
i
*
60
-
20
,
end
:
i
*
60
+
20
}];
//
RotaryData.data[v.categoryType] = [{start: i * 60 - 20, end: i * 60 + 20}];
this
[
`img
${
i
}
`
].
source
=
v
.
prizeImg
;
//
this[`img${i}`].source = v.prizeImg;
}
//
}
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
if
(
this
.
data
.
onceAgain
)
{
// 再抽一次
this
.
onTapStart
();
this
.
onTapStart
();
}
}
...
...
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