Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zjzy_client_game
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
王勇霞
zjzy_client_game
Commits
b3091cb0
Commit
b3091cb0
authored
Mar 21, 2023
by
王勇霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拦截showToast
parent
187043e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
index.json
mock/webNet/game/index.json
+5
-5
ResJson.ts
src/ResJson.ts
+1
-1
StartScene.ts
src/scenes/StartScene.ts
+21
-0
No files found.
mock/webNet/game/index.json
View file @
b3091cb0
...
...
@@ -5,27 +5,27 @@
"dataInfo"
:
[
{
"num"
:
1
,
"context"
:
""
,
"context"
:
"
闲看晴云自卷舒
"
,
"context1"
:
"闲看云"
,
"ifComplete"
:
false
,
"count"
:
74413176.81524068
},
{
"num"
:
2
,
"context"
:
"
卷
"
,
"context1"
:
""
,
"context"
:
""
,
"context1"
:
"
卷
"
,
"ifComplete"
:
false
,
"count"
:
10
},
{
"num"
:
3
,
"context"
:
null
,
"context"
:
"云卷舒"
,
"ifComplete"
:
false
,
"count"
:
10
},
{
"num"
:
5
,
"context"
:
"
自在休闲
"
,
"context"
:
"
心无意
"
,
"ifComplete"
:
true
,
"count"
:
10
},
...
...
src/ResJson.ts
View file @
b3091cb0
...
...
@@ -744,5 +744,5 @@ export const ResJson = {
"name"
:
"svga"
}
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167936
3782
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167936
4981
/resource/"
}
\ No newline at end of file
src/scenes/StartScene.ts
View file @
b3091cb0
...
...
@@ -6,6 +6,7 @@ import { RulePanel } from "../panels/RulePanel";
import
{
sendWebNet
,
WebNetName
,
getPxTokenSave
,
getWebData
}
from
"../webNet"
;
import
{
GDispatcher
}
from
"../Main"
;
import
{
getUrlParams
}
from
"../../module/web/webTools"
;
const
allWords
:
any
=
[
'闲'
,
'看'
,
'晴'
,
'云'
,
'自'
,
'卷'
,
'舒'
,
'静'
,
'水'
,
'流'
,
'深'
,
'心'
,
'无'
,
'意'
,
'在'
,
'休'
]
export
class
StartScene
extends
Scene
{
get
groupNames
()
{
return
[
"StartScene"
]
};
get
skinName
()
{
return
"StartScene"
};
...
...
@@ -56,8 +57,28 @@ export class StartScene extends Scene {
GDispatcher
.
dispatchEvent
(
"openRule"
);
}
startId
;
getWordList
()
{
let
dataInfo
=
getWebData
(
WebNetName
.
indexInfo
).
data
.
dataInfo
;
let
hasWordList
:
any
=
[];
let
noWordList
:
any
=
[];
dataInfo
.
forEach
(
item
=>
{
if
(
item
.
context
)
{
hasWordList
=
hasWordList
.
concat
(
item
.
context
.
split
(
""
))
}
})
allWords
.
forEach
(
item
=>
{
if
(
!
hasWordList
.
includes
(
item
)
&&
!
noWordList
.
includes
(
item
))
{
noWordList
.
push
(
item
)
}
})
return
noWordList
}
async
openGame
()
{
this
.
btnDelay
(
this
.
startbtn
)
if
(
this
.
getWordList
().
length
==
0
)
{
showToast
(
"您已获取今日全部游戏奖励,
\n
请明日再来"
);
return
}
const
{
success
,
code
,
data
,
desc
}
=
await
sendWebNet
(
WebNetName
.
startGame
,
{
activityId
:
getUrlParams
(
'activityId'
),
type
:
3
...
...
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