Commit 1ba45eac authored by wildfirecode13's avatar wildfirecode13

update

parent bb129785
......@@ -3,14 +3,7 @@
"message": "",
"code": "",
"data": {
"ruleIdList": [
"ru_1",
"ru_2",
"ru_3",
"ru_4"
],
"drawStatus": 12,
"prizeId": "aa",
"gameCounts": 1
"shareCode":"123",
"isNewbie":true
}
}
\ No newline at end of file
......@@ -12,16 +12,17 @@
"mock-webpack-plugin": "^2.0.0",
"path": "^0.12.7",
"progress": "^2.0.0",
"readline": "^1.3.0",
"ts-loader": "^4.0.0",
"tslint": "^5.9.1",
"typescript": "^3.5.1",
"webpack": "^4.1.0",
"webpack-cli": "^3.1.1",
"webpack-dev-server": "^3.1.0",
"webpack-merge": "^4.1.2",
"readline": "^1.3.0"
"webpack-merge": "^4.1.2"
},
"dependencies": {
"@spark/utils": "^2.0.46",
"duiba-utils": "^1.0.9"
},
"scripts": {
......
......@@ -10,6 +10,7 @@ import { LoadingScene } from "./template/LoadingScene";
import { destroyWebNetData } from "./WebNet";
import { StartScene } from "./template/StartScene";
import { NewbieScene } from "./template/NewbieScene";
import { IndexScene } from "./template/IndexScene";
/**
......@@ -62,7 +63,7 @@ export class Main {
//h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//显示场景
changeScene(NewbieScene)
changeScene(IndexScene)
}
/**
......
......@@ -19,6 +19,10 @@ export enum WebNetName {
* 首页
*/
index = "/projectx/{projectId}/game/index.do",
/**
* 是否可分享
*/
canshare = "/projectx/{projectId}/game/canshare.do",
/**
* 参与
*/
......@@ -27,10 +31,7 @@ export enum WebNetName {
* 获取结果
*/
queryResult = "/projectx/{projectId}/game/queryResult.do",
/**
* is newbie?
*/
isNewbie = "/projectx/{projectId}/isNewbie.do",
/**
* 获取规则
*/
......
import { showPanel } from "../../module/ctrls";
import { unwatchPageVisibility, watchPageVisibility } from '@spark/utils';
import { changeScene, showPanel } from "../../module/ctrls";
import { Scene } from "../../module/views/Scene";
import getObject from "../getObject";
import { PrizePanel } from "../panels/prize";
import { sendWebNet, WebNetName } from '../WebNet';
import { NewbieScene } from './NewbieScene';
export class IndexScene extends Scene {
get groupNames() { return ["index"] }
get skinName() { return "index" }
initUi() {
super.initUi();
}
......@@ -16,17 +16,31 @@ export class IndexScene extends Scene {
console.log(this);
this.addEventListener(FYGE.MouseEvent.CLICK,()=>{
showPanel(PrizePanel);
},this);
// setTimeout(() => {
// changeScene(NewbieScene)
// }, 1000);
}
async onPageVisibilityChange(visible) {
console.log('页面' + visible ? '可见' : '不可见');
if (visible) {
var res = await sendWebNet(WebNetName.index)
if (res && res.success && res.data) {
// showPanel(PrizePanel);
}else{
// showPanel(PrizePanel);
}
}
}
initEvents() {
super.initEvents();
watchPageVisibility(this.onPageVisibilityChange)
}
removeEvents() {
super.removeEvents();
unwatchPageVisibility(this.onPageVisibilityChange)
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
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