Browse Source

Merge branch 'master' of http://192.168.0.115:3000/zhangyupeng/fullpage-show

gemercheung 1 year ago
parent
commit
a1de7f7dfb
3 changed files with 424 additions and 6 deletions
  1. 415 0
      src/assets/style/section1.css
  2. 7 6
      src/components/navGuide.vue
  3. 2 0
      src/pages/section2.vue

+ 415 - 0
src/assets/style/section1.css

@@ -0,0 +1,415 @@
+.section1 {
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-orient: vertical;
+    -webkit-box-direction: normal;
+        -ms-flex-flow: column;
+            flex-flow: column;
+    -webkit-box-align: center;
+        -ms-flex-align: center;
+            align-items: center;
+    -webkit-box-pack: center;
+        -ms-flex-pack: center;
+            justify-content: center;
+    background: url(../img/webp/section1/bg.webp) no-repeat center/cover;
+  }
+  .section1 .logo,
+  .section1 .title1,
+  .section1 .section1-wwbox img,
+  .section1 .section1-wwbox .title2,
+  .section1 .txt1,
+  .section1 .txt2,
+  .section1 .txt3 {
+    opacity: 0;
+  }
+  .section1 .logo {
+    z-index: 1;
+    width: 6rem;
+    height: 6.375rem;
+    margin-bottom: 1.5rem;
+    display: block;
+    background: url(../img/webp/section1/logo.webp) no-repeat center/cover;
+  }
+  .section1 .title1 {
+    z-index: 1;
+    font-size: 0.8rem;
+    color: #997946;
+    letter-spacing: 0.5rem;
+    -webkit-transform: translate3d(0, -3%, 0);
+            transform: translate3d(0, -3%, 0);
+  }
+  .section1 .section1-wwbox {
+    position: relative;
+    height: min(44rem, 70vh);
+    margin: -4rem 0 -6rem;
+    text-align: center;
+    -webkit-transform: translate3d(0, -3%, 0);
+            transform: translate3d(0, -3%, 0);
+  }
+  .section1 .section1-wwbox img {
+    z-index: 1;
+    position: relative;
+    max-width: 100%;
+    max-height: 100%;
+  }
+  .section1 .section1-wwbox .title2 {
+    z-index: 2;
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: url(../img/webp/section1/section1-title.webp) no-repeat center/contain;
+  }
+  .section1 .txt {
+    text-align: center;
+  }
+  .section1 .txt1 {
+    font-size: 2rem;
+    color: #ebeae3;
+    margin-bottom: 1rem;
+    letter-spacing: 0.2rem;
+  }
+  .section1 .txt2 {
+    font-size: 1.5rem;
+    color: #d09d68;
+  }
+  .section1 .txt3 {
+    font-size: 0.75rem;
+    color: #d09d68;
+    letter-spacing: 0.015rem;
+  }
+  .section1.active .logo,
+  .section1.active .title1,
+  .section1.active .txt1,
+  .section1.active .txt2,
+  .section1.active .txt3, .section1.down .logo,
+  .section1.down .title1,
+  .section1.down .txt1,
+  .section1.down .txt2,
+  .section1.down .txt3, .section1.up .logo,
+  .section1.up .title1,
+  .section1.up .txt1,
+  .section1.up .txt2,
+  .section1.up .txt3 {
+    -webkit-animation: section1-fadeInUp 0.8s 0.5s forwards;
+    animation: section1-fadeInUp 0.8s 0.5s forwards;
+  }
+  .section1.active .section1-wwbox img, .section1.down .section1-wwbox img, .section1.up .section1-wwbox img {
+    -webkit-animation: section1-fadeInUp-little 1.5s 0.8s forwards;
+    animation: section1-fadeInUp-little 1.5s 0.8s forwards;
+  }
+  .section1.active .section1-wwbox .title2, .section1.down .section1-wwbox .title2, .section1.up .section1-wwbox .title2 {
+    -webkit-animation: section1-fadeIn 1.2s 1s forwards;
+    animation: section1-fadeIn 1.2s 1s forwards;
+  }
+  .section1.active .title1, .section1.down .title1, .section1.up .title1 {
+    -webkit-animation-delay: 0.6s;
+    animation-delay: 0.6s;
+  }
+  .section1.active .txt1, .section1.down .txt1, .section1.up .txt1 {
+    -webkit-animation-delay: 0.9s;
+    animation-delay: 0.9s;
+  }
+  .section1.active .txt2, .section1.down .txt2, .section1.up .txt2 {
+    -webkit-animation-delay: 1s;
+    animation-delay: 1s;
+  }
+  .section1.active .txt3, .section1.down .txt3, .section1.up .txt3 {
+    -webkit-animation-delay: 1.1s;
+    animation-delay: 1.1s;
+  }
+  
+  @-webkit-keyframes section1-fadeIn {
+    0% {
+      opacity: 0.5;
+    }
+    to {
+      opacity: 1;
+    }
+  }
+  
+  @keyframes section1-fadeIn {
+    0% {
+      opacity: 0.5;
+    }
+    to {
+      opacity: 1;
+    }
+  }
+  @-webkit-keyframes section1-fadeInUp-little {
+    0% {
+      opacity: 0.1;
+      -webkit-transform: translateY(3%);
+              transform: translateY(3%);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+  }
+  @keyframes section1-fadeInUp-little {
+    0% {
+      opacity: 0.1;
+      -webkit-transform: translateY(3%);
+              transform: translateY(3%);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+  }
+  @-webkit-keyframes section1-fadeInUp {
+    0% {
+      opacity: 0.5;
+      -webkit-transform: translateY(10%);
+              transform: translateY(10%);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+  }
+  @keyframes section1-fadeInUp {
+    0% {
+      opacity: 0.5;
+      -webkit-transform: translateY(10%);
+              transform: translateY(10%);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+  }
+  @-webkit-keyframes section1-fadeInDown {
+    0% {
+      opacity: 0.5;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(10%);
+              transform: translateY(10%);
+    }
+  }
+  @keyframes section1-fadeInDown {
+    0% {
+      opacity: 0.5;
+      -webkit-transform: translateY(0);
+              transform: translateY(0);
+    }
+    to {
+      opacity: 1;
+      -webkit-transform: translateY(10%);
+              transform: translateY(10%);
+    }
+  }
+  .section2 {
+    background: url(../img/webp/section2/bg.webp) no-repeat center/cover;
+    line-height: 2;
+    color: #997946;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-pack: center;
+        -ms-flex-pack: center;
+            justify-content: center;
+    -webkit-box-align: center;
+        -ms-flex-align: center;
+            align-items: center;
+  }
+  .section2 ul li {
+    position: relative;
+    opacity: 0;
+  }
+  .section2 ul li h3,
+  .section2 ul li p {
+    font-size: 1.5rem;
+    padding: 0 var(--wall-margin-left3);
+  }
+  .section2 ul li h3 {
+    padding-top: 5.875rem;
+  }
+  .section2 ul li p {
+    text-align: right;
+    padding-bottom: 5.875rem;
+  }
+  .section2 ul li:first-child:after {
+    content: "";
+    position: absolute;
+    width: 100%;
+    height: 2px;
+    bottom: 0;
+    left: 0;
+    background: url(../img/webp/section2/line.webp) no-repeat center/contain;
+  }
+  .section2.down ul li {
+    opacity: 1;
+    -webkit-animation: down-upout 1s ease-out 0.1s forwards;
+    animation: down-upout 1s ease-out 0.1s forwards;
+  }
+  .section2.down ul li + li {
+    -webkit-animation-delay: 0.3s;
+    animation-delay: 0.3s;
+  }
+  .section2.active ul li {
+    opacity: 0;
+    -webkit-animation: activedown-upin 1s ease-out 0.3s forwards;
+    animation: activedown-upin 1s ease-out 0.3s forwards;
+  }
+  .section2.active ul li + li {
+    -webkit-animation-delay: 0.5s;
+    animation-delay: 0.5s;
+  }
+  .section2.active.up ul li {
+    opacity: 0;
+    -webkit-animation: activeup-downin 1s ease-out 0.3s forwards;
+    animation: activeup-downin 1s ease-out 0.3s forwards;
+  }
+  .section2.active.up ul li + li {
+    -webkit-animation-delay: 0.5s;
+    animation-delay: 0.5s;
+  }
+  .section2.up ul li {
+    opacity: 1;
+    -webkit-animation: up-downout 1s ease-out 0.3s forwards;
+    animation: up-downout 1s ease-out 0.3s forwards;
+  }
+  .section2.up ul li + li {
+    -webkit-animation-delay: 0.5s;
+    animation-delay: 0.5s;
+  }
+  
+  .tips-mobile {
+    display: none;
+    position: absolute;
+    z-index: 10;
+    bottom: 0;
+    left: 50%;
+    margin-left: -1rem;
+    width: 5rem;
+  }
+  .tips-mobile .img {
+    width: 100%;
+  }
+  
+  .wapbody .tips-mobile {
+    display: block;
+  }
+  
+  .scroll-icon {
+    opacity: 0;
+    z-index: 10;
+    position: absolute;
+    bottom: 1em;
+    left: 50%;
+    margin-left: -0.6em;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-pack: center;
+    -ms-flex-pack: center;
+    justify-content: center;
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    align-items: center;
+    height: 2em;
+    width: 1.2em;
+    font-size: 22px;
+    color: rgba(255, 255, 255, 0.5);
+    border-radius: 2em;
+    border: solid 2px;
+    -webkit-transition: 0.4s;
+    transition: 0.4s;
+  }
+  
+  .scroll-icon:hover {
+    background-color: rgba(255, 255, 255, 0.05);
+    color: #fff;
+  }
+  
+  .scroll-icon::after {
+    content: "";
+    display: inline-block;
+    width: 5px;
+    height: 5px;
+    background-color: #fff;
+    border-radius: 50%;
+    -webkit-animation: scroll-icon 2.2s infinite cubic-bezier(0.65, 0.05, 0.36, 1);
+    animation: scroll-icon 2.2s infinite cubic-bezier(0.65, 0.05, 0.36, 1);
+  }
+  
+  .pcbody .scroll-icon {
+    opacity: 1;
+  }
+  
+  @-webkit-keyframes scroll-icon {
+    0% {
+      -webkit-transform: translateY(-12px);
+      transform: translateY(-12px);
+      opacity: 0;
+    }
+    30%, 70% {
+      opacity: 1;
+    }
+    100% {
+      -webkit-transform: translateY(12px);
+      transform: translateY(12px);
+      opacity: 0;
+    }
+  }
+  @keyframes scroll-icon {
+    0% {
+      -webkit-transform: translateY(-12px);
+      transform: translateY(-12px);
+      opacity: 0;
+    }
+    30%, 70% {
+      opacity: 1;
+    }
+    100% {
+      -webkit-transform: translateY(12px);
+      transform: translateY(12px);
+      opacity: 0;
+    }
+  }
+  .video_demo {
+    position: absolute;
+    z-index: 10;
+    top: 0;
+    left: 0;
+    width: 100%;
+  }
+  
+  .video_canvas {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .wapbody .section1 .section1-wwbox {
+    height: 61vh;
+    margin: 4vh 7vw -6vh;
+    display: -webkit-box;
+    display: -ms-flexbox;
+    display: flex;
+    -webkit-box-align: end;
+        -ms-flex-align: end;
+            align-items: flex-end;
+  }
+  .wapbody .section1 .logo {
+    margin-top: -8vh;
+  }
+  .wapbody .section1 .title1 {
+    font-size: 1.2rem;
+  }
+  .wapbody .section1 .title2 {
+    background-position: top;
+    background-size: 80% auto;
+    background-image: url(../img/webp/wap/section1/section1-title.webp);
+  }

+ 7 - 6
src/components/navGuide.vue

@@ -1,7 +1,7 @@
 <template>
   <Teleport to="body">
-    <ul class="nav">
-      <li data-menuanchor="section1" class="active" @click="handleSlideTo(1)">
+    <ul class="nav" v-show="current != 0">
+      <li data-menuanchor="section2" class="active" @click="handleSlideTo(2)">
         <i></i>
         <div class="title">
           <h3>首页</h3>
@@ -48,8 +48,9 @@
   </Teleport>
 </template>
 <script setup>
-import { computed, onMounted, onUnmounted, watch, watchEffect } from "vue";
+import { computed,ref, onMounted, onUnmounted, watch, watchEffect } from "vue";
 import { emitter } from "../emitter.js";
+const current =ref(0)
 const props = defineProps({
   fullpage: Object,
 });
@@ -61,7 +62,7 @@ onMounted(() => {
     console.log("onLeave", params);
   });
   emitter.on("afterLoad", (params) => {
-    console.log("afterLoad", params);
+    current.value = params.index && params.index.index
   });
 });
 onUnmounted(() => {
@@ -71,12 +72,12 @@ onUnmounted(() => {
 
 const handleSlideTo = (index) => {
   if (props.fullpage) {
-    console.log("index", index);
     props.fullpage.api.moveTo(index);
   }
 };
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
+@import "/src/assets/style/index.css";
 .nav {
   position: fixed;
   left: 1rem;

+ 2 - 0
src/pages/section2.vue

@@ -21,6 +21,8 @@
 
 <style lang="scss" scoped>
 @import "/src/assets/style/index.css";
+@import "/src/assets/style/reset.css";
+@import "/src/assets/style/section1.css";
 .section {
   position: relative;
 }