This commit is contained in:
		
							parent
							
								
									fb5814c597
								
							
						
					
					
						commit
						aa1c994376
					
				| 
						 | 
					@ -458,13 +458,6 @@ body {
 | 
				
			||||||
        cursor: pointer;
 | 
					        cursor: pointer;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    .footer {
 | 
					 | 
				
			||||||
      height: 60px;
 | 
					 | 
				
			||||||
      position: absolute;
 | 
					 | 
				
			||||||
      bottom: 0;
 | 
					 | 
				
			||||||
      left: 50%;
 | 
					 | 
				
			||||||
      transform: translateX(-50%);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.mars3d-popup-background {
 | 
					.mars3d-popup-background {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 12 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 13 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 12 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 13 KiB  | 
| 
						 | 
					@ -1,24 +1,93 @@
 | 
				
			||||||
<!-- src/components/Footer/Footer.vue -->
 | 
					<!-- src/components/Footer/Footer.vue -->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="footer">
 | 
					  <div class="footer">
 | 
				
			||||||
    <button>三维地图</button>
 | 
					    <div
 | 
				
			||||||
    <button>三维热图</button>
 | 
					      :class="{ 'footer-left': true, active: is2DActive === 1 }"
 | 
				
			||||||
 | 
					      @click="switchMap(1)"
 | 
				
			||||||
 | 
					      ref="leftBtn"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <div class="text">二维地图</div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div
 | 
				
			||||||
 | 
					      :class="{ 'footer-right': true, active: is2DActive === 2 }"
 | 
				
			||||||
 | 
					      @click="switchMap(2)"
 | 
				
			||||||
 | 
					      ref="rightBtn"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <div class="text">三维地图</div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "footer-bottom"
 | 
					  name: "my-Footer",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      is2DActive: 2 // 这个值可以是根据其他逻辑来动态改变的
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {},
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    switchMap(value) {
 | 
				
			||||||
 | 
					      console.log(value);
 | 
				
			||||||
 | 
					      if (value === 1) {
 | 
				
			||||||
 | 
					        window.marsMap.scene.morphTo2D();
 | 
				
			||||||
 | 
					        this.$refs.leftBtn.style.background = `url(${require("@/assets/img/left-hover.png")})`;
 | 
				
			||||||
 | 
					        this.$refs.rightBtn.style.background = `url(${require("@/assets/img/right-nohover.png")})`;
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        window.marsMap.scene.morphTo3D();
 | 
				
			||||||
 | 
					        this.$refs.leftBtn.style.background = `url(${require("@/assets/img/left-nohover.png")})`;
 | 
				
			||||||
 | 
					        this.$refs.rightBtn.style.background = `url(${require("@/assets/img/right-hover.png")})`;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.footer {
 | 
					.footer {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
  padding: 10px;
 | 
					  position: absolute;
 | 
				
			||||||
  background-color: #003087;
 | 
					  bottom: 1%;
 | 
				
			||||||
  border-top: 1px solid #00aaff;
 | 
					  width: 360px;
 | 
				
			||||||
 | 
					  left: 50%;
 | 
				
			||||||
 | 
					  transform: translateX(-50%);
 | 
				
			||||||
 | 
					  pointer-events: auto;
 | 
				
			||||||
 | 
					  .footer-left {
 | 
				
			||||||
 | 
					    width: 180px;
 | 
				
			||||||
 | 
					    height: 40px;
 | 
				
			||||||
 | 
					    line-height: 40px;
 | 
				
			||||||
 | 
					    color: #fff;
 | 
				
			||||||
 | 
					    background: url(../../../assets/img/left-nohover.png);
 | 
				
			||||||
 | 
					    background-size: 130% 230% !important;
 | 
				
			||||||
 | 
					    background-repeat: no-repeat !important;
 | 
				
			||||||
 | 
					    background-position: center !important;
 | 
				
			||||||
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					    .text {
 | 
				
			||||||
 | 
					      position: absolute;
 | 
				
			||||||
 | 
					      right: 20%;
 | 
				
			||||||
 | 
					      top: 17%;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .footer-right {
 | 
				
			||||||
 | 
					    width: 180px;
 | 
				
			||||||
 | 
					    height: 40px;
 | 
				
			||||||
 | 
					    line-height: 40px;
 | 
				
			||||||
 | 
					    color: #fff;
 | 
				
			||||||
 | 
					    background: url(../../../assets/img/right-hover.png);
 | 
				
			||||||
 | 
					    background-size: 130% 230% !important;
 | 
				
			||||||
 | 
					    background-repeat: no-repeat !important;
 | 
				
			||||||
 | 
					    background-position: center !important;
 | 
				
			||||||
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    cursor: pointer;
 | 
				
			||||||
 | 
					    .text {
 | 
				
			||||||
 | 
					      position: absolute;
 | 
				
			||||||
 | 
					      left: 20%;
 | 
				
			||||||
 | 
					      top: 17%;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
button {
 | 
					button {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@
 | 
				
			||||||
    <headerTop :homeData="homeView" />
 | 
					    <headerTop :homeData="homeView" />
 | 
				
			||||||
    <LeftSidebar :homeData="homeView" />
 | 
					    <LeftSidebar :homeData="homeView" />
 | 
				
			||||||
    <RightSidebar :homeData="homeView" />
 | 
					    <RightSidebar :homeData="homeView" />
 | 
				
			||||||
    <!-- <Footer /> -->
 | 
					    <Footer />
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,15 +12,15 @@
 | 
				
			||||||
import headerTop from "./headerTop/index.vue";
 | 
					import headerTop from "./headerTop/index.vue";
 | 
				
			||||||
import LeftSidebar from "./LeftSidebar/index.vue";
 | 
					import LeftSidebar from "./LeftSidebar/index.vue";
 | 
				
			||||||
import RightSidebar from "./RightSidebar/index.vue";
 | 
					import RightSidebar from "./RightSidebar/index.vue";
 | 
				
			||||||
// import Footer from "./Footer/index.vue";
 | 
					import Footer from "./Footer/index.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "App",
 | 
					  name: "App",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    headerTop,
 | 
					    headerTop,
 | 
				
			||||||
    LeftSidebar,
 | 
					    LeftSidebar,
 | 
				
			||||||
    RightSidebar
 | 
					    RightSidebar,
 | 
				
			||||||
    // Footer
 | 
					    Footer
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    homeData: {
 | 
					    homeData: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue