tremble 3 years ago
parent
commit
b89a5acd66

+ 1 - 1
web/.env

@@ -1,2 +1,2 @@
 VUE_APP_STATIC_DIR=static
-VUE_APP_PROXY_URL=''
+VUE_APP_ISBENDI=''

+ 2 - 0
web/.env.bendi

@@ -0,0 +1,2 @@
+VUE_APP_STATIC_DIR=static
+VUE_APP_ISBENDI=true

+ 1 - 0
web/package.json

@@ -5,6 +5,7 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
+    "build-bendi": "vue-cli-service build --mode bendi",
     "lint": "vue-cli-service lint"
   },
   "dependencies": {

+ 1 - 13
web/public/index.html

@@ -24,15 +24,7 @@
             number = number.substring(0, number.indexOf("#"));
         } 
     </script>
-    <script>
-        var _hmt = _hmt || [];
-        (function() {
-          var hm = document.createElement("script");
-          hm.src = "https://hm.baidu.com/hm.js?73402bb08ff95cb21b7f1673250c532d";
-          var s = document.getElementsByTagName("script")[0]; 
-          s.parentNode.insertBefore(hm, s);
-        })();
-    </script>
+
     <script class="build keep">
         if (window.performance) {
             window.navigationStart = window.performance.timing.navigationStart;
@@ -51,10 +43,6 @@
     <script src="<%= VUE_APP_STATIC_DIR %>/js/manage.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/overlay.js"></script>
     <script src="<%= VUE_APP_STATIC_DIR %>/js/main_2020_show.js"></script>
-<script>
-// var m = getQueryStringArgs().m
-// grentCAD('/CAD/static/data/'+ m +'/floor.json')
-</script>
 </body>
 
 </html>

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

@@ -831,7 +831,7 @@ hr {
 
 .icon-fullscreen-exit:before {
     content: "";
-    background: url("https://super.4dage.com/images/narrow_off.png") center top no-repeat;
+    background: url("../images/narrow_off.png") center top no-repeat;
     background-size: 100%;
     display: inline-block;
     width: 24px;
@@ -840,7 +840,7 @@ hr {
 
 .icon-fullscreen:before {
     content: "";
-    background: url("https://super.4dage.com/images/enlarge_on.png")center top no-repeat;
+    background: url("../images/enlarge_on.png")center top no-repeat;
     background-size: 100%;
     display: inline-block;
     width: 24px;
@@ -3715,7 +3715,7 @@ a.hasHover:hover, a:active {
 .gui-floor-icon {
     width: 32px;
     height: 29px;
-    background: url("https://super.4dage.com/images/floor-icon.png") left top no-repeat;
+    background: url("../images/floor-icon.png") left top no-repeat;
     background-size: 98%;
 }
 
@@ -6346,7 +6346,7 @@ a.hasHover.tag-link:hover {
     display: block;
     width: 18px;
     height: 18px;
-    background: url("https://super.4dage.com/images/4dage-logo.png")left top no-repeat;
+    background: url("../images/4dage-logo.png")left top no-repeat;
     background-size: 100%;
 }
 

+ 1 - 2
web/public/static/js/manage.js

@@ -292,7 +292,6 @@ Manage.prototype.weixinShare = function() {
     
 }
 
-// window.isLocal = true
 
 Manage.prototype.dealURL = function(src, type){
     if(window.isLocal && settings.localPrefix!=void 0){//本地将线上的前缀替换
@@ -305,7 +304,7 @@ Manage.prototype.dealURL = function(src, type){
                 break;
             }
         }
-        console.error("没有找到合适的本地链接")
+        // console.error("没有找到合适的本地链接")
         return src
     }else{
         var prefix = g_Prefix.replace('https://','').replace('http://','') 

+ 4 - 0
web/public/static/js/myShow.js

@@ -1,5 +1,9 @@
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
 var g_Prefix="https://super.4dage.com/";
+// var g_Prefix="";
+// window.isLocal = true
+
+
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
 var s = window.location.href.split('/');
 s.pop();

+ 23 - 11
web/src/components/hotspot/audio.vue

@@ -10,7 +10,7 @@
       id="audioTag"
       class="noshow"
       autoplay
-      :src="hotspot.backgroundMusic"
+      :src="g_dealUrl(hotspot.backgroundMusic)"
     ></audio>
     <div class="title">{{ hotspot.title }}</div>
     <div class="img-con">
@@ -31,7 +31,10 @@
           "
           alt=""
         />
-        <span class="time">{{ time }}</span>
+        <div class="time">
+          <span>{{ time }}</span
+          ><span> / {{ allTime }}</span>
+        </div>
       </div>
     </div>
   </div>
@@ -47,7 +50,7 @@
       class="noshow"
       autoplay
       preload
-      :src="hotspot.backgroundMusic"
+      :src="g_dealUrl(hotspot.backgroundMusic)"
     ></audio>
     <div class="title" v-html="hotspot.title"></div>
     <div class="img-con">
@@ -149,10 +152,6 @@ export default {
         this.isPlay = true;
       });
 
-      $("#audioTag").on("canplaythrough", (e) => {
-        this._audio.play()
-      });
-
       document.addEventListener("WeixinJSBridgeReady", function () {
         this._audio.play()
       }, false);
@@ -161,6 +160,10 @@ export default {
         this.updateProgress();
       });
 
+       $("#audioTag").on("timeupdate", () => {
+        this.updateProgress();
+      });
+
       $("#audioTag").on("ended", () => {
         this.audioEnded();
       });
@@ -259,11 +262,20 @@ export default {
         width: 30px;
         height: 36px;
       }
+
       .time {
-        width: 60px;
-        text-align: left;
-        flex-shrink: 0;
-        font-weight: bold;
+        width: 100px;
+        text-align: center;
+        margin: 0 auto 10px;
+        > span {
+          &:first-of-type {
+            color: #fff;
+          }
+
+          &:last-of-type {
+            color: @color;
+          }
+        }
       }
     }
   }

+ 2 - 2
web/src/components/hotspot/image.vue

@@ -3,7 +3,7 @@
       <div class="title" v-html="hotspot.title"></div>
       <div class="img-con">
         <span v-if="hotspot.images.length>1" @click="handlePage('prev')" >上一张</span>
-        <img v-viewer :src="hotspot.images[active]" alt="">
+        <img v-viewer :src="g_dealUrl(hotspot.images[active])" alt="">
         <span v-if="hotspot.images.length>1" @click="handlePage('next')">下一张</span>
         <ul class="pagna">
           <li v-for="(item,i) in hotspot.images" :class="{active:i==active}" :key="i"></li>
@@ -18,7 +18,7 @@
         <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">
+              <img v-viewer :src="g_dealUrl(item)">
             </div>
           </div>
         </ul>

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

@@ -45,11 +45,6 @@ export default {
     iconArr.forEach(item => {
       if (this.hotspot[item.key]) {
         this.active = !this.active ? item.id : this.active;
-        this.hotspot[item.key] = this.hotspot[item.key].map(sub=>{
-          sub = window.manage.dealURL(sub)
-          return sub
-        })
-
       }
     });
 

+ 2 - 2
web/src/components/hotspot/video.vue

@@ -10,7 +10,7 @@
     <div class="img-con">
       <span @click="active -= 1" :class="{ noshow: active <= 0 }">上一张</span>
       <video controls autoplay>
-        <source :src="hotspot.video[active].url" type="video/mp4" />
+        <source :src="g_dealUrl(hotspot.video[active].url)" type="video/mp4" />
       </video>
       <span
         @click="active += 1"
@@ -45,7 +45,7 @@
         >
           <div class="sl-item">
             <video controls autoplay>
-              <source :src="item.url" type="video/mp4" />
+              <source :src="g_dealUrl(item.url)" type="video/mp4" />
             </video>
           </div>
         </div>

+ 7 - 0
web/src/components/popupLayout/Tips.vue

@@ -12,6 +12,13 @@ export default {
     };
   },
   mounted(){
+    setTimeout(() => {
+        this.show = false;
+        this.$nextTick(function() {
+            this.$hideTips()
+            this.$destroy(true);
+        });
+    }, 2000);
   },
   methods:{
     close(){

+ 4 - 1
web/src/mixins/index.js

@@ -25,7 +25,10 @@ Vue.mixin({
       $showHotspot,
       $hideHotspot,
       $showTips,
-      $hideTips
+      $hideTips,
+      g_dealUrl(src){
+        return window.manage.dealURL(src)
+      }
       // $showLoading,
       // $showBroadcast,
       // $hideBroadcast

+ 1 - 0
web/vue.config.js

@@ -4,6 +4,7 @@ const path = require('path');
 module.exports = {
   publicPath: "./",
   lintOnSave: false,
+  productionSourceMap: process.env.NODE_ENV !== "production",
   css: {
     loaderOptions: {
       less: {