Commit 2c92e520 authored by wildfirecode13's avatar wildfirecode13

update

parent 72c654c1
......@@ -7,11 +7,16 @@ import { changeScene, showWaiting, destroyAllCtrls, showPanel, hideWaiting } fro
import { ResJson } from "./ResJson";
import { SkinJson } from "./SkinJson";
import { LoadingScene } from "./template/LoadingScene";
import { destroyWebNetData } from "./WebNet";
import { destroyWebNetData, sendWebNet, WebNetName } from "./WebNet";
import { StartScene } from "./template/StartScene";
import { NewbieScene } from "./template/NewbieScene";
import { IndexScene } from "./template/IndexScene";
import { ShareScene } from "./template/ShareScene";
import { ShareFailPanel } from "./panels/share_fail";
import { ShareSuccessPanel } from "./panels/share_success";
import { isFromShare } from "duiba-utils";
const isShare = () => { return !!1 };
/**
* 全局事件,为了和小程序交互
......@@ -59,11 +64,26 @@ export class Main {
console.log("初始化皮肤配置完成")
//加载通用资源
await RES.loadGroup("common");
console.log("通用资源加载完成")
await
console.log("通用资源加载完成")
//h5环境时,隐藏加载中
if (FYGE.getEnv() == "web" && document.getElementById("__loading__")) document.getElementById("__loading__").style.display = "none";
//显示场景
changeScene(IndexScene)
if (isShare()) {
changeScene(ShareScene);
} else {
const indexResult = await sendWebNet(WebNetName.index)
if (indexResult && indexResult.success && indexResult.data) {
if (indexResult.data.isNewbie)
changeScene(NewbieScene)
else
changeScene(IndexScene)
} else {
//网络异常??
}
}
}
/**
......
export default () => {
}
\ No newline at end of file
import { showPanel } from "../../module/ctrls";
import { Scene } from "../../module/views/Scene";
import getObject from "../getObject";
import { PrizePanel } from "../panels/prize";
export class ShareScene extends Scene {
get groupNames() { return ["share"] }
get skinName() { return "share" }
initUi() {
super.initUi();
}
async start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
}
}
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