tremble 3 лет назад
Родитель
Сommit
6f5d97b8b7

+ 10 - 0
src/components/shared/loading/index.js

@@ -2,12 +2,14 @@ import Vue from 'vue'
 import UIViewLoading from './ViewLoading'
 import UIWaiting from './Waiting'
 import UISmallWaiting from './smallWaiting'
+import UISmallWaiting1 from './smallWaiting1'
 
 
 
 export const ViewLoading = Vue.extend(UIViewLoading)
 export const Waiting = Vue.extend(UIWaiting)
 export const SmallWaiting = Vue.extend(UISmallWaiting)
+export const SmallWaiting1 = Vue.extend(UISmallWaiting1)
 
 
 const waiting = function(){
@@ -22,6 +24,11 @@ const smallWaiting = function(){
     return instance
 }
 
+const smallWaiting1 = function(){
+    let instance = new SmallWaiting1().$mount()
+    document.body.appendChild(instance.$el)
+    return instance
+}
 
 export function $viewLoading(data={}){
     let instance = new ViewLoading({data}).$mount()
@@ -46,4 +53,7 @@ export function $viewLoading(data={}){
 export const $waiting = waiting()
 export const $smallWaiting = smallWaiting()
 
+export const $smallWaiting1 = smallWaiting1()
+
+
 

+ 71 - 0
src/components/shared/loading/smallWaiting1.vue

@@ -0,0 +1,71 @@
+<template>
+    <popup ref="Message" v-if="display">
+        <div class="ui-waiting">
+            <div class="txt">加载中</div>
+            <div class="spinner">
+                <div class="bounce1"></div>
+                <div class="bounce2"></div>
+                <div class="bounce3"></div>
+            </div>
+            <!-- <div>请稍等...</div> -->
+        </div>
+    </popup>
+</template>
+<script>
+import Popup from "../popup";
+export default {
+    name: "ui-waiting",
+    components: {
+        Popup
+    },
+    data() {
+        return {
+            display: false,
+            duration: 0
+        };
+    },
+    methods: {
+        show() {
+            this.$nextTick(() => (this.display = true));
+        },
+        hide() {
+            this.$nextTick(() => (this.display = false));
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.ui-waiting {
+    color: #fff;
+    text-align: center;
+    letter-spacing: 2px;
+    .txt{
+        font-size: 14px;
+    }
+    .spinner {
+        width: 100%;
+        text-align: center;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 5px;
+        > div {
+            width: 5px;
+            height: 5px;
+            background-color: #fff;
+            margin: 5px;
+            border-radius: 100%;
+            display: inline-block;
+            animation: bouncedelay 1.4s infinite ease-in-out;
+            animation-fill-mode: both;
+        }
+
+        .bounce1 {
+            animation-delay: -0.32s;
+        }
+        .bounce2 {
+            animation-delay: -0.16s;
+        }
+    }
+}
+</style>

+ 1 - 1
src/components/shared/message/Confirm.vue

@@ -27,7 +27,7 @@
                 >{{okText}}</a>
             </div>
             <div v-else class="ui-message-footer"  :class="{'footer-material':isMaterial}">
-                <button class="ui-button cancel" @click="onNo">{{noText}}</button>
+                <button class="ui-button cancel" :class="{deepcancel:!isMaterial}" @click="onNo">{{noText}}</button>
                 <button class="ui-button submit" @click="onOk">{{okText}}</button>
             </div>
         </div>

+ 1 - 1
src/components/tableSelect.vue

@@ -364,7 +364,7 @@ props:{
 
 .checkbox > input:checked + span {
   background:#fff;
-  border:1px solid rgba(0,200,175,1);
+  border:1px solid #0076F6;
   background:@color url(/static/img/g.png) no-repeat center center;
 }
 

+ 2 - 1
src/core/utils.js

@@ -27,6 +27,7 @@ export default class Utils {
   scaleCanvas (canvas, width, height) {
     let w = canvas.width
     let h = canvas.height;
+    
     if (width == undefined) {
         width = w;
     }
@@ -42,7 +43,7 @@ export default class Utils {
   }
   getDataURL (canvas, type, width, height) {
     let cas = this.scaleCanvas(canvas, width, height);
-    return cas.toDataURL(type,1.0);
+    return cas.toDataURL(type, 1);
   }
 
   setInitAngleImg(mycanvas){

+ 2 - 0
src/framework/core/index.vue

@@ -57,6 +57,8 @@ export default {
       let krpano = document.getElementById('krpanoSWFObject');
       let data = __krfn.utils.setInitView(krpano, canvas);
 
+      console.log(data.url);
+
       uploadCover(
         { file: data.url, filename: "initCover.jpg" },
         res => {

+ 49 - 15
src/framework/show/list.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="list">
+  <div class="list" :style="{'max-width':isW ? '1396px':'100%'}">
     <div class="l-con" :class="showList ? 'active' : ''" v-if="!(showInfo.catalogRoot.length == 1 && scenes.length == 1 && showInfo.catalogs.length == 1)">
       <div class="pic-con">
         <div class="clip-scroller" ref="sw" v-swiper:mySwiper="swiperOptions" v-if="scenes.length > 0">
           <ul class="pic-list swiper-wrapper">
-            <li class="swiper-slide" :title="item.sceneTitle" @click="handleVR(item,$event)" v-for="(item, i) in scenes" :key="i">
+            <li class="swiper-slide" :title="item.sceneTitle" @click="handleVR(item,i)" v-for="(item, i) in scenes" :key="i">
               <div :class="{ active: selected.sceneCode == item.sceneCode }">
                 <img :src="item.icon + `?${Math.random()}`" alt="" />
                 <i class="iconfont iconedit_type_3d" :class="{ iconedit_type_panorama: item.type !== '4dkk' }"></i>
@@ -16,7 +16,7 @@
 
         <div class="clip-scroller"  ref="sw1"  v-swiper:mySwipera="swiperOptions" v-if="childTab.length > 1">
           <ul class="pp-tap swiper-wrapper">
-            <li class="swiper-slide" @click="tabtowActive = item" v-for="(item, i) in childTab" :key="i">
+            <li class="swiper-slide" @click="handleTabtow(item,i)" v-for="(item, i) in childTab" :key="i">
               <rollName
                 :offset="30"
                 :mgin="20"
@@ -31,9 +31,9 @@
         </div>
       </div>
 
-      <div class="clip-scroller" ref="sw2"  v-swiper:mySwiperb="swiperOptions" v-if="showInfo.catalogRoot.length > 0 && showInfo.catalogs.length > 1">
-        <ul class="tap  swiper-wrapper">
-          <li  class="swiper-slide" @click="taboneActive = item" :class="{ active: item.id == taboneActive.id }" v-for="(item, i) in showInfo.catalogRoot" :key="i">
+      <div class="clip-scroller" ref="sw2" v-swiper:mySwiperb="swiperOptions" v-if="showInfo.catalogRoot.length > 0 && showInfo.catalogs.length > 1">
+        <ul class="tap  swiper-wrapper" v-if="showInfo.catalogRoot.length > 1">
+          <li  class="swiper-slide" @click="handleTabone(item,i)" :class="{ active: item.id == taboneActive.id }" v-for="(item, i) in showInfo.catalogRoot" :key="i">
             <rollName
               :offset="30"
               :mgin="20"
@@ -61,8 +61,9 @@ import { directive } from "vue-awesome-swiper";
 import "swiper/css/swiper.css";
 
 
-let $scroll = null;
+let isW = window.innerWidth > 1400;
 
+console.log(window.innerWidth);
 export default {
   props: ["select"],
   components: { rollName },
@@ -78,6 +79,7 @@ export default {
       childTab: [],
       scenes: [],
       showList: true,
+      isW,
       loadFirst: true,
       menuWidth: 0,
       sceneNum: config.sceneNum,
@@ -94,16 +96,13 @@ export default {
     swiperOptions() {
       return {
         slidesPerView: "auto",
+        // initialSlide:0,
         // observer:true,
         // observeParents: true,
         centeredSlides : true,
         centerInsufficientSlides: true,
         centeredSlidesBounds: true,
-        on:{
-          click: function(e){
-            console.log(e);
-          },
-        },
+        freeMode:true
       };
     },
   },
@@ -114,11 +113,46 @@ export default {
         return this.$refs[ref][0].clientWidth;
       }
     },
-    handleVR(item,e=null) {
+
+    fixPosit(ref,i,prenum,nexnum){
+         if (i!==null) {
+        let acidx = this.$refs[ref].swiper.activeIndex
+
+
+        if (i - acidx > nexnum ) {
+          this.$refs[ref].swiper.slideNext()
+        }
+
+        if (acidx - i > prenum ) {
+          this.$refs[ref].swiper.slidePrev()
+        }
+      }
+    },
+
+    handleTabtow(item,i=null){
+      this.tabtowActive = item
+      this.fixPosit('sw1',i,3,3)
+    },
+
+    handleTabone(item,i=null){
+      this.taboneActive = item
+      let pp = this.isW ? 5 : 4
+      let nn = this.isW ? 5 : 4
+
+
+      this.fixPosit('sw2',i,pp,nn)
+    },
+
+    handleVR(item,i=null) {
       history.replaceState(null, null, "".concat(window.location.pathname, "?").concat(`id=${this.showInfo.id}&vr=${item.sceneCode}`));
       this.sceneNum = item.sceneCode;
 
-      console.dir(e&& $(e.target));
+      let pp = this.isW ? 7 : 5
+      let nn = this.isW ? 7 : 5
+
+
+      this.fixPosit('sw',i,pp,nn)
+     
     },
    
   },
@@ -309,7 +343,7 @@ export default {
     .pp-tap {
       padding: 0 0 16px;
       > li {
-        width: 150px;
+        max-width: 100px;
       }
     }
     .tap {

+ 3 - 2
src/framework/show/popup/index.vue

@@ -1,6 +1,6 @@
 <template>
     <popup v-if="show">
-      <div class="ui-message ui-message-confirm" style="width: 400px">
+      <div class="ui-message ui-message-confirm" style="width: 430px">
         <div class="ui-message-header">
           <span>{{title}}</span>
           <span @click="$emit('close')">
@@ -40,6 +40,7 @@ export default {
 }
 .ui-message-confirm{
   border-radius: 0;
+  padding: 0;
   .icon_close{
     color: #909090;
   }
@@ -47,7 +48,7 @@ export default {
 
   .ui-message-header{
     border-bottom: 1px solid #EBEBEB;
-    padding: 0 10px 0 30px;
+    padding: 12px 20px 12px 30px;
     >span{
       margin: 0;
     }

+ 2 - 2
src/framework/show/popup/password.vue

@@ -23,7 +23,6 @@
             <i v-if="key" ref="isearch" class="iconfont icon_close" @click="key=''"></i>
           </div>
         </div>
-        <div class="ma-line"></div>
         <div class="ui-message-footer">
           <div class="btn">
             <button @click="emitname" class="ui-button submit" :class="{disable:!key}" >
@@ -53,7 +52,7 @@ export default {
     emitname(){
       this.$refs.uinput.blur()
       if (!this.key.trim()) {
-        return this.$alert({ content: "请输入访问密码" });
+        return
       }
       
       this.$emit('submit',this.key)
@@ -73,6 +72,7 @@ export default {
   box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
   border-radius: 4px;
   border: 1px solid #E4E7ED;
+  height: 230px;
   .icon_close{
     color: #909090;
   }

+ 1 - 1
src/framework/showMobile/index.vue

@@ -4,7 +4,7 @@
       <v-ifr
         v-if="activeItem.type == '4dkk'"
         :key="activeItem.sceneCode"
-        :url="`/embed.html?from=mingyuan&m=${activeItem.sceneCode}&lang=zh`"
+        :url="`https://test.4dkankan.com/embed.html?from=mingyuan&m=${activeItem.sceneCode}&lang=zh`"
       />
       <div v-show="activeItem.type != '4dkk'" id="pano"></div>
       

+ 35 - 5
src/framework/showMobile/list.vue

@@ -5,7 +5,7 @@
 
         <div ref="sw" v-swiper:mySwiper="swiperOptions"  v-if="scenes.length>0">
           <ul class="pic-list swiper-wrapper">
-            <li class="swiper-slide" @click="handleVR(item)" v-for="(item,i) in scenes" :key="i">
+            <li class="swiper-slide" @click="handleVR(item,i)" v-for="(item,i) in scenes" :key="i">
               <div :class="{active:selected.sceneCode==item.sceneCode}">
                 <img :src="item.icon+`?${Math.random()}`" alt="" />
                 <i class="iconfont" :class="item.type!='4dkk'?'iconedit_type_panorama':'iconedit_type_3d'"></i>
@@ -18,7 +18,7 @@
         <div ref="sw1"  v-swiper:mySwipera="swiperOptions" v-if="childTab.length > 1">
           
         <ul class="tap swiper-wrapper"  >
-          <li class="swiper-slide" @click="tabtowActive = item" v-for="(item,i) in childTab" :key="i">
+          <li class="swiper-slide" @click="handleTabtow(item,i)" v-for="(item,i) in childTab" :key="i">
               <rollName :offset="30" :mgin="20" :active="item.id == tabtowActive.id" class="btn pic-rect" :class="{active:item.id == tabtowActive.id}" :myref="'ww'+item.id" :name="item.name"/>
           </li>
         </ul>
@@ -27,7 +27,7 @@
       
       <div class="clip-scroller" ref="sw2"  v-swiper:mySwiperb="swiperOptions" v-if="showInfo.catalogRoot.length > 0 && showInfo.catalogs.length > 1">
          <ul class="tap swiper-wrapper" v-if="showInfo.catalogRoot.length > 1">
-          <li class="swiper-slide" @click="taboneActive = item" :class="{ active: item.id == taboneActive.id }" v-for="(item,i) in showInfo.catalogRoot" :key="i">
+          <li class="swiper-slide" @click="handleTabone(item,i)" :class="{ active: item.id == taboneActive.id }" v-for="(item,i) in showInfo.catalogRoot" :key="i">
               <rollName :offset="30" :mgin="20" :active="item.id == taboneActive.id" class="btn rect" :class="{active:item.id == taboneActive.id}" :myref="'zw'+item.id" :name="item.name"/>
           </li>
         </ul>
@@ -40,6 +40,7 @@
             <i class="iconfont" :class="isDaolan?'iconshow_suspension':'iconshow_playback'"></i>
             <span title="导览" >导览</span>
           </li>
+          {{mapvisit}}
           <template v-if="currentActive!='2d'&& currentActive!='3d' && mapvisit == 0">
             <li v-for="(item,i) in menu" @click="handleMenu(item)" :key="i">
               <i class="iconfont" :class="currentActive==item.id?item.active:item.icon"></i>
@@ -128,7 +129,8 @@ export default {
           // observeParents: true,
           centeredSlides : true,
           centerInsufficientSlides: true,
-          centeredSlidesBounds: true
+          centeredSlidesBounds: true,
+          freeMode:true
         };
       },
       selected(){
@@ -177,9 +179,37 @@ export default {
         this.delHandle()
       }
     },
-    handleVR(item){
+
+     fixPosit(ref,i,prenum,nexnum){
+         if (i!==null) {
+        let acidx = this.$refs[ref].swiper.activeIndex
+        console.log(this.$refs[ref].swiper.activeIndex);
+        if (i - acidx > nexnum ) {
+          this.$refs[ref].swiper.slideNext()
+        }
+
+        if (acidx - i > prenum ) {
+          this.$refs[ref].swiper.slidePrev()
+        }
+      }
+    },
+
+    handleTabtow(item,i=null){
+      this.tabtowActive = item
+      this.fixPosit('sw1',i,1,1)
+    },
+
+    handleTabone(item,i=null){
+      this.taboneActive = item
+      this.fixPosit('sw2',i,1,1)
+    },
+
+    handleVR(item,i=null){
       history.replaceState(null, null, "".concat(window.location.pathname, "?").concat(`id=${this.showInfo.id}&vr=${item.sceneCode}`));
       this.sceneNum = item.sceneCode
+
+      this.fixPosit('sw',i,1,1)
+
     }
   },
   watch:{

+ 2 - 1
src/framework/showMobile/popup/index.vue

@@ -35,6 +35,7 @@ export default {
 
 <style lang="less" scoped>
 .ui-message-confirm{
+  padding: 0;
   border-radius: 0;
   .icon_close{
     color: #909090;
@@ -43,7 +44,7 @@ export default {
 
   .ui-message-header{
     border-bottom: 1px solid #EBEBEB;
-    padding: 0 10px 0 30px;
+    padding: 12px 20px 12px 30px;
     >span{
       margin: 0;
     }

+ 2 - 2
src/framework/showMobile/popup/password.vue

@@ -22,7 +22,6 @@
             <i v-if="key" class="iconfont icon_close" @click="key=''"></i>
           </div>
         </div>
-        <div class="ma-line"></div>
         <div class="ui-message-footer">
           <div class="btn">
             <button @click="emitname" class="ui-button submit" :class="{disable:!key}" >
@@ -49,8 +48,9 @@ export default {
   },
   methods:{
     emitname(){
+     
       if (!this.key.trim()) {
-        return this.$alert({ content: "请输入访问密码" });
+        return
       }
       this.$emit('submit',this.key)
     }

+ 3 - 3
src/framework/vr/index.vue

@@ -13,7 +13,7 @@ import { getSceneInfo } from "@/api";
 import config from "@/config";
 
 import browser from "@/utils/browser";
-import { $smallWaiting } from "@/components/shared/loading";
+import { $smallWaiting1 } from "@/components/shared/loading";
 
 let __krfn = krfn.default;
 window.__krfn = __krfn;
@@ -74,7 +74,7 @@ export default {
 
   mounted() {
     window.vrVrInitFn = () => {
-      $smallWaiting.hide();
+      $smallWaiting1.hide();
     };
     var settings = {
       "events[skin_events].onloadcomplete": "js(window.vrVrInitFn());",
@@ -83,7 +83,7 @@ export default {
     // this.getSceneInfo()
     $("#pano").empty();
     removepano("#pano");
-    $smallWaiting.show();
+    $smallWaiting1.show();
 
     embedpano({
       // xml: "%HTMLPATH%/static/template/tour.xml",

+ 1 - 1
src/utils/request.js

@@ -54,7 +54,7 @@ const showLoginTips = () => {
 
   return $confirm({
     title: "提示",
-    content: "您没有登录,请登录后再编辑",
+    content: "登录态失效,请重新登录",
     okText: "去登录",
     noText: "登录完毕,继续",
     okLink: "/",