liwei пре 1 година
родитељ
комит
f343a81502

+ 1 - 1
src/controllers/natsController.ts

@@ -18,7 +18,7 @@ export class BusController {
     
     queenApi.showLoading("服务连接中...");
     const wsHost = host ? host : this.getQuery("host");
-
+    
     console.log("ws host=>", wsHost)
     
     let ret = false;

+ 1 - 1
src/hooks/initAuthDef.ts

@@ -9,7 +9,7 @@ export function initAuthDef() {
       },
       key: "queentreesku3d",
       loginPath: "/login",
-      loginJumpPath: "/",
+      loginJumpPath: "/workbench",
       logoutJumpPath: "/login",
 
       needCompanyLogin: false,

+ 8 - 1
src/modules/editor/components/Viewport/Slider/SliderLeft.tsx

@@ -6,14 +6,21 @@ import { Container, Draggable } from "vue-dndrop";
 import { css } from "@linaria/core";
 import * as basicUI from "../../CompUI/basicUI";
 import * as customUI from "../../CompUI/customUI";
+import { useRoute } from "vue-router";
 
 export default defineUI({
   setup() {
     const editor = useEditor();
+    const r = useRoute();
 
     return () => (
       <div class="h-full flex flex-col">
-        <div class="p-16px border-bottom !border-2px">资源中心</div>
+      
+        <div class="p-16px border-bottom !border-2px" onClick={()=>{
+            editor.jumpIndexHtml();
+        }}>资源中心</div>
+        
+
         <div class="m-16px flex-1 flex flex-col h-0">
           <Radio.Group>
             <Radio.Button>模板</Radio.Button>

+ 11 - 0
src/modules/editor/index.ts

@@ -10,6 +10,7 @@ import { ImagePickController } from "./controllers/ImagePickerController";
 import { helpers } from "./helpers";
 import { https } from "./https";
 import { store } from "./stores";
+import { useRoute } from "vue-router";
 
 export class EditorModule extends ModuleRoot {
   config = this.setConfig({
@@ -37,6 +38,16 @@ export class EditorModule extends ModuleRoot {
   onReady() {
     this.actions.init();
   }
+
+  jumpIndexHtml(route = "#/") {
+    const _params = new URLSearchParams(decodeURIComponent(location.search));
+    const host = _params.get("host")
+    let link = `${location.origin}/index.html?host=${host}${route}`;
+    if (location.host == "www.infish.cn") {
+      link = `${location.origin}/projects/queenshow/index.html?host=${host}${route}`;
+    }
+    location.href = link;
+  }
 }
 
 export const { useEditor, initEditor } = EditorModule.hook("Editor");

+ 8 - 4
src/modules/resource/controllers/PromotionController.ts

@@ -9,16 +9,22 @@ export class PromotionController {
     console.log("onMenuClick", menu, item);
   }
   onEdit(item: any) {
+
+    const _params = new URLSearchParams(decodeURIComponent(location.search));
+    const host = _params.get("host")
+
     if (location.host == "www.infish.cn") {
-      const url = `${location.origin}/projects/queenshow/editor.html#/?id=${item._id}`;
+      const url = `${location.origin}/projects/queenshow/editor.html?host=${host}#/?id=${item._id}`;
       location.href = url;
       return;
     }
 
-    const url = `${location.origin}/editor.html#/?id=${item._id}`;
+    const url = `${location.origin}/editor.html?host=${host}#/?id=${item._id}`;
     location.href = url;
   }
   onPreview(item: any) {
+    const _params = new URLSearchParams(decodeURIComponent(location.search));
+    
     if (location.host == "www.infish.cn") {
       const url = `${location.origin}/projects/queenshow/share.html#/?id=${item._id}`;
       location.href = url;
@@ -26,7 +32,5 @@ export class PromotionController {
     }
     const url = `${location.origin}/share.html#/?id=${item._id}`;
     location.href = url;
-
-    
   }
 }

+ 9 - 9
src/pages/website/router.ts

@@ -2,14 +2,14 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
 import ProfileLayout from "./layout";
 
 const routes: Array<RouteRecordRaw> = [
-  {
-    path: "/",
-    name: "homePage",
-    meta: {
-      needAuth: true,
-    },
-    component: () => import("./Home"),
-  },
+  // {
+  //   path: "/",
+  //   name: "homePage",
+  //   meta: {
+  //     needAuth: true,
+  //   },
+  //   component: () => import("./Home"),
+  // },
   {
     path: "/create/:id",
     name: "create",
@@ -19,7 +19,7 @@ const routes: Array<RouteRecordRaw> = [
     component: () => import("./CreateMat"),
   },
   {
-    path: "/workbench",
+    path: "/",
     name: "workbench",
     meta: {
       needAuth: true,