Commit 7378540a authored by Master Q's avatar Master Q

0909

parent 8cb78db7
This diff is collapsed.
......@@ -107,7 +107,8 @@ export enum TbNetName {
// 显示 小程序的loading 记得注视下 自带的 菊花图
showCustomLoading = 'mine.showCustomLoading',
closeCustomLoading = 'mine.closeCustomLoading'
closeCustomLoading = 'mine.closeCustomLoading',
addTrack = 'yoga.addTrack'
}
export enum TBBgm {
......
......@@ -108,7 +108,9 @@ export class GameOverPanel extends Panel {
this.drawBtn.addEventListener(FYGE.MouseEvent.CLICK, onceFnc(async function() {
this.btnDelay(this)
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_draw_prize'
}, null, null, true)
await sendTbNet(TbNetName.openMusic, {
isOn: true,
kurl: TBBgm.boxOpen,
......@@ -138,6 +140,9 @@ export class GameOverPanel extends Panel {
this.hidePanel()
//@ts-ignore
my && my.vibrateLong()
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_get_award'
}, null, null, true)
showPanel(PrizeShowPanel, Object.assign({}, data, this.data))
} else {
this.hidePanel()
......
......@@ -63,6 +63,13 @@ export class GameOverScene extends Scene {
UI.Btn(this, 'more-btn.png', function() {
this.btnDelay(this)
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_back'
}, null, null, true)
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_exit'
}, null, null, true)
// @ts-ignore
my.reLaunch({
url: '/pages/mainscene/mainscene'
......@@ -72,6 +79,9 @@ export class GameOverScene extends Scene {
var _s = UI.Sp(this, 'back-home.png', layers.stageCenterX, 1310)
_s.addEventListener(FYGE.MouseEvent.CLICK, function() {
this.btnDelay(this)
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_exit'
}, null, null, true)
addData(8)
//@ts-ignore
my && my.exit()
......@@ -89,10 +99,21 @@ export class GameOverScene extends Scene {
UI.Sp(bottomCont, 'jump-icon.png', 600, 40)
.addEventListener(FYGE.MouseEvent.CLICK, function() {
this.btnDelay(this)
addData(7)
// @ts-ignore
sendTbNet(TbNetName.navigateToOutside, {
url: this.data.productLink
// sendTbNet(TbNetName.navigateToOutside, {
// url: this.data.productLink
// })
my.call(
'navigateToOutside',
{url: this.data.productLink}, (res) => {
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:navigateToOutSide',
isSuccess: res.success,
response: JSON.stringify(res),
navigateUrl: this.data.productLink
}, null, null, true)
})
}, this)
}
......
......@@ -182,6 +182,10 @@ export class GameScene extends MotionInitScene {
// close bgm
this.musicBoolean = false
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_finish_game'
}, null, null, true)
//@ts-ignore
this.onSubmit({
id: Tools.globalData.startId,
......@@ -215,8 +219,11 @@ export class GameScene extends MotionInitScene {
async onSubmit(params) {
const {data, success, message} = await sendTbNet(TbNetName.submitGame, params)
if (success) {
const {score, isNewRecord, productLink, isWinPrize, level} = data
if (level != 0) {
const {score, isNewRecord, productLink, isWinPrize, level, isCompleteTask} = data
isCompleteTask && sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_finish_task'
}, null, null, true)
if (level) {
//@ts-ignore
my && my.vibrateShort()
......
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