Commit d4bcfd26 authored by 俞嘉婷's avatar 俞嘉婷

游戏引导

parent 99493a80
...@@ -22,7 +22,7 @@ export default [ ...@@ -22,7 +22,7 @@ export default [
"isAgent": true, "isAgent": true,
"boundYkCode": "eiusmod in dolor", "boundYkCode": "eiusmod in dolor",
"agreePrivacyFlag": true, "agreePrivacyFlag": true,
"newGuideFlag": 0, // 从0开始 "newGuideFlag": 1, // 从0开始
} }
} }
}, },
......
...@@ -21,6 +21,7 @@ import { LOG_KEY, pageView, sensorLog } from "@/utils/sensors"; ...@@ -21,6 +21,7 @@ import { LOG_KEY, pageView, sensorLog } from "@/utils/sensors";
import "./js/output"; import "./js/output";
import API from '@/api';
declare const Game: any; declare const Game: any;
...@@ -54,7 +55,11 @@ class GamePage extends React.Component<any, any> { ...@@ -54,7 +55,11 @@ class GamePage extends React.Component<any, any> {
targetStudy: 1,//背包数量 targetStudy: 1,//背包数量
targetTravel: 1,//飞机数量 targetTravel: 1,//飞机数量
time: 120,//时间,秒计 time: 120,//时间,秒计
needGuide: store.indexData?.newGuideFlag == 1,
}) })
if (store.indexData?.newGuideFlag == 1) {
API.completeGuide({ flag: 2 })
}
//监听事件,比如游戏结果,gameResult|exitGame //监听事件,比如游戏结果,gameResult|exitGame
game.addGlobalEvent("gameResult", (e) => { game.addGlobalEvent("gameResult", (e) => {
console.log(e.data)//成功 console.log(e.data)//成功
......
...@@ -99,6 +99,8 @@ class Store { ...@@ -99,6 +99,8 @@ class Store {
validUid?: boolean, validUid?: boolean,
rulePop?: boolean, rulePop?: boolean,
newGuideFlag: number,
} = {}; } = {};
firstIn = true; firstIn = true;
async updateIndex() { async updateIndex() {
......
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