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

0909

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