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

拦截showToast

parent 187043e0
......@@ -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
},
......
......@@ -744,5 +744,5 @@ export const ResJson = {
"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";
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
......
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