Commit 1ba45eac authored by wildfirecode13's avatar wildfirecode13

update

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