diff --git a/src/App.vue b/src/App.vue
index ce311e6..13643dd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -105,6 +105,43 @@ export default defineComponent({
console.log(e);
}
+ EventBus.getInstance().on(EventNamesDefine.CheckDebug, () => {
+ const to_normal_url = () => {
+ const p1 = window.location.href.indexOf("?debug");
+ const p2 = window.location.href.indexOf("#");
+ const p3 = window.location.href.substring(0, p1);
+ const p4 = window.location.href.substring(p2);
+ window.location.href = p3 + p4;
+ };
+ if ($store.state.advanced_debug) {
+ const pwd = Math.floor(Math.random() * (999999 - 100000 + 1) + 100000);
+ $q.dialog({
+ title: "PWD?",
+ message: pwd + "?",
+ prompt: {
+ model: "",
+ type: "text", // optional
+ },
+ persistent: true,
+ cancel: true,
+ })
+ .onOk((data: string) => {
+ try {
+ const v = parseInt(data.replace(/-/g, "").trim());
+ if (pwd * pwd * pwd * new Date().getUTCHours() == v) {
+ return;
+ }
+ } catch (e) {
+ console.log(e);
+ }
+ to_normal_url();
+ })
+ .onCancel(() => {
+ to_normal_url();
+ });
+ }
+ });
+
window.onresize = (evt: any) =>
EventBus.getInstance().emit(EventNamesDefine.WindowResize, evt);
diff --git a/src/common/EventBus.ts b/src/common/EventBus.ts
index 9f40088..c0e3dd0 100644
--- a/src/common/EventBus.ts
+++ b/src/common/EventBus.ts
@@ -35,4 +35,5 @@ export namespace EventNamesDefine {
export const DropToWall = "onDropToWall";
export const RefreshJointActionEquipmentList =
"onRefreshJointActionEquipmentList";
+ export const CheckDebug = "CheckDebug";
}
diff --git a/src/components/SystemSettingDialog.vue b/src/components/SystemSettingDialog.vue
index aad6aa5..7fbe327 100644
--- a/src/components/SystemSettingDialog.vue
+++ b/src/components/SystemSettingDialog.vue
@@ -56,7 +56,7 @@
:disable="loading"
/>
diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index 208449e..b631c44 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -143,6 +143,10 @@ export default defineComponent({
show_back.value = true;
});
+ if ($store.state.advanced_debug) {
+ EventBus.getInstance().emit(EventNamesDefine.CheckDebug);
+ }
+
return {
landspace,
show_back,