Commit 1e186c3a authored by haiyoucuv's avatar haiyoucuv

埋点

parent a89bcd2c
......@@ -46,11 +46,13 @@
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="91d65b22-e37e-4b17-b43e-cdc81b9fe6ff" name="Default Changelist" comment="优化">
<list default="true" id="91d65b22-e37e-4b17-b43e-cdc81b9fe6ff" name="Default Changelist" comment="埋点">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Panels/IntroducePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Panels/IntroducePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Panels/NewUserPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Panels/NewUserPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Panels/OldUserPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Panels/OldUserPanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Main.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Main.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Panels/RulePanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Panels/RulePanel.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Scenes/MainScene/Const.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Scenes/MainScene/Const.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/egret/src/Scenes/MainScene/MainUI.ts" beforeDir="false" afterPath="$PROJECT_DIR$/egret/src/Scenes/MainScene/MainUI.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/mock/projectX/getRule.json" beforeDir="false" afterPath="$PROJECT_DIR$/mock/projectX/getRule.json" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -115,7 +117,7 @@
<recent name="$PROJECT_DIR$/egret/src/Scenes/RoomScene" />
</key>
</component>
<component name="RunManager" selected="npm.build">
<component name="RunManager" selected="npm.dev">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
......@@ -158,10 +160,10 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.build" />
<item itemvalue="npm.dev" />
<item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" />
<item itemvalue="npm.buildExml" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
......@@ -232,7 +234,7 @@
<workItem from="1603801989747" duration="68000" />
<workItem from="1603802096167" duration="1220000" />
<workItem from="1603848990672" duration="16597000" />
<workItem from="1603876060336" duration="202000" />
<workItem from="1603876060336" duration="1217000" />
</task>
<task id="LOCAL-00001" summary="fk">
<created>1599451512431</created>
......@@ -367,7 +369,14 @@
<option name="project" value="LOCAL" />
<updated>1603876030516</updated>
</task>
<option name="localTasksCounter" value="20" />
<task id="LOCAL-00020" summary="埋点">
<created>1603876435967</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1603876435967</updated>
</task>
<option name="localTasksCounter" value="21" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -393,7 +402,8 @@
<MESSAGE value="对svga videoItem做缓存" />
<MESSAGE value="优化仓库" />
<MESSAGE value="优化" />
<option name="LAST_COMMIT_MESSAGE" value="优化" />
<MESSAGE value="埋点" />
<option name="LAST_COMMIT_MESSAGE" value="埋点" />
</component>
<component name="WindowStateProjectService">
<state x="780" y="582" key="#Notifications" timestamp="1603801709214">
......@@ -408,7 +418,7 @@
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state x="506" y="183" key="CommitChangelistDialog2/30.23.1890.1177@30.23.1890.1177" timestamp="1603717521076" />
<state width="917" height="330" key="GridCell.Tab.0.bottom" timestamp="1603876070927">
<state width="917" height="330" key="GridCell.Tab.0.bottom" timestamp="1603877224349">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state width="933" height="330" key="GridCell.Tab.0.bottom.inPresentationMode" timestamp="1603801849937">
......@@ -416,8 +426,8 @@
</state>
<state width="933" height="330" key="GridCell.Tab.0.bottom.inPresentationMode/30.23.1890.1177@30.23.1890.1177" timestamp="1603801849937" />
<state width="998" height="330" key="GridCell.Tab.0.bottom/30.23.1410.877@30.23.1410.877" timestamp="1603810896004" />
<state width="917" height="330" key="GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177" timestamp="1603876070927" />
<state width="917" height="330" key="GridCell.Tab.0.center" timestamp="1603876070926">
<state width="917" height="330" key="GridCell.Tab.0.bottom/30.23.1890.1177@30.23.1890.1177" timestamp="1603877224349" />
<state width="917" height="330" key="GridCell.Tab.0.center" timestamp="1603877224346">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state width="933" height="330" key="GridCell.Tab.0.center.inPresentationMode" timestamp="1603801849936">
......@@ -425,8 +435,8 @@
</state>
<state width="933" height="330" key="GridCell.Tab.0.center.inPresentationMode/30.23.1890.1177@30.23.1890.1177" timestamp="1603801849936" />
<state width="998" height="330" key="GridCell.Tab.0.center/30.23.1410.877@30.23.1410.877" timestamp="1603810896002" />
<state width="917" height="330" key="GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177" timestamp="1603876070926" />
<state width="917" height="330" key="GridCell.Tab.0.left" timestamp="1603876070926">
<state width="917" height="330" key="GridCell.Tab.0.center/30.23.1890.1177@30.23.1890.1177" timestamp="1603877224346" />
<state width="917" height="330" key="GridCell.Tab.0.left" timestamp="1603877224345">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state width="933" height="330" key="GridCell.Tab.0.left.inPresentationMode" timestamp="1603801849936">
......@@ -434,8 +444,8 @@
</state>
<state width="933" height="330" key="GridCell.Tab.0.left.inPresentationMode/30.23.1890.1177@30.23.1890.1177" timestamp="1603801849936" />
<state width="998" height="330" key="GridCell.Tab.0.left/30.23.1410.877@30.23.1410.877" timestamp="1603810896001" />
<state width="917" height="330" key="GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177" timestamp="1603876070926" />
<state width="917" height="330" key="GridCell.Tab.0.right" timestamp="1603876070926">
<state width="917" height="330" key="GridCell.Tab.0.left/30.23.1890.1177@30.23.1890.1177" timestamp="1603877224345" />
<state width="917" height="330" key="GridCell.Tab.0.right" timestamp="1603877224347">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state width="933" height="330" key="GridCell.Tab.0.right.inPresentationMode" timestamp="1603801849937">
......@@ -443,7 +453,7 @@
</state>
<state width="933" height="330" key="GridCell.Tab.0.right.inPresentationMode/30.23.1890.1177@30.23.1890.1177" timestamp="1603801849937" />
<state width="998" height="330" key="GridCell.Tab.0.right/30.23.1410.877@30.23.1410.877" timestamp="1603810896002" />
<state width="917" height="330" key="GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177" timestamp="1603876070926" />
<state width="917" height="330" key="GridCell.Tab.0.right/30.23.1890.1177@30.23.1890.1177" timestamp="1603877224347" />
<state width="917" height="406" key="GridCell.Tab.1.bottom" timestamp="1603876038531">
<screen x="30" y="23" width="1890" height="1177" />
</state>
......@@ -504,18 +514,18 @@
</state>
<state x="246" y="270" key="SettingsEditor.inPresentationMode/30.23.1890.1177@30.23.1890.1177" timestamp="1603801810750" />
<state x="319" y="424" key="SettingsEditor/30.23.1890.1177@30.23.1890.1177" timestamp="1603802072691" />
<state x="575" y="338" key="Vcs.Push.Dialog.v2" timestamp="1603876032011">
<state x="575" y="338" key="Vcs.Push.Dialog.v2" timestamp="1603876440203">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state x="575" y="338" key="Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177" timestamp="1603876032011" />
<state x="575" y="338" key="Vcs.Push.Dialog.v2/30.23.1890.1177@30.23.1890.1177" timestamp="1603876440203" />
<state x="960" y="593" width="778" height="503" key="org.intellij.images.editor.actions.BackgroundImageDialog" timestamp="1603777183383">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state x="960" y="593" width="778" height="503" key="org.intellij.images.editor.actions.BackgroundImageDialog/30.23.1890.1177@30.23.1890.1177" timestamp="1603777183383" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1603876220461">
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup" timestamp="1603877233219">
<screen x="30" y="23" width="1890" height="1177" />
</state>
<state x="485" y="220" width="670" height="504" key="search.everywhere.popup/30.23.1410.877@30.23.1410.877" timestamp="1603247992539" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/30.23.1890.1177@30.23.1890.1177" timestamp="1603876220461" />
<state x="640" y="288" width="670" height="676" key="search.everywhere.popup/30.23.1890.1177@30.23.1890.1177" timestamp="1603877233219" />
</component>
</project>
\ No newline at end of file
import { DataManager } from "../libs/tw/manager/DataManager";
import {DataManager} from "../libs/tw/manager/DataManager";
import AssetAdapter from "./AssetAdapter";
import PanelCtrl from "./ctrls/panelCtrl";
import SceneCtrl from "./ctrls/sceneCtrl";
import Loading from "./loading/Loading";
import ThemeAdapter from "./ThemeAdapter";
import { ModuleTypes } from "./types/sceneTypes";
import { getResPath } from "./utils";
import {ModuleTypes} from "./types/sceneTypes";
import {getResPath} from "./utils";
import layers from "./views/layers";
import { PetIndexData } from "../libs/tw/data/pet/PetIndexData";
import { Buried } from '../libs/tw/util/Buried';
import {PetIndexData} from "../libs/tw/data/pet/PetIndexData";
import {Buried} from '../libs/tw/util/Buried';
import TopLayerCtrl from './ctrls/topLayerCtrl';
import { initstatistics } from "./comm/statistics";
import { docEvent } from "./comm/DocumentEvent";
import { Panels, Scenes, Tops } from "./types/Scenes";
import {initstatistics} from "./comm/statistics";
import {docEvent} from "./comm/DocumentEvent";
import {Panels, Scenes, Tops} from "./types/Scenes";
import Bar from "./components/Bar";
import {NetManager} from "../libs/tw/manager/NetManager";
let MainStage:egret.Stage = null;
export { MainStage };
let MainStage: egret.Stage = null;
export {MainStage};
class Main extends eui.UILayer {
protected createChildren(): void {
......@@ -62,7 +63,7 @@ class Main extends eui.UILayer {
try {
await RES.loadConfig("default.res.json", getResPath() + "resource/");
await this.loadTheme();
} catch(e) {
} catch (e) {
console.error(e);
}
}
......@@ -90,12 +91,8 @@ class Main extends eui.UILayer {
initstatistics(); // 页面停留时长(接口)
docEvent(); // document事件(显示,隐藏,重载)
// NetManager.ins.getRule((success, res)=>{
// if(!success){
// return;
// }
//
// });
NetManager.ins.getRule((success, res) => {
});
let bar = new Bar();
this.addChild(bar);
this.getGameRes().then(() => {
......
import Panel from "../views/Panel";
import { HtmlTextParser } from "../../libs/tc/util/HtmlTextParser";
import {HtmlTextParser} from "../../libs/tc/util/HtmlTextParser";
import TopLayerCtrl from "../ctrls/topLayerCtrl";
import {DataManager} from "../../libs/tw/manager/DataManager";
import {NetName} from "../../libs/tw/enum/NetName";
import {htmlToPureText} from "../Scenes/MainScene/Const";
import log = egret.log;
export default class RulePanel extends Panel {
public closeBtn: eui.Button;
......
......@@ -134,4 +134,16 @@ export function getToken() {
*/
export function detectionDiamond(x: number, y: number, w: number, h: number): boolean {
return Math.abs((x - w / 2) * h / 2) + Math.abs((y - h / 2) * w / 2) <= w * h / 4;
}
let el: HTMLDivElement;
export function htmlToPureText(htmlText) {
if (!el) {
el = document.createElement('div');
}
el.innerHTML = htmlText;
document.body.appendChild(el);
let pureText = el.innerText;
document.body.removeChild(el);
return pureText;
}
\ No newline at end of file
......@@ -130,6 +130,7 @@ export default class MainUI extends ComponentBase {
break;
case this.rule:
NetManager.ins.clickLog(getlogItem(28));
PanelCtrl.instance.show(RulePanel);
break;
default:
......@@ -172,6 +173,7 @@ export default class MainUI extends ComponentBase {
NetManager.ins.showLog(getlogItem(5)); // 商店按钮
NetManager.ins.showLog(getlogItem(6)); // 饲料区域
NetManager.ins.showLog(getlogItem(7)); // 水区域
NetManager.ins.showLog(getlogItem(28)); // 规则
/// TODO 根据数据初始化头像Panel
......
{
"success": true,
"message": "OK",
"data": "规则规则规则"
"data": "hasdf kjaskd f<br>sfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfassfhlikas jndghfas<br>ashilu jdgfaslkd<br>asdfh ulasdhf<br>asdf jasdfhasd <br>aslhidfu askd f",
"success": true
}
\ No newline at end of file
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