Browse Source

singlepage

tremble 3 years ago
parent
commit
fa8d38073c

public/showMobile.html → public/showMobile_single.html


public/show.html → public/show_single.html


+ 19 - 44
src/framework/show/fdkk.vue

@@ -6,38 +6,14 @@
       :key="selected.id"
       :src="`spc.html?m=${selected.id}&from=kankan`"
       frameborder="0"
-      @click="handleifrclk"
       @load="onIframLoad"
     ></iframe>
-    <mbui :type="type" :isShow="isShow" @close="isShow =false">
-      <div class="img_ul" slot="imgList">
-        <ul v-if="selectExh.scenes">
-          <li
-            v-for="(item, i) in selectExh.scenes"
-            @click="selected = item"
-            :key="i"
-            :class="{ active: selected.id == item.id }"
-          >
-            <div>
-              <img :src="`${fdkk_CDN}/hangzhan/images/images${item.id}/thumbBigImg.jpg`" v-errorimg="`${fdkk_CDN}/hangzhan/images/images${item.id}/result.png`" alt="" />
-              <rollName
-                :offset="20"
-                :active="selected.id == item.id"
-                class="pic-name"
-                :myref="'subw' + item.id"
-                :name="item.title"
-              />
-            </div>
-            <span class="bar"></span>
-          </li>
-        </ul>
-      </div>
-
+    <mbui :type="type" :class="{uicon:exhibition}"  :isShow="isShow" @close="isShow =false">
       <div class="txt_ul" slot="txtList">
         <ul>
           <li
             v-for="(item, i) in list"
-            @click="selectExh = item"
+            @click="handleItem(item)"
             :key="i"
             :class="{ active: selectExh.id == item.id }"
           >
@@ -49,24 +25,18 @@
       <div v-if="!isShow" @click="isShow = true" class="btn_zhankai" slot="btn_zhankai">
         <i class="iconfont icon-more"></i>
       </div>
-      <vAside class="ui_header" slot="aside"/>
-      <vSelect slot="select" :type="type"></vSelect>
     </mbui>
   </div>
 </template>
 
 <script>
 import mbui from "./ui";
-import vAside from "./ui/aside.vue";
-import vSelect from "./ui/select.vue";
 
 
 export default {
-  props:['type'],
+  props:['type','exhibition'],
   components: {
     mbui,
-    vSelect,
-    vAside
   },
   data() {
     return {
@@ -77,22 +47,22 @@ export default {
       list:[]
     };
   },
-  watch:{
-    selected:{
-      deep:true,
-      handler:function (newVal) {
-        console.log(newVal);
-      }
-    }
-  },
   methods: {
-    handleifrclk(){
-      console.log(1111);
+    handleItem(item){
+      let key = 'exhibition='
+      let tmp = window.location.href.split(key)
+      console.log(tmp[0] + key + item.id);
+      window.location.href = tmp[0] + key + item.id
+      // console.log(item.id);
     },
     getList(){
       window.$.ajax({url:`${this.g_CDN}fdkk/data.json`,success:(data)=>{
         this.list=data.list
-        this.selectExh = this.list[0]
+        if (this.exhibition) {
+          this.selectExh = this.list.find(item=>item.id==this.exhibition)
+        }else{
+          this.selectExh = this.list[0]
+        }
         this.selected = this.selectExh.scenes[0]
       }})
     },
@@ -121,6 +91,11 @@ export default {
     width: 100%;
     height: 100%;
   }
+  .uicon{
+    & /deep/ .btm-menu {
+      height: 220px;
+    }
+  }
   .img_ul {
     width: 100%;
     position: relative;

+ 2 - 37
src/framework/show/index.vue

@@ -1,58 +1,23 @@
 <template>
   <div class="mbcon">
-    <audio ref="vbgm" class="noshow" loop :src="`${g_CDN}audio/bgm.mp3`"></audio>
-    <v-pano :exhibition="exhibition" v-if="exhibition" />
-    <template v-else>
-      <transition name="fade">
-        <welcome v-if="welcome"/>
-      </transition>
-      <v-fdkk :type="type" v-if="type=='fdkk'" />
-      <v-pano :type="type" v-else/>
-    </template>
+      <v-fdkk :type="type" :exhibition="exhibition" />
   </div>
 </template>
 
 <script>
 import vFdkk from "./fdkk";
-import vPano from "./pano";
-import welcome from "@/components/welcome";
 
 export default {
   components: {
-    vFdkk,
-    vPano,
-    welcome
+    vFdkk
   },
   data(){
     return{
       type:'fdkk',
       exhibition:'',
-      isBgm: false,
-      welcome: false,
-    }
-  },
-  watch:{
-    isBgm(newVal){
-      !newVal?this.$refs.vbgm.pause():this.$refs.vbgm.play()
     }
   },
   mounted(){
-    this.$nextTick(()=>{
-      this.welcome = true
-    })
-    this.$bus.$on('changeType',(data)=>{
-      this.type = data
-    })
-
-    this.$bus.$on('toggleBgm',(data)=>{
-      this.isBgm = data
-    })
-
-    this.$bus.$on('closeWel',()=>{
-      this.welcome = false
-      this.isBgm = true
-    })
-
     this.exhibition = this.getQueryVariable('exhibition')
   }
 }

+ 20 - 45
src/framework/showMobile/fdkk.vue

@@ -6,37 +6,14 @@
       :key="selected.id"
       :src="`embed.html?m=${selected.id}&from=kankan`"
       frameborder="0"
-      @click="handleifrclk"
     ></iframe>
-    <mbui :isShow="isShowM" @close="isShowM =false">
-      <div class="img_ul" slot="imgList">
-        <ul v-if="selectExh.scenes">
-          <li
-            v-for="(item, i) in selectExh.scenes"
-            @click="selected = item"
-            :key="i"
-            :class="{ active: selected.id == item.id }"
-          >
-            <div>
-              <img :src="`${fdkk_CDN}/hangzhan/images/images${item.id}/thumbBigImg.jpg`" v-errorimg="`${fdkk_CDN}/hangzhan/images/images${item.id}/result.png`" alt="" />
-              <rollName
-                :offset="20"
-                :active="selected.id == item.id"
-                class="pic-name"
-                :myref="'subw' + item.id"
-                :name="item.title"
-              />
-            </div>
-            <span class="bar"></span>
-          </li>
-        </ul>
-      </div>
-
+    <mbui :isShow="isShowM" :class="{uicon:exhibition}" @close="isShowM =false">
+  
       <div class="txt_ul" slot="txtList">
         <ul>
           <li
             v-for="(item, i) in list"
-            @click="selectExh = item"
+            @click="handleItem(item)"
             :key="i"
             :class="{ active: selectExh.id == item.id }"
           >
@@ -48,24 +25,18 @@
       <div class="btn_zhankai" slot="btn_zhankai">
         <img @click="isShowM=true"  :src="require('@/assets/images/menu.png')" alt="">
       </div>
-      <vHeader class="ui_header" slot="header"/>
-      <vSelect :type="type" slot="select"></vSelect>
     </mbui>
   </div>
 </template>
 
 <script>
 import mbui from "./ui";
-import vHeader from "./ui/Show.Header.vue";
-import vSelect from "./ui/select.vue";
 
 
 export default {
-  props:['type'],
+  props:['type','exhibition'],
   components: {
-    mbui,
-    vSelect,
-    vHeader
+    mbui
   },
   data() {
     return {
@@ -76,22 +47,20 @@ export default {
       list:[]
     };
   },
-  watch:{
-    selected:{
-      deep:true,
-      handler:function (newVal) {
-        console.log(newVal);
-      }
-    }
-  },
   methods: {
-    handleifrclk(){
-      console.log(1111111);
+    handleItem(item){
+      let key = 'exhibition='
+      let tmp = window.location.href.split(key)
+      window.location.href = tmp[0] + key + item.id
     },
     getList(){
       window.$.ajax({url:`${this.g_CDN}fdkk/data.json`,success:(data)=>{
         this.list=data.list
-        this.selectExh = this.list[0]
+        if (this.exhibition) {
+          this.selectExh = this.list.find(item=>item.id==this.exhibition)
+        }else{
+          this.selectExh = this.list[0]
+        }
         this.selected = this.selectExh.scenes[0]
       }})
     }
@@ -114,6 +83,12 @@ export default {
     width: 100%;
     height: 100%;
   }
+  .uicon{
+    & /deep/ .btm-menu {
+      height: 160px;
+    }
+  }
+
   .img_ul {
     width: 100%;
     position: relative;

+ 2 - 45
src/framework/showMobile/index.vue

@@ -1,66 +1,23 @@
 <template>
   <div class="mbcon">
-    <audio ref="vbgm" class="noshow" loop :src="`${g_CDN}audio/bgm.mp3`"></audio>
-    <v-pano :exhibition="exhibition" v-if="exhibition" />
-    <template v-else>
-      <transition name="fade">
-        <welcome v-if="welcome"/>
-      </transition>
-      <v-fdkk :type="type" v-if="type=='fdkk'" />
-      <v-pano :type="type" v-else/>
-    </template>
+      <v-fdkk :type="type" :exhibition="exhibition" />
   </div>
 </template>
 
 <script>
 import vFdkk from "./fdkk";
-import vPano from "./pano";
-
-import welcome from "@/components/welcome";
-
 
 export default {
   components: {
-    vFdkk,
-    vPano,
-    welcome
+    vFdkk
   },
   data(){
     return{
       type:'fdkk',
       exhibition:'',
-      isBgm: false,
-      welcome: true
-    }
-  },
-  watch:{
-    isBgm(newVal){
-      !newVal?this.$refs.vbgm.pause():this.$refs.vbgm.play()
     }
   },
   mounted(){
-    this.$nextTick(()=>{
-      this.welcome = true
-    })
-
-    this.$bus.$on('changeType',(data)=>{
-      this.type = data
-    })
-
-    this.$bus.$on('toggleBgm',(data)=>{
-      this.isBgm = data
-    })
-
-    this.$bus.$on('closeWel',()=>{
-      this.welcome = false
-      this.isBgm = true
-      this.$bus.$emit('showM',true)
-    })
-
-
-
-
-
     this.exhibition = this.getQueryVariable('exhibition')
   }
 }

+ 1 - 1
src/pages/show.vue

@@ -15,7 +15,7 @@ export default {
   },
   mounted(){
     if (this.g_isMobile) {
-      window.location.href = window.location.href.replace('show.html','showMobile.html')
+      window.location.href = window.location.href.replace('show_single.html','showMobile_single.html')
     }
   }
 };

+ 1 - 1
src/pages/showMobile.vue

@@ -16,7 +16,7 @@ export default {
   
   mounted(){
     if (!this.g_isMobile) {
-      window.location.href = window.location.href.replace('showMobile.html','show.html')
+      window.location.href = window.location.href.replace('showMobile_single.html','show_single.html')
     }
   }
 };

src/pages/showMobile.js → src/pages/showMobile_single.js


src/pages/show.js → src/pages/show_single.js


+ 2 - 2
vue.config.js

@@ -1,6 +1,6 @@
 let pages = {
-  show: 'src/pages/show.js',
-  showMobile: 'src/pages/showMobile.js'
+  show_single: 'src/pages/show_single.js',
+  showMobile_single: 'src/pages/showMobile_single.js'
 }