Commit 6f16e9d0 authored by 陈子煜's avatar 陈子煜

1

parent f6a7549d
This diff is collapsed.
...@@ -26,6 +26,9 @@ export default class GetPrize extends Panel { ...@@ -26,6 +26,9 @@ export default class GetPrize extends Panel {
@property(Node) content: Node = null; @property(Node) content: Node = null;
@property(Node) svga: Node = null;
@property(Node) bg: Node = null;
onLoad() { onLoad() {
this.happy.on(Button.EventType.CLICK, this.clickHappy, this); this.happy.on(Button.EventType.CLICK, this.clickHappy, this);
this.share.on(Button.EventType.CLICK, this.clickShare, this); this.share.on(Button.EventType.CLICK, this.clickShare, this);
...@@ -34,8 +37,8 @@ export default class GetPrize extends Panel { ...@@ -34,8 +37,8 @@ export default class GetPrize extends Panel {
async start() { async start() {
const {data = this.data} = this.data const {data = this.data} = this.data
console.log(data,112233) console.log(data, 112233)
console.log(data.prizeName,22222) console.log(data.prizeName, 22222)
data.map((item, index) => { data.map((item, index) => {
const prize = instantiate(this.prizePrefab) const prize = instantiate(this.prizePrefab)
...@@ -49,12 +52,25 @@ export default class GetPrize extends Panel { ...@@ -49,12 +52,25 @@ export default class GetPrize extends Panel {
const numBg = prize.getChildByName("numBg") const numBg = prize.getChildByName("numBg")
const num = numBg.getChildByName("num") const num = numBg.getChildByName("num")
num.getComponent(Label).string = `X${item.sendCount}` num.getComponent(Label).string = `X${item.sendCount}`
})
this.bg.active = false;
this.svga.active = true
setTimeout(()=>{
this.bg.active = true
this.svga.active = false
},1000)
})
} }
change(){
this.bg.active = true
this.svga.active = false
}
clickShare() { clickShare() {
showPanel(SharePop, { showPanel(SharePop, {
prizeName: this.data[0].prizeName, prizeName: this.data[0].prizeName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment