shaogen1995 2 年 前
コミット
ebe8ab3125

+ 28 - 24
QJKK/src/framework/show/component/Map.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- <div class='Map' @click="cutVr('fd720_WoDGV0K2r',13)"> -->
-  <div class='Map'>
+  <div class="Map">
     <div id="mars3dContainer" class="mars3d-container"></div>
   </div>
 </template>
@@ -48,13 +48,13 @@ export default {
     // 倾斜模型加载
     loadModel(_map) {
       const modelLayer = new mars3d.layer.TilesetLayer({
-        name: '雨花台模型',
-        url: 'https://testgis.4dage.com/yuhuatai1021-qp/tileset.json',
+        name: "雨花台模型",
+        url: "https://testgis.4dage.com/yuhuatai1021-qp/tileset.json",
         maximumMemoryUsage: 2048,
         position: { alt: -290 },
         preloadFlightDestinations: true,
-        flyTo: false
-      })
+        flyTo: false,
+      });
       _map.addLayer(modelLayer);
     },
     drawLabel(_layer) {
@@ -86,7 +86,7 @@ export default {
       >
         雨花台烈士纪念馆
       </div>
-      <div><img src="/MapBs.png"/></div>
+      <div><img src="/YHT/Qjkk/MapBs.png"/></div>
     </div>`,
           horizontalOrigin: mars3d.Cesium.HorizontalOrigin.CENTER,
           verticalOrigin: mars3d.Cesium.VerticalOrigin.BOTTOM,
@@ -94,22 +94,20 @@ export default {
           // scaleByDistance: new mars3d.Cesium.NearFarScalar(100, 1, 1000, 0.5),
           scale: 0.1,
           clampToGround: false,
-        }
-      })
+        },
+      });
       graphic.on(mars3d.EventType.click, () => {
-        this.cutVr('fd720_WoDGV0K2r', 13);
-      })
+        this.cutVr("fd720_WoDGV0K2r", 13);
+      });
 
       _layer.addGraphic(graphic);
     },
     cutVr(code, index) {
-      this.$emit('mapCutVr', code, index)
-    }
+      this.$emit("mapCutVr", code, index);
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
-
-  },
+  created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 初始化地图实例
@@ -121,21 +119,27 @@ export default {
         let graphicLayer = new mars3d.layer.GraphicLayer();
         map.addLayer(graphicLayer);
         this.drawLabel(graphicLayer);
-        map.setCameraView({ lat: 31.99314, lng: 118.776577, alt: 656, heading: 350, pitch: -43 });
+        map.setCameraView({
+          lat: 31.99314,
+          lng: 118.776577,
+          alt: 656,
+          heading: 350,
+          pitch: -43,
+        });
       },
       (error) => {
         console.log("地图初始化失败", error);
       }
     );
   },
-  beforeCreate() { }, //生命周期 - 创建之前
-  beforeMount() { }, //生命周期 - 挂载之前
-  beforeUpdate() { }, //生命周期 - 更新之前
-  updated() { }, //生命周期 - 更新之后
-  beforeDestroy() { }, //生命周期 - 销毁之前
-  destroyed() { }, //生命周期 - 销毁完成
-  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
-}
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
 </script>
 <style lang='less' scoped>
 .Map {

+ 3 - 1
QJKK/src/framework/show/component/rightInco.vue

@@ -60,6 +60,7 @@
 </template>
 
 <script>
+import { addNumAPI } from "@/utils/api";
 export default {
   name: "rightInco",
   components: {},
@@ -95,7 +96,7 @@ export default {
     //点击复制链接
     copyPcTxt() {
       // 存储传递过来的数据
-      let OrderNumber = window.location.origin+'/YHT/index.html';
+      let OrderNumber = window.location.origin + "/YHT/index.html";
       // 创建一个input 元素
       // createElement() 方法通过指定名称创建一个元素
       let newInput = document.createElement("input");
@@ -122,6 +123,7 @@ export default {
         setTimeout(() => {
           this.like = false;
         }, 2000);
+        addNumAPI("star");
       }
       if (type === 4) this.share = true;
     },

+ 23 - 0
QJKK/src/utils/api.js

@@ -0,0 +1,23 @@
+
+export const baseURL = 'http://project.4dage.com:8036' //线上地址
+//export const baseURL ='http://192.168.20.55:8036' //本地地址
+//export const baseURL ='' //甲方有服务器的打包地址
+export const addNumAPI = (type) => {
+  fetch(`${baseURL}/api/visit/saveType`, {
+    method: "post",
+    body: JSON.stringify({
+      moduleType: "web",
+      type,
+    }),
+    headers: {
+      appId:
+        "E9A27605CEB3FFAF48F4D7B86858A03D9868419F60B5A45027FB6E6867F4EDA9",
+      "Content-Type": "application/json",
+    },
+  })
+    .then((res) => res.text()) //请求得到的数据转换为text
+    .then((res) => {
+    });
+}
+
+

+ 2 - 0
SWKK/src/components/Rbottom.vue

@@ -118,6 +118,7 @@
 </template>
 
 <script>
+import { addNumAPI } from "@/utils/api";
 import Swiper from "./swiper.js";
 export default {
   name: "Rbottom",
@@ -280,6 +281,7 @@ export default {
         setTimeout(() => {
           this.like = false;
         }, 2000);
+        addNumAPI("star");
       } else if (type === 4) {
         this.$emit("stopPlay");
         this.share = true;

+ 23 - 0
SWKK/src/utils/api.js

@@ -0,0 +1,23 @@
+
+export const baseURL = 'http://project.4dage.com:8036' //线上地址
+//export const baseURL ='http://192.168.20.55:8036' //本地地址
+//export const baseURL ='' //甲方有服务器的打包地址
+export const addNumAPI = (type) => {
+  fetch(`${baseURL}/api/visit/saveType`, {
+    method: "post",
+    body: JSON.stringify({
+      moduleType: "web",
+      type,
+    }),
+    headers: {
+      appId:
+        "E9A27605CEB3FFAF48F4D7B86858A03D9868419F60B5A45027FB6E6867F4EDA9",
+      "Content-Type": "application/json",
+    },
+  })
+    .then((res) => res.text()) //请求得到的数据转换为text
+    .then((res) => {
+    });
+}
+
+