任一存 1 year ago
parent
commit
9c8c765aae

+ 8 - 1
README.md

@@ -4,4 +4,11 @@ https://culture.4dage.com/demo/ShangHaiGongYe/index.html#/history
 ## 部署测试环境
 文件存放位置:/Default/阿里云/项目节点/项目测试/阿里云-四维时代-项目测试服务器-8.135.106.227/home/data/museum_shanghai_gongye_data/web
 
-访问url:https://sit-shgybwg.4dage.com/web/index.html#/general
+访问url:https://sit-shgybwg.4dage.com/web/index.html#/general
+
+## 测试环境后台
+https://sit-shgybwg.4dage.com/backstage/index.html#/
+
+帐号:admin
+
+密码:123456

+ 2 - 0
src/components/HomeFadeIn.vue

@@ -5,6 +5,8 @@
       src="@/assets/videos/loading.mp4"
       autoplay
       playsinline
+      webkit-playsinline="true"
+      x5-video-player-type="h5"
       muted
     />
     <div class="progress">

+ 2 - 1
src/components/TreasureShare.vue

@@ -10,7 +10,7 @@
           },
         })"
       />
-      <h2 title="万吨水压机">
+      <h2 :title="info.name">
         {{ info.name }}
       </h2>
       <img
@@ -176,6 +176,7 @@ export default {
       overflow: hidden;
       white-space: pre;
       text-overflow: ellipsis;
+      padding-right: 35px;
     }
     >img.splitter {
       flex: 0 0 auto;

+ 4 - 0
src/views/General.vue

@@ -513,6 +513,8 @@ export default {
           white-space: pre;
           text-overflow: ellipsis;
           opacity: 0.6;
+          padding-right: 4px;
+          width: 100%;
         }
         &.active {
           >span.corp-name {
@@ -845,6 +847,8 @@ export default {
             white-space: pre;
             text-overflow: ellipsis;
             opacity: 0.6;
+            padding-right: 4px;
+            width: 100%;
           }
           &.active {
             >span.corp-name {

+ 2 - 1
src/views/HistoryNew.vue

@@ -16,8 +16,9 @@
       class="bg"
       autoplay
       loop
+      playsinline
       webkit-playsinline="true"
-      playsinline="true"
+      x5-video-player-type="h5"
     />
     <div
       class="gear-wrap"

+ 12 - 4
src/views/Record.vue

@@ -40,7 +40,10 @@ export default {
     setTimeout(() => {
       const el = document.querySelector('#record-root')
       if (el) {
+        console.log('请求全屏……')
         utils.requestFullScreen(el)
+      } else {
+        console.log('未请求全屏!')
       }
     }, 0)
 
@@ -69,7 +72,12 @@ export default {
       chunks.push(e.data)
     })
 
-    this.mediaRecorder.addEventListener('stop', function () {
+    this.mediaRecorder.addEventListener('stop', () => {
+      console.log('stoped!')
+      stream.getTracks().forEach(element => {
+        element.stop()
+      })
+
       let blob = new Blob(chunks, {
         type: chunks[0].type
       })
@@ -81,6 +89,9 @@ export default {
       a.click()
 
       utils.exitFullScreen()
+      setTimeout(() => {
+        this.$router.go(-1)
+      }, 100)
     })
 
     this.mediaRecorder.addEventListener('start', () => {
@@ -103,9 +114,6 @@ export default {
   methods: {
     stopRecord() {
       this.mediaRecorder.stop()
-      setTimeout(() => {
-        this.$router.go(-1)
-      }, 100)
     }
   }
 }

+ 3 - 31
src/views/Treasure.vue

@@ -10,7 +10,8 @@
       autoplay
       loop
       webkit-playsinline="true"
-      playsinline="true"
+      playsinline
+      x5-video-player-type="h5"
     />
     <div
       class="grid"
@@ -118,28 +119,7 @@ api.getTreasureList().then((res) => {
         // gutter: 10,
       }
     })
-  }, internalInstance.appContext.config.globalProperties.$isMobile ? 1200 : 600)
-  // 多排列几次,看看能不能修复偶发的排列成一列的bug
-  setTimeout(() => {
-    const isotopeInst = $('.grid').isotope({
-      layoutMode: 'packery',
-      itemSelector: '.grid-item',
-      packery: {
-        horizontal: true,
-        // gutter: 10,
-      }
-    })
-  }, internalInstance.appContext.config.globalProperties.$isMobile ? 2400 : 1200)
-  setTimeout(() => {
-    const isotopeInst = $('.grid').isotope({
-      layoutMode: 'packery',
-      itemSelector: '.grid-item',
-      packery: {
-        horizontal: true,
-        // gutter: 10,
-      }
-    })
-  }, internalInstance.appContext.config.globalProperties.$isMobile ? 3000 : 1800)
+  }, 600)
 })
 
 /**
@@ -197,14 +177,6 @@ onMounted(() => {
   })
 
   setTimeout(() => {
-    // const isotopeInst = $('.grid').isotope({
-    //   layoutMode: 'packery',
-    //   itemSelector: '.grid-item',
-    //   packery: {
-    //     horizontal: true,
-    //     // gutter: 10,
-    //   }
-    // })
     isShowLoadingMask.value = false
     loadingInstance.close()
   }, 600)

+ 39 - 8
src/views/TreasureDetail.vue

@@ -15,8 +15,9 @@
       class="bg"
       autoplay
       loop
+      playsinline
       webkit-playsinline="true"
-      playsinline="true"
+      x5-video-player-type="h5"
     />
     <button
       class="back"
@@ -66,7 +67,7 @@
         }"
         @click="activeTabIndex = 2"
       >
-        <span>图片</span>
+        <span>图片<template v-if="activeTabIndex === 2 && imageUrlList?.length && imageUrlList.length > 1">{{ activeSwiperItemIndex + 1 }}/{{ imageUrlList?.length }}</template></span>
       </button>
     </div>
 
@@ -91,8 +92,9 @@
               class="bg"
               autoplay
               loop
+              playsinline
               webkit-playsinline="true"
-              playsinline="true"
+              x5-video-player-type="h5"
             />
             <iframe
               :src="`${prefix}/web-model/index.html#/relic-detail?model-path=${encodeURIComponent(item.filePath)}`"
@@ -127,12 +129,16 @@
               autoplay
               loop
               webkit-playsinline="true"
-              playsinline="true"
+              playsinline
+              x5-video-player-type="h5"
             />
             <video
               :src="`${prefix}${item.filePath}`"
               controls
               class="treasure-detail-video"
+              playsinline
+              webkit-playsinline="true"
+              x5-video-player-type="h5"
               @play="onVideoPlay"
               @ended="onVideoEnd"
               @pause="onVideoPause"
@@ -166,7 +172,8 @@
               autoplay
               loop
               webkit-playsinline="true"
-              playsinline="true"
+              playsinline
+              x5-video-player-type="h5"
             />
             <img
               draggable="false"
@@ -190,9 +197,17 @@
         </div> -->
       </div>
       <div class="main-info-wrap">
-        厂家:{{ rawData.value?.entity?.company || '-' }}&emsp;类型:{{ rawData.value?.entity?.type || '-' }}
+        <template v-if="rawData.value?.entity?.company">
+          厂家:{{ rawData.value?.entity?.company }}&emsp;
+        </template>
+        <template v-if="rawData.value?.entity?.type">
+          类型:{{ rawData.value?.entity?.type }}
+        </template>
       </div>
-      <p class="desc">
+      <p
+        v-if="rawData.value?.entity?.description"
+        class="desc"
+      >
         简介:{{ rawData.value?.entity?.description }}
       </p>
     </div>
@@ -292,6 +307,8 @@ export default {
      * tab bar
      */
     const activeTabIndex = ref(0)
+    // 在后台,只有图片类型可以上传多个文件。
+    // 如果只上传了一个类型的文件,且不是“多张图片”,则隐藏tabbar。
     const isShowTabbar = computed(() => {
       let count = 0
       if (modelUrlList.length > 0) {
@@ -303,7 +320,15 @@ export default {
       if (imageUrlList.length > 0) {
         count++
       }
-      return count >= 2
+      if (count >= 2) {
+        return true
+      } else {
+        if (imageUrlList.length > 1) {
+          return true
+        } else {
+          return false
+        }
+      }
     })
 
     /**
@@ -509,6 +534,12 @@ export default {
         opacity: initial;
       }
     }
+    >button.image{
+      min-width: 90px;
+      width: fit-content;
+      padding-left: 5px;
+      padding-right: 5px;
+    }
   }
 
   >.main-wrapper {