Jelajahi Sumber

修改模型路径

shaogen1995 2 tahun lalu
induk
melakukan
87ffdaf807

+ 5 - 2
webNew/public/model.html

@@ -32,9 +32,12 @@
   <div class="bacBox"></div>
   <script>
     let number = getQueryVariable("m");
+
+    console.log('ppppppppp',number);
+
     window.autoRotate = true; // 是否自动旋转
-    fdage.embed('/goods/model/' + number, {
-      // fdage.embed('https://hnbwg.4dage.com/goods/model/' + number, {
+    // fdage.embed( number, {
+    fdage.embed('https://hnbwg.4dage.com' + number, {
       transparentBackground: true,
       width: 800,
       height: 600,

+ 2 - 2
webNew/src/components/Model/index.tsx

@@ -81,10 +81,10 @@ export default function Model({ modelId, closeModel }: props) {
       ) : null}
       {/* 模型盒子 */}
       <div className="ifrBox">
-        {info.fileName ? (
+        {info.filePath ? (
           <iframe
             ref={ifrBoxRef}
-            src={`model.html?m=${info.fileName}`}
+            src={`model.html?m=${info.filePath}`}
             frameBorder="no"
           ></iframe>
         ) : null}

+ 2 - 2
webNew/src/components/ModelM/index.tsx

@@ -86,10 +86,10 @@ export default function ModelM({ modelId, closeModel }: props) {
       ) : null}
       {/* 模型盒子 */}
       <div className="ifrBox">
-        {info.fileName ? (
+        {info.filePath ? (
           <iframe
             ref={ifrBoxRef}
-            src={`model.html?m=${info.fileName}`}
+            src={`model.html?m=${info.filePath}`}
             frameBorder="no"
           ></iframe>
         ) : null}

+ 2 - 2
webNew/src/pages/Model/index.tsx

@@ -71,10 +71,10 @@ export default function Model() {
       ) : null}
       {/* 模型盒子 */}
       <div className="ifrBox">
-        {info.fileName ? (
+        {info.filePath ? (
           <iframe
             ref={ifrBoxRef}
-            src={`model.html?m=${info.fileName}`}
+            src={`model.html?m=${info.filePath}`}
             frameBorder="no"
           ></iframe>
         ) : null}

+ 2 - 2
webNew/src/pages/ModelM/index.tsx

@@ -76,10 +76,10 @@ export default function ModelM() {
       ) : null}
       {/* 模型盒子 */}
       <div className="ifrBox">
-        {info.fileName ? (
+        {info.filePath ? (
           <iframe
             ref={ifrBoxRef}
-            src={`model.html?m=${info.fileName}`}
+            src={`model.html?m=${info.filePath}`}
             frameBorder="no"
           ></iframe>
         ) : null}