qinyan 1 year ago
parent
commit
f484767885

+ 11 - 1
src/modules/editor/components/Viewport/Slider/SliderLeft/Templates/PreviewTplModal.tsx

@@ -9,11 +9,21 @@ export default defineUI({
   },
   emits: ["click"],
   setup(props, { emit }) {
+    const shareLink = `${location.origin}/share.html?id=${props.data._id}&isSys=true`;
+
     return () => {
       const { data } = props;
+
       return (
         <div class="flex">
-          <div class="w-660px h-660px bg-[#1F1F1F] scrollbar overflow-y-auto"></div>
+          <div class="w-660px h-660px py-20px bg-[#1F1F1F]">
+            <iframe
+              class="w-375px h-full mx-140px"
+              src={shareLink}
+              frameborder="0"
+              scrolling="no"
+            ></iframe>
+          </div>
           <div class="flex-1 ml-40px">
             <div class="mt-35px text-22px text-light-50 leading-snug">
               {data.title}

+ 3 - 3
src/pages/h5/share/Promotion.tsx

@@ -4,7 +4,7 @@ import { defineComponent } from "vue";
 
 export default defineComponent(() => {
   const editor = initEditor();
-  const params = new URLSearchParams(location.href.split("?")[1]);
+  const params = new URLSearchParams(location.href.split("?")[1].split("#")[0]);
   const id = params.get("id");
   const isSys = params.get("isSys");
   const isWk = params.get("isWk");
@@ -15,7 +15,7 @@ export default defineComponent(() => {
     if (isWk) {
       editor.actions.initWkDesign(id);
     } else {
-      editor.actions.initDesign(id, isSys?.split("#")[0]);
+      editor.actions.initDesign(id, isSys);
     }
 
     editor.controls.wxCtrl.setup(window.location.href);
@@ -41,7 +41,7 @@ export default defineComponent(() => {
 
   return () => (
     <div class="flex items-center justify-center h-100vh bg-gray-100">
-      <div class={isPc() ? `h-668px scrollbar` : `h-full`}>
+      <div class={isPc() ? `h-668px scrollbar` : `h-full overflow-x-hidden`}>
         <editor.components.Preview />
       </div>
     </div>