shaogen1995 2 anni fa
parent
commit
ba5698fefa

File diff suppressed because it is too large
+ 2563 - 0
web/package-lock.json


+ 1 - 0
web/package.json

@@ -13,6 +13,7 @@
     "axios": "^1.4.0",
     "sass": "^1.62.1",
     "sass-loader": "^13.2.2",
+    "vant": "^4.3.2",
     "vue": "^3.2.47",
     "vue-router": "^4.1.6"
   },

BIN
web/public/program/Build/Build13.data.unityweb


BIN
web/public/program/Build/Build13.framework.js.unityweb


BIN
web/public/program/Build/Build13.wasm.unityweb


+ 16 - 2
web/public/program/index.html

@@ -178,14 +178,28 @@
         "*")
     }
 
+    // 没有拼接,直接上色
+    window.modelSuccColor = () => {
+      window.parent.postMessage({
+          source: 'modelSuccColor',
+          data: true
+        },
+        "*")
+    }
+
 
 
     window.Internal_ShowTouchErrorTips = (data) => {
       console.log('result:', data);
     }
 
+    // 拼接模型 位置 不对
     window.showTouchErrorTips = (data) => {
-      console.log('result:', data);
+      window.parent.postMessage({
+          source: 'showTouchErrorTips',
+          data
+        },
+        "*")
     }
 
     window._Internal_ShowTouchErrorTips = (data) => {
@@ -236,7 +250,7 @@
 
         // 到处逛逛
         else if (res.data.source === "ShowUserData") {
-          console.log('到处逛逛,用户id:', data, '不知道为啥报错??');
+          console.log('到处逛逛,用户id:', data);
           unityInstance.SendMessage('Main', 'ShowUserData', data);
         }
 

+ 14 - 2
web/src/views/Editing.vue

@@ -271,12 +271,24 @@ const cutThreeTab = (id, num) => {
   }
 };
 
+import { showToast } from "vant";
+import 'vant/lib/index.css';
+
 onMounted(() => {
   window.addEventListener("message", (e) => {
     if (e.data.source === "modelSuccItem") {
       // 拼接模型成功,接受 unity的消息 取消 模型的选中ui效果
       elementActive.value = "";
     }
+    if (e.data.source === "modelSuccColor") {
+      // 没有拼接,直接上色
+      console.log("没有拼接,直接上色");
+    }
+    if (e.data.source === "showTouchErrorTips") {
+      // 没有拼接,直接上色
+      showToast("位置错误");
+      console.log("拼接模型,位置不对");
+    }
   });
 });
 </script>
@@ -326,7 +338,7 @@ onMounted(() => {
       height: 100%;
 
       > li {
-        opacity: .8;
+        opacity: 0.8;
         color: #706764;
         font-size: 16px;
         font-weight: bold;
@@ -472,7 +484,7 @@ onMounted(() => {
           }
 
           &.active {
-            border: 2px solid #3D4A51;
+            border: 2px solid #3d4a51;
           }
 
           &.colorActive {

File diff suppressed because it is too large
+ 675 - 413
web/yarn.lock