|
@@ -9,9 +9,15 @@ import { defineComponent } from "vue";
|
|
export default defineComponent(() => {
|
|
export default defineComponent(() => {
|
|
const editor = initEditor();
|
|
const editor = initEditor();
|
|
const resource = useResource();
|
|
const resource = useResource();
|
|
- resource.controls.categoryCtrl.init();
|
|
|
|
const auth = useAuth();
|
|
const auth = useAuth();
|
|
|
|
|
|
|
|
+ resource.controls.categoryCtrl.getUserCate().then(() => {
|
|
|
|
+ const categories = resource.controls.categoryCtrl.state.categories;
|
|
|
|
+ const list: any = categories.find((d: any) => d.type == "h5");
|
|
|
|
+ const res = list?.children.find((e: any) => e.name == "平台");
|
|
|
|
+ editor.store.setTplCategory(res?.children);
|
|
|
|
+ });
|
|
|
|
+
|
|
const params = new URLSearchParams(location.hash.split("?")[1]);
|
|
const params = new URLSearchParams(location.hash.split("?")[1]);
|
|
editor.actions.switchMode((params.get("mode") || "editPage") as EditorMode);
|
|
editor.actions.switchMode((params.get("mode") || "editPage") as EditorMode);
|
|
const prodId = params.get("id");
|
|
const prodId = params.get("id");
|
|
@@ -24,10 +30,6 @@ export default defineComponent(() => {
|
|
editor.actions.initWkDesign(prodId);
|
|
editor.actions.initWkDesign(prodId);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const categories = resource.controls.categoryCtrl.state.categories;
|
|
|
|
- const list: any = categories.find((d: any) => d.type == "h5");
|
|
|
|
- const res = list?.children.find((e: any) => e.name == "平台");
|
|
|
|
- editor.store.setTplCategory(res?.children);
|
|
|
|
editor.actions.initDesign(prodId, isSys);
|
|
editor.actions.initDesign(prodId, isSys);
|
|
} else {
|
|
} else {
|
|
editor.jumpIndexHtml();
|
|
editor.jumpIndexHtml();
|