Commit 393643ca authored by haiyoucuv's avatar haiyoucuv

init

parent 1d0c9d27
This diff is collapsed.
......@@ -156,7 +156,7 @@ export class HomeScene extends Scene {
sendLog(LOG_TYPE.CLICK, 5)
if (!store.checkActTime()) return;
await gameStore.startGame();
await gameStore.startGame(true);
changeScene(MainGame);
});
......
......@@ -166,7 +166,7 @@ export class MainGame extends Scene {
if (currentStage == 1) {
const submitSuc = await gameStore.submitOne();
if (submitSuc) {
const gameSuc = await gameStore.startGame();
const gameSuc = await gameStore.startGame(false);
if (gameSuc) {
await changeScene(MainGame);
} else {
......@@ -179,7 +179,7 @@ export class MainGame extends Scene {
if (MainGame.ins.player.length >= length) {
const submitSuc = await gameStore.submitTwo();
if (submitSuc) {
const gameSuc = await gameStore.startGame();
const gameSuc = await gameStore.startGame(false);
if (gameSuc) {
await changeScene(MainGame);
} else {
......@@ -278,7 +278,7 @@ export class MainGame extends Scene {
this.isOver = true;
const submitSuc = await gameStore.submitTwo();
if (submitSuc) {
const gameSuc = await gameStore.startGame();
const gameSuc = await gameStore.startGame(false);
if (gameSuc) {
await changeScene(MainGame);
} else {
......
......@@ -47,9 +47,11 @@ class GameStore {
startInfo: IStartInfo = null;
async startGame() {
async startGame(isNew: boolean) {
showWaiting();
const { success, data } = await sendWebNetWithToken(WebNetName.startGame);
const { success, data } = await sendWebNetWithToken(WebNetName.startGame, {
isNew: isNew,
});
hideWaiting();
if (!success) {
......
{
"data": [
{
"prizeType": 1,
"prizeId": "g4c4c3edd"
},
{
"prizeType": 2,
"prizeId": "g0e432eeb"
},
{
"prizeType": 3,
"prizeId": "g900c8442"
},
{
"prizeType": 4,
"prizeId": "g4c7ba888"
}
],
"success": true
}
\ No newline at end of file
......@@ -106,6 +106,5 @@
"prizeId": "g0e432eeb"
}
],
"data":[],
"success": true
}
\ No newline at end of file
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