Commit b3091cb0 authored by 王勇霞's avatar 王勇霞

拦截showToast

parent 187043e0
...@@ -5,27 +5,27 @@ ...@@ -5,27 +5,27 @@
"dataInfo": [ "dataInfo": [
{ {
"num": 1, "num": 1,
"context": "", "context": "闲看晴云自卷舒",
"context1": "闲看云", "context1": "闲看云",
"ifComplete": false, "ifComplete": false,
"count": 74413176.81524068 "count": 74413176.81524068
}, },
{ {
"num": 2, "num": 2,
"context": "", "context": "",
"context1": "", "context1": "",
"ifComplete": false, "ifComplete": false,
"count": 10 "count": 10
}, },
{ {
"num": 3, "num": 3,
"context": null, "context": "云卷舒",
"ifComplete": false, "ifComplete": false,
"count": 10 "count": 10
}, },
{ {
"num": 5, "num": 5,
"context": "自在休闲", "context": "心无意",
"ifComplete": true, "ifComplete": true,
"count": 10 "count": 10
}, },
......
...@@ -744,5 +744,5 @@ export const ResJson = { ...@@ -744,5 +744,5 @@ export const ResJson = {
"name": "svga" "name": "svga"
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1679363782/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/template/1679364981/resource/"
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ import { RulePanel } from "../panels/RulePanel"; ...@@ -6,6 +6,7 @@ import { RulePanel } from "../panels/RulePanel";
import { sendWebNet, WebNetName, getPxTokenSave, getWebData } from "../webNet"; import { sendWebNet, WebNetName, getPxTokenSave, getWebData } from "../webNet";
import { GDispatcher } from "../Main"; import { GDispatcher } from "../Main";
import { getUrlParams } from "../../module/web/webTools"; import { getUrlParams } from "../../module/web/webTools";
const allWords:any = ['闲', '看', '晴', '云', '自', '卷', '舒', '静', '水', '流', '深', '心', '无', '意', '在', '休']
export class StartScene extends Scene { export class StartScene extends Scene {
get groupNames() { return ["StartScene"] }; get groupNames() { return ["StartScene"] };
get skinName() { return "StartScene" }; get skinName() { return "StartScene" };
...@@ -56,8 +57,28 @@ export class StartScene extends Scene { ...@@ -56,8 +57,28 @@ export class StartScene extends Scene {
GDispatcher.dispatchEvent("openRule"); GDispatcher.dispatchEvent("openRule");
} }
startId; 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() { async openGame() {
this.btnDelay(this.startbtn) this.btnDelay(this.startbtn)
if (this.getWordList().length == 0) {
showToast("您已获取今日全部游戏奖励,\n请明日再来");
return
}
const { success, code, data, desc } = await sendWebNet(WebNetName.startGame, { const { success, code, data, desc } = await sendWebNet(WebNetName.startGame, {
activityId: getUrlParams('activityId'), activityId: getUrlParams('activityId'),
type: 3 type: 3
......
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