1
0
tangning 3 дней назад
Родитель
Сommit
3df6f62f68
2 измененных файлов с 28 добавлено и 3 удалено
  1. 26 1
      public/model.html
  2. 2 2
      src/view/case/photos/canvas-photo-editor.js

+ 26 - 1
public/model.html

@@ -38,9 +38,34 @@
       <button onclick="__sdk.Camera.dollhouse()">模型</button>
     </div>
     <script>
+       let urlHasValue = function(key, isGetValue) {  
+        let querys = window.location.search.substr(1).split("&")
+        if (isGetValue) {
+            for (let i = 0; i < querys.length; i++) {
+                let keypair = querys[i].split("=")
+                if (keypair.length === 2 && keypair[0] === key) {
+                    return keypair[1]
+                }
+            }
+            return ""
+        } else { 
+            for (let i = 0; i < querys.length; i++) {
+                let keypair = querys[i].split("=")
+                if (keypair[0] == key) {
+                    return true
+                }
+            }
+            return false
+        }
+    } 
+    
+    
+    
+      let num = urlHasValue('m',true);
+    
       window.__sdk = new KanKan({
         dom: ".scene",
-        num: "SG-hx-7R336wSsXwL",
+        num,
         server: "/",
         resource: "/oss/",
         isRouteSnap : true 

+ 2 - 2
src/view/case/photos/canvas-photo-editor.js

@@ -802,8 +802,8 @@ export class CanvasPhotoEditor {
         width: this.rqWidth,//this.pageWidth - 2 * padding,
         height: this.rqHeight,
         x: (this.pageWidth - this.rqWidth) / 2,
-        y1: 87,
-        y2: 418,
+        y1: 106,
+        y2: 437,
         count: 2
       }
     }