tremble 4 anni fa
parent
commit
df5eb300c6

+ 1 - 1
web/package.json

@@ -9,9 +9,9 @@
   },
   "dependencies": {
     "core-js": "^3.6.5",
-    "swiper": "^6.7.5",
     "v-viewer": "^1.6.4",
     "vue": "^2.6.11",
+    "swiper": "^5.3.8",
     "vue-awesome-swiper": "^4.1.1",
     "vue-router": "^3.2.0"
   },

+ 7 - 7
web/public/static/css/main.css

@@ -3343,7 +3343,7 @@ a.hasHover:hover, a:active {
 }
 
 .darkGlass {
-    background-color: rgba(0, 0, 0, .5);
+    background-color: #BC1515;
 }
 
 .ui-icon {
@@ -4064,15 +4064,15 @@ a.hasHover:hover, a:active {
     bottom: 2px;
     left: 2px;
     width: 130px;
-    height: 20px;
-    padding: 6px;
-    color: #fff;
+    height: 30px;
+    line-height: 30px;
+    padding: 0 8px;
+    color: #DBA761;
     background-color: rgba(0, 0, 0, .7);
     overflow: hidden;
     white-space: nowrap;
     font-weight: 100;
     text-align: center;
-    line-height: 4px;
     z-index: 100;
     -moz-transform: translate3d(0, 0, 0);
     -ms-transform: translate3d(0, 0, 0);
@@ -4123,7 +4123,7 @@ a.hasHover:hover, a:active {
 
 .frame .slidee li.thumbImg.active>img, .frame .slidee li.thumbImg.hasHover.active>img:hover {
     opacity: 1;
-    border-color: #00b4ed
+    border: 3px solid #DBA761;
 }
 
 .scrollbar {
@@ -4138,7 +4138,7 @@ a.hasHover:hover, a:active {
 .scrollbar .handle {
     width: 100px;
     height: 100%;
-    background: rgba(255, 255, 255, .75);
+    background: #DBA761;
     border-radius: 5px
 }
 

BIN
web/public/static/images/pc_step3.png


BIN
web/public/static/images/phone_step3.png


BIN
web/src/assets/images/project/mobile.jpg


BIN
web/src/assets/images/project/qrcode.png


+ 101 - 57
web/src/components/hotspot/image.vue

@@ -2,9 +2,9 @@
     <div v-if="!isMobile" class="images" :style="{backgroundImage:`url(${require('@/assets/images/project/hotspot_bg.jpg')})`}">
       <div class="title">{{hotspot.title}}</div>
       <div class="img-con">
-        <span @click="active-=1" :class="{noshow:active<=0}">上一张</span>
+        <span @click="handlePage('prev')" >上一张</span>
         <img v-viewer :src="hotspot.images[active]" alt="">
-        <span @click="active+=1" :class="{noshow:active>=hotspot.images.length - 1}">下一张</span>
+        <span @click="handlePage('next')">下一张</span>
         <ul class="pagna">
           <li v-for="(item,i) in hotspot.images" :class="{active:i==active}" :key="i"></li>
         </ul>
@@ -14,16 +14,17 @@
     </div>
     <div v-else class="mbimages" :style="{backgroundImage:`url(${require('@/assets/images/project/mb_hostpot.jpg')})`}">
       <div class="title">{{hotspot.title}}</div>
-      <swiper class="swiper-wrapper swiper-wrapper-n" :options="swiperOption">
-        <swiper-slide  class="swiper-slide" v-for="(item,index) in hotspot.images" :key="index">
-          <div class="sl-item">
-            <img v-viewer :src="item">
+      <div class="swcon" v-swiper:mySwiper="swiperOption">
+        <ul class="swiper-wrapper swiper-wrapper-n">
+          <div class="swiper-slide" v-for="(item,index) in hotspot.images" :key="index">
+            <div class="sl-item">
+              <img v-viewer :src="item">
+            </div>
           </div>
-        </swiper-slide>
-      </swiper>
-      <ul class="pagna">
-        <li v-for="(item,i) in hotspot.images" :class="{active: i == mbactive}" :key="i"></li>
-      </ul>
+        </ul>
+        <div class="swiper-pagination pagination" slot="pagination"></div>
+      </div>
+   
       <div v-if="hotspot.content" class="desc">
         <p>简介:</p>
         <div v-html="hotspot.content"></div>
@@ -32,13 +33,13 @@
 </template>
 
 <script>
-import { Swiper, SwiperSlide } from "vue-awesome-swiper";
-import 'swiper/swiper-bundle.css'
+import { directive } from "vue-awesome-swiper";
+// import style (<= Swiper 5.x)
+import "swiper/css/swiper.css";
 
 export default {
-  components: {
-    Swiper,
-    SwiperSlide,
+  directives: {
+    swiper: directive,
   },
   props:['hotspot'],
   data(){
@@ -47,6 +48,26 @@ export default {
       mbactive:0
     }
   },
+  methods:{
+    handlePage(type){
+    if (type==='next') {
+      console.log(this.hotspot.images.length);
+      if (this.active>=this.hotspot.images.length - 1) {
+          this.active = 0
+          return
+      }
+      this.active += 1
+    }
+    else{
+      if (this.active==0) {
+          this.active = this.hotspot.images.length - 1
+          return
+      }
+      this.active -= 1
+    }
+    
+  },
+  },
   computed:{
     swiperOption() {
       let that = this
@@ -55,11 +76,13 @@ export default {
         autoplay: false,
         centeredSlides: true,
         watchSlidesProgress: true,
-        loop: false,
+        loop: true,
+        pagination: {
+          el: '.swiper-pagination'
+        },
         on:{
           slideChangeTransitionEnd:function () {
             that.mbactive = this.realIndex
-            console.log(that.mbactive);
           }
         }
       }
@@ -80,13 +103,14 @@ export default {
   background-repeat: no-repeat;
   text-align: center;
   .title{
-    padding: 0 80px;
+    max-width: 94%;
+    padding: 0 60px;
     display: inline-block;
     color: #DBA761;
     font-weight: bold;
-    font-size: 36px;
-    height: 70px;
-    line-height: 70px;
+    font-size: 30px;
+    min-height: 60px;
+    line-height: 60px;
     background: #BC1515;
     border-radius: 60px;
     margin: 45px auto;
@@ -98,6 +122,7 @@ export default {
     position: relative;
     padding-bottom: 40px;
     >span{
+      @juli:60px;
       display: inline-block;
       padding: 0 30px;
       box-sizing: content-box;
@@ -108,9 +133,17 @@ export default {
       border: 2px solid #DBA761;
       border-radius: 37px;
       cursor: pointer;
+      position: absolute;
+      left: @juli;
+      top: 50%;
+      transform: translateY(-50%);
       &:hover,&.active{
         color: #DBA761;
       }
+      &:last-of-type{
+        left: unset;
+        right: @juli;
+      }
     }
     >img{
       max-width: 1000px;
@@ -165,50 +198,59 @@ export default {
     border-radius: 60px;
     margin: 20px auto;
   }
-  .swiper-wrapper {
-    height: 250px;
-    padding: 0;
-    .swiper-slide  {
-      width: 85%;
-      transform-style: preserve-3d;
-      position: relative;
-      height: 100%;
-      margin: 0 10px;
-      transform:translate3d(0,0,0);
-      .sl-item{
-        position: absolute;
-        top: 0;
-        left: 50%;
+  .swcon{
+    position: relative;
+    padding-bottom: 30px;
+    .swiper-wrapper {
+      height: 250px;
+      padding: 0;
+      .swiper-slide  {
+        width: 85%;
+        transform-style: preserve-3d;
+        position: relative;
         height: 100%;
-        transform: translateX(-50%);
-        width: 100%;
-        overflow: hidden;
-        border: 4px solid #BC1515;
-        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
-        background-color: #757477;
-        >img{
-          height: 100%;
-          transform: translateX(-50%);
+        margin: 0 10px;
+        transform:translate3d(0,0,0);
+        .sl-item{
           position: absolute;
+          top: 0;
           left: 50%;
+          height: 100%;
+          transform: translateX(-50%);
+          width: 100%;
+          overflow: hidden;
+          border: 4px solid #BC1515;
+          box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+          background-color: #757477;
+          >img{
+            height: 100%;
+            transform: translateX(-50%);
+            position: absolute;
+            left: 50%;
+          }
         }
       }
     }
-  }
-  .pagna{
-    text-align: center;
-    z-index: 999;
-    >li{
-      width: 40px;
-      height: 4px;
-      background: #BC1515;
-      display: inline-block;
-      margin: 0 4px;
-      &.active{
-        background: #DBA761;
+
+    .pagination{
+      position: absolute;
+      bottom: 5px;
+      & /deep/ .swiper-pagination-bullet,& /deep/ .swiper-pagination-bullet-active{
+          width: 40px!important;
+          height: 4px!important;
+          background: #BC1515!important;
+          display: inline-block!important;
+          margin: 0 4px!important;
+          border-radius: 0;
+          opacity: 1;
+      }
+      & /deep/ .swiper-pagination-bullet-active{
+            background: #DBA761!important;
       }
     }
   }
+  
+  
   .desc{
     color: #DBA761;
     text-align: left;
@@ -227,4 +269,6 @@ export default {
     }
   }
 }
+
+
 </style>

+ 0 - 1
web/src/components/hotspot/index.vue

@@ -39,7 +39,6 @@ export default {
     }
   },
   mounted(){
-    console.log(this.hotspot);
     iconArr.forEach(item => {
       if (this.hotspot[item.key]) {
         this.active = !this.active ? item.id : this.active;

+ 156 - 111
web/src/components/hotspot/video.vue

@@ -1,108 +1,135 @@
 <template>
-  <div v-if="!isMobile" class="images" :style="{backgroundImage:`url(${require('@/assets/images/project/video_bg.jpg')})`}">
-    <div class="title">{{hotspot.title}}</div>
+  <div
+    v-if="!isMobile"
+    class="images"
+    :style="{
+      backgroundImage: `url(${require('@/assets/images/project/video_bg.jpg')})`,
+    }"
+  >
+    <div class="title">{{ hotspot.title }}</div>
     <div class="img-con">
-      <span @click="active-=1" :class="{noshow:active<=0}">上一张</span>
+      <span @click="active -= 1" :class="{ noshow: active <= 0 }">上一张</span>
       <video controls autoplay>
-        <source :src="hotspot.video[active].url" type="video/mp4">
-      </video> 
-      <span @click="active+=1" :class="{noshow:active>=hotspot.video.length - 1}">下一张</span>
+        <source :src="hotspot.video[active].url" type="video/mp4" />
+      </video>
+      <span
+        @click="active += 1"
+        :class="{ noshow: active >= hotspot.video.length - 1 }"
+        >下一张</span
+      >
       <ul class="pagna">
-        <li v-for="(item,i) in hotspot.video" :class="{active:i==active}" :key="i"></li>
+        <li
+          v-for="(item, i) in hotspot.video"
+          :class="{ active: i == active }"
+          :key="i"
+        ></li>
       </ul>
     </div>
 
-    <div class="desc" v-html="hotspot.content">
-    </div>
+    <div class="desc" v-html="hotspot.content"></div>
   </div>
-  <div v-else class="mbimages" :style="{backgroundImage:`url(${require('@/assets/images/project/mb_hostpot.jpg')})`}">
-      <div class="title">{{hotspot.title}}</div>
-      <swiper class="swiper-wrapper swiper-wrapper-n" :options="swiperOption">
-        <swiper-slide  class="swiper-slide" v-for="(item,index) in hotspot.video" :key="index">
+  <div
+    v-else
+    class="mbimages"
+    :style="{
+      backgroundImage: `url(${require('@/assets/images/project/mb_hostpot.jpg')})`,
+    }"
+  >
+    <div class="title">{{ hotspot.title }}</div>
+    <div class="swcon" v-swiper:mySwipervd="swiperOption">
+      <ul class="swiper-wrapper swiper-wrapper-n">
+        <div
+          class="swiper-slide"
+          v-for="(item, index) in hotspot.video"
+          :key="index"
+        >
           <div class="sl-item">
             <video controls autoplay>
-              <source :src="item.url" type="video/mp4">
-            </video> 
+              <source :src="item.url" type="video/mp4" />
+            </video>
           </div>
-        </swiper-slide>
-      </swiper>
-      <ul class="pagna">
-        <li v-for="(item,i) in hotspot.video" :class="{active: i == mbactive}" :key="i"></li>
+        </div>
       </ul>
-      <div v-if="hotspot.content" class="desc">
-        <p>简介:</p>
-        <div v-html="hotspot.content"></div>
-      </div>
+      <div class="swiper-pagination pagination" slot="pagination"></div>
     </div>
-</template>
 
+    <div v-if="hotspot.content" class="desc">
+      <p>简介:</p>
+      <div v-html="hotspot.content"></div>
+    </div>
+  </div>
+</template>
 
 <script>
-import { Swiper, SwiperSlide } from "vue-awesome-swiper";
-import 'swiper/swiper-bundle.css'
+import { directive } from "vue-awesome-swiper";
+// import style (<= Swiper 5.x)
+import "swiper/css/swiper.css";
 
 export default {
-  components: {
-    Swiper,
-    SwiperSlide,
+  directives: {
+    swiper: directive,
   },
-  props:['hotspot'],
-  data(){
+  props: ["hotspot"],
+  data() {
     return {
-      active:0,
-      mbactive:0
-    }
+      active: 0,
+      mbactive: 0,
+    };
   },
-  computed:{
+  computed: {
     swiperOption() {
-      let that = this
+      let that = this;
       return {
-        slidesPerView: 'auto',
+        slidesPerView: "auto",
         autoplay: false,
         centeredSlides: true,
         watchSlidesProgress: true,
         loop: false,
-        on:{
-          slideChangeTransitionEnd:function () {
-            that.mbactive = this.realIndex
-          }
-        }
-      }
-    }
-  }
-}
+        pagination: {
+          el: ".swiper-pagination",
+        },
+        on: {
+          slideChangeTransitionEnd: function() {
+            that.mbactive = this.realIndex;
+          },
+        },
+      };
+    },
+  },
+};
 </script>
 
 <style lang="less" scoped>
-.noshow{
-  opacity: 0!important;;
-  pointer-events: none!important;;
+.noshow {
+  opacity: 0 !important;
+  pointer-events: none !important;
 }
 
-.images{
+.images {
   width: 100%;
   height: 100%;
   background-repeat: no-repeat;
   text-align: center;
-  .title{
+  .title {
     padding: 0 80px;
     display: inline-block;
-    color: #DBA761;
+    color: #dba761;
     font-weight: bold;
     font-size: 36px;
     height: 70px;
     line-height: 70px;
-    background: #BC1515;
+    background: #bc1515;
     border-radius: 60px;
     margin: 45px auto;
   }
-  .img-con{
+  .img-con {
     display: flex;
     justify-content: space-around;
     align-items: center;
     position: relative;
     padding-bottom: 40px;
-    >span{
+    > span {
+      @juli: 60px;
       display: inline-block;
       padding: 0 30px;
       box-sizing: content-box;
@@ -110,41 +137,50 @@ export default {
       height: 50px;
       line-height: 50px;
       background: rgba(188, 21, 21, 0.9);
-      border: 2px solid #DBA761;
+      border: 2px solid #dba761;
       border-radius: 37px;
       cursor: pointer;
-      &:hover,&.active{
-        color: #DBA761;
+      position: absolute;
+      left: @juli;
+      top: 50%;
+      transform: translateY(-50%);
+      &:hover,
+      &.active {
+        color: #dba761;
+      }
+      &:last-of-type {
+        left: unset;
+        right: @juli;
       }
     }
-    >video{
+    > video {
       max-width: 1000px;
       // border: 10px solid #BC1515;
       box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
       max-height: 600px;
       object-fit: fill;
     }
-    .pagna{
+    .pagna {
       position: absolute;
       bottom: 0;
       text-align: center;
       z-index: 999;
-      >li{
+      > li {
         width: 60px;
         height: 6px;
-        background: #BC1515;
+        background: #bc1515;
         display: inline-block;
         margin: 0 4px;
-        &.active{
-          background: #DBA761;
+        &.active {
+          background: #dba761;
         }
       }
     }
   }
-  .desc{
+  .desc {
     max-width: 1000px;
     margin: 20px auto 0;
-    color: #DBA761;
+    color: #dba761;
     text-align: left;
     line-height: 2;
     max-height: 200px;
@@ -152,79 +188,88 @@ export default {
   }
 }
 
-@position:62px;
-.mbimages{
+@position: 62px;
+.mbimages {
   width: 100%;
   height: 100%;
   background-repeat: no-repeat;
   background-size: 100% calc(100% + @position);
   background-position: 0 -@position;
   text-align: center;
-  .title{
+  .title {
     width: 90%;
     padding: 10px;
     display: inline-block;
-    color: #DBA761;
+    color: #dba761;
     font-weight: bold;
     font-size: 18px;
-    background: #BC1515;
+    background: #bc1515;
     border-radius: 60px;
     margin: 20px auto;
   }
-  .swiper-wrapper {
-    height: 250px;
-    padding: 0;
-    .swiper-slide  {
-      width: 85%;
-      transform-style: preserve-3d;
-      position: relative;
-      height: 100%;
-      margin: 0 10px;
-      .sl-item{
-        position: absolute;
-        top: 0;
-        left: 50%;
+
+  .swcon {
+    position: relative;
+    padding-bottom: 30px;
+    .swiper-wrapper {
+      height: 250px;
+      padding: 0;
+      .swiper-slide {
+        width: 85%;
+        transform-style: preserve-3d;
+        position: relative;
         height: 100%;
-        transform: translateX(-50%);
-        width: 100%;
-        overflow: hidden;
-        border: 4px solid #BC1515;
-        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
-        background-color: #757477;
-        >video{
-          object-fit: fill;
-          height: 100%;
-          transform: translateX(-50%);
+        margin: 0 10px;
+        .sl-item {
           position: absolute;
+          top: 0;
           left: 50%;
+          height: 100%;
+          transform: translateX(-50%);
+          width: 100%;
+          overflow: hidden;
+          border: 4px solid #bc1515;
+          box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+          background-color: #757477;
+          > video {
+            object-fit: fill;
+            height: 100%;
+            transform: translateX(-50%);
+            position: absolute;
+            left: 50%;
+          }
         }
       }
     }
-  }
-  .pagna{
-    text-align: center;
-    z-index: 999;
-    >li{
-      width: 40px;
-      height: 4px;
-      background: #BC1515;
-      display: inline-block;
-      margin: 0 4px;
-      &.active{
-        background: #DBA761;
+    .pagination {
+      position: absolute;
+      bottom: 5px;
+      & /deep/ .swiper-pagination-bullet,
+      & /deep/ .swiper-pagination-bullet-active {
+        width: 40px !important;
+        height: 4px !important;
+        background: #bc1515 !important;
+        display: inline-block !important;
+        margin: 0 4px !important;
+        border-radius: 0;
+        opacity: 1;
+      }
+      & /deep/ .swiper-pagination-bullet-active {
+        background: #dba761 !important;
       }
     }
   }
-  .desc{
-    color: #DBA761;
+
+  .desc {
+    color: #dba761;
     text-align: left;
     width: 85%;
     margin: 20px auto 0;
-    p{
+    p {
       font-size: 16px;
       font-weight: bold;
     }
-    div{
+    div {
       font-size: 14px;
       margin-top: 10px;
       line-height: 1.5;
@@ -233,4 +278,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 45 - 1
web/src/components/popupLayout/Share.vue

@@ -10,16 +10,21 @@
       <div class="qrcode">
         <img :src="require('@/assets/images/project/qrcode.png')">
       </div>
-      <div class="share_btn">
+      <div class="share_btn" @click="copyLink">
         复制分享链接
       </div>
     </div>
+
+    <div class="popup" v-if="tips">
+      链接已复制
+    </div>
   </div>
 </template>
 <script>
 export default {
   data(){
     return {
+      tips:false
     };
   },
   mounted(){
@@ -28,6 +33,30 @@ export default {
     close(){
       this.$hideShare()
       this.$bus.$emit('closeShare')
+    },
+    copyLink(){
+      var textArea = document.createElement('textarea')
+
+      textArea.style.position = 'fixed'
+      textArea.style.top = 0
+      textArea.style.left = 0
+      textArea.style.width = '2em'
+      textArea.style.height = '2em'
+      textArea.style.padding = 0
+      textArea.style.border = 'none'
+      textArea.style.outline = 'none'
+      textArea.style.boxShadow = 'none'
+      textArea.style.background = 'transparent'
+      textArea.value = window.location.href
+
+      document.body.appendChild(textArea)
+      textArea.select()
+      document.execCommand('copy')
+      document.body.removeChild(textArea)
+      this.tips = true
+      setTimeout(() => {
+        this.tips = false
+      }, 2000);
     }
   }
 };
@@ -83,6 +112,21 @@ export default {
   }
 }
 
+.popup{
+  position: fixed;
+  z-index: 9999;
+  width: 300px;
+  height: 40px;
+  line-height: 40px;
+  text-align: center;
+  border-radius: 20px;
+  left: 50%;
+  top: 50%;
+  border: 1px solid #000;
+  transform: translate(-50%,-50%);
+  background: rgba(0, 0, 0, 0.5);
+}
+
 @media screen and (max-width: 500px) {
  .wrapper{
    z-index: 99999;

+ 4 - 4
web/src/views/gui/menu.vue

@@ -315,18 +315,18 @@ export default {
     > img {
       width: @wh;
       height: @wh;
-      display: block;
+      display: block!important;
     }
     .active {
-      display: none;
+      display: none!important;
     }
   }
   .active {
     > img {
-      display: none;
+      display: none!important;
     }
     .active {
-      display: block;
+      display: block!important;
     }
   }
 }