Commit 754ce332 authored by AU-Pro-mac's avatar AU-Pro-mac

add new code --06

parent 50d67c3b
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"data": { "data": {
"fakeUserName": "cccccccccc", "fakeUserName": "cccccccccc",
"fakeUserImgUrl": "https://yun.duiba.com.cn/spark-dev/assets/白色.41dae4fd01f4750aea58f694b40d97a9da8f23ca.png", "fakeUserImgUrl": "https://yun.duiba.com.cn/spark-dev/assets/白色.41dae4fd01f4750aea58f694b40d97a9da8f23ca.png",
"win": false, "win": true,
"userName": "xxxxxxxxxxx", "userName": "xxxxxxxxxxx",
"userImgUrl": "https://yun.duiba.com.cn/spark-dev/assets/白色.41dae4fd01f4750aea58f694b40d97a9da8f23ca.png", "userImgUrl": "https://yun.duiba.com.cn/spark-dev/assets/白色.41dae4fd01f4750aea58f694b40d97a9da8f23ca.png",
"isNewUser": false "isNewUser": false
......
...@@ -129,23 +129,26 @@ export default class Root extends FYGE.Container { ...@@ -129,23 +129,26 @@ export default class Root extends FYGE.Container {
this.goodsContainer.removeAllGoods() this.goodsContainer.removeAllGoods()
this.scoreBoard.stopTime() this.scoreBoard.stopTime()
if (this.userInfo.win && this.scoreBoard.scoreLeft) {
console.log('user win')
// 用户出了结果,请求开奖,并展示相应弹窗 if (this.userInfo.win) {
// const gamePrizeRes = await sendTbNet(TbNetName.getPrizeInfo, {})
// let res = gamePrizeRes.data
// console.log('CSD-GAME over data:', res)
// showPanel(MatchingPanel, res)
} else { } else {
console.log('user fail') }
// 用户出了结果,请求开奖,并展示相应弹窗 if (this.userInfo.win && this.scoreBoard.scoreLeft) {
// const gamePrizeRes = await sendTbNet(TbNetName.getPrizeInfo, {}) //胜利
// let res = gamePrizeRes.data const prizeInfo = await sendTbNet(TbNetName.getPrizeInfo)
// console.log('CSD-GAME over data:', res) const prize = prizeInfo.data
// showPanel(MatchingPanel, res) console.log('user win --- CSD-GAME over data:', prizeInfo.data)
if (prize.type > 3) {
showPanel(SuccessPanel, prize)
} else {
showPanel(SuccessNoAwardPanel, prize)
}
} else {
//失败
console.log('user fail --- CSD-GAME over data:')
showPanel(FailedPanel)
} }
// GDispatcher.dispatchEvent('gameOver-csd', {score: score}) // GDispatcher.dispatchEvent('gameOver-csd', {score: score})
......
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