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
0bddfaf6
Commit
0bddfaf6
authored
Oct 29, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f276e0c2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
29 deletions
+75
-29
exml.json
egret/.wing/exml.json
+4
-0
PrizePanel.ts
egret/libs/new_wx/components/PrizePanel.ts
+32
-3
PrizeSkin.exml
egret/resource/skins/PrizeSkin.exml
+7
-1
MainScene.ts
egret/src/mainScene/MainScene.ts
+31
-24
config.js
mock/config.js
+1
-1
No files found.
egret/.wing/exml.json
View file @
0bddfaf6
...
...
@@ -115,6 +115,10 @@
{
"key"
:
"data.img"
,
"value"
:
"http://yun.duiba.com.cn/babi/img/bm2ryg8wht.gif"
},
{
"key"
:
"data.url"
,
"value"
:
"turnprize_icon1_png"
}
]
},
...
...
egret/libs/new_wx/components/PrizePanel.ts
View file @
0bddfaf6
...
...
@@ -11,14 +11,43 @@ import { NetManager } from "../../tw/manager/NetManager";
import
Panel
from
"./Panel"
;
export
default
class
PrizePanel
extends
Panel
{
_level
;
updateOption
(
option
:
any
)
{
const
{
categoryType
,
img
,
num
,
propType
,
realValue
}
=
option
;
// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this
[
'propnums'
].
text
=
'x1'
;
if
(
num
)
this
[
'propnums'
].
text
=
'x'
+
num
;
switch
(
categoryType
)
{
case
2
:
this
[
'blood'
].
visible
=
true
;
this
[
'numsgroup'
].
visible
=
true
;
break
;
case
3
:
this
[
'numsgroup'
].
visible
=
true
;
this
[
'img'
].
visible
=
true
;
this
.
data
.
url
=
`turnprize_icon
${
propType
}
_png`
;
break
;
case
4
:
this
[
'numsgroup'
].
visible
=
true
;
this
[
'money'
].
visible
=
true
;
this
[
'propnums'
].
text
=
'x'
+
realValue
;
break
;
default
:
this
[
'img'
].
visible
=
true
;
this
.
data
.
url
=
img
;
break
;
}
}
start
(
data
)
{
super
.
start
();
setGray
(
this
[
'pica'
]);
setGray
(
this
[
'picb'
]);
setGray
(
this
[
'picc'
]);
this
.
_level
=
parseInt
(
data
.
level
+
''
);
const
itemid
=
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
).
lottery
.
itemId
;
this
.
data
.
img
=
`http://yun.duiba.com.cn/db_games/
${
window
[
'imgver'
]}
/
${
itemid
}
.png`
;
this
.
updateOption
(
data
.
option
)
;
this
[
'shareBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
NetManager
.
ins
.
clickLog
(
getlogItem
(
15
));
...
...
@@ -29,7 +58,7 @@ export default class PrizePanel extends Panel {
},
this
);
this
[
'goBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
()
=>
{
this
.
hidePanel
();
if
(
this
.
_level
+
1
<=
70
)
if
(
this
.
_level
+
1
<=
window
[
'last_level'
]
)
changeMapScene
({
level
:
this
.
_level
+
1
});
else
changeMapScene
();
...
...
egret/resource/skins/PrizeSkin.exml
View file @
0bddfaf6
...
...
@@ -4,6 +4,13 @@
<e:Component
y=
"859.74"
skinName=
"ADSmallSkin"
x=
"84"
visible=
"false"
/>
<e:Image
id=
"light"
source=
"common_prizelight_png"
x=
"374.19"
y=
"253.76"
anchorOffsetX=
"375.76"
anchorOffsetY=
"327.27"
/>
<e:Image
source=
"prizePanelbg_png"
y=
"61.15"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"img"
width=
"508"
height=
"225"
source=
"{data.url}"
horizontalCenter=
"0"
y=
"411.76"
visible=
"false"
/>
<e:Image
id=
"money"
source=
"signprize元宝_png"
y=
"402.2"
horizontalCenter=
"0"
scaleX=
"0.8"
scaleY=
"0.8"
visible=
"false"
/>
<e:Image
id=
"blood"
source=
"singprize体力_png"
y=
"364.8"
horizontalCenter=
"0"
visible=
"false"
/>
<e:Group
id=
"numsgroup"
x=
"396.38"
y=
"410.4"
visible=
"false"
>
<e:Image
id=
"numsbg0"
source=
"signprize_numsbg_png"
x=
"0"
y=
"0"
/>
<e:Label
id=
"propnums0"
text=
"X8"
size=
"22"
horizontalCenter=
"0"
verticalCenter=
"0"
verticalAlign=
"middle"
textAlign=
"center"
/>
</e:Group>
<e:Button
id=
"closeBtn"
label=
""
x=
"618"
y=
"235.25"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
...
...
@@ -28,7 +35,6 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Image
id=
"img"
y=
"429.28"
touchEnabled=
"true"
source=
"{data.img}"
width=
"512"
height=
"240"
x=
"117"
/>
<e:Image
id=
"picb"
source=
"点亮 副本 2_png"
x=
"142"
y=
"118.28"
/>
<e:Image
id=
"pica"
source=
"点亮 副本 2_png"
x=
"608"
y=
"118.28"
scaleX=
"-1"
/>
<e:Image
id=
"picc"
source=
"点亮_png"
y=
"69.28"
x=
"280"
/>
...
...
egret/src/mainScene/MainScene.ts
View file @
0bddfaf6
...
...
@@ -2474,34 +2474,41 @@ export default class MainScene extends Scene {
updateMainTimerAfterGetData
();
//submit之后再判断一次home,更新倒计时
});
const
submitData
=
DataManager
.
ins
.
getData
(
'hc_submit'
).
data
;
if
(
submitData
.
prizeType
==
1
)
{
//提交成功后捞结果
NetManager
.
ins
.
getPlugOrderStatus
((
s
)
=>
{
Loading2
.
instace
.
hide
();
playSound
(
SoundType
.
sucess
);
if
(
s
)
{
const
data
=
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
);
//区分奖品
if
(
data
.
lottery
&&
data
.
lottery
.
type
!=
"thanks"
)
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PRIZE_PANEL
,
{
level
:
this
.
chapter
});
}
else
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_PRIZE_PANEL
,
{
level
:
this
.
chapter
});
}
}
else
{
//失败直接显示未中奖
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_PRIZE_PANEL
,
{
level
:
this
.
chapter
});
}
},
submitData
.
prizeResponse
.
orderNum
,
()
=>
{
return
DataManager
.
ins
.
getData
(
'getPlugOrderStatus'
).
result
==
0
});
}
else
if
(
submitData
.
prizeType
==
2
)
{
if
(
submitData
.
option
)
{
Loading2
.
instace
.
hide
();
PanelCtrl
.
instance
.
show
(
'prize2'
,
{
level
:
this
.
chapter
});
}
else
{
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
PRIZE_PANEL
,
{
level
:
this
.
chapter
,
option
:
submitData
.
option
});
}
else
{
Loading2
.
instace
.
hide
();
PanelCtrl
.
instance
.
show
(
ModuleTypes
.
NO_PRIZE_PANEL
,
{
level
:
this
.
chapter
});
}
// if (submitData.prizeType == 1) {
// //提交成功后捞结果
// NetManager.ins.getPlugOrderStatus((s) => {
// Loading2.instace.hide();
// playSound(SoundType.sucess);
// if (s) {
// const data = DataManager.ins.getData('getPlugOrderStatus');
// //区分奖品
// if (data.lottery && data.lottery.type != "thanks") {
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter });
// } else {
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
// } else {
// //失败直接显示未中奖
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
// },
// submitData.prizeResponse.orderNum,
// () => { return DataManager.ins.getData('getPlugOrderStatus').result == 0 });
// } else if (submitData.prizeType == 2) {
// Loading2.instace.hide();
// PanelCtrl.instance.show('prize2', { level: this.chapter });
// } else {
// Loading2.instace.hide();
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
// }
}
else
{
Loading2
.
instace
.
hide
();
if
(
!
data
)
{
...
...
mock/config.js
View file @
0bddfaf6
...
...
@@ -46,7 +46,7 @@ const config = {
data
:
'./happyclear/openTreasureBox.json'
},
'/customActivity/happyclear/home'
:
{
data
:
'./happyclear/home
max
.json'
data
:
'./happyclear/home.json'
},
'/customActivity/happyclear/getLevelInfo'
:
{
data
:
'./happyclear/getLevelInfo.json'
...
...
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