Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tb_project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
钱根
tb_project
Commits
7378540a
Commit
7378540a
authored
Sep 09, 2021
by
Master Q
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0909
parent
8cb78db7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3819 additions
and
24 deletions
+3819
-24
ResJson.ts
src/ResJson.ts
+3778
-17
TaoBaoNet.ts
src/TaoBaoNet.ts
+2
-1
GameOverPanel.ts
src/panels/GameOverPanel.ts
+6
-1
GameOverScene.ts
src/scenes/GameOverScene/GameOverScene.ts
+24
-3
GameScene.ts
src/scenes/GameScene/GameScene.ts
+9
-2
No files found.
src/ResJson.ts
View file @
7378540a
This diff is collapsed.
Click to expand it.
src/TaoBaoNet.ts
View file @
7378540a
...
@@ -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
{
...
...
src/panels/GameOverPanel.ts
View file @
7378540a
...
@@ -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
()
...
...
src/scenes/GameOverScene/GameOverScene.ts
View file @
7378540a
...
@@ -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
)
}
}
...
...
src/scenes/GameScene/GameScene.ts
View file @
7378540a
...
@@ -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
()
...
...
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