Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/chenzhiguang/FD_Pano

tremble 3 лет назад
Родитель
Сommit
67b4426e55

+ 0 - 1
src/components/table/index.vue

@@ -128,7 +128,6 @@ export default {
   },
   mounted () {
     const resizeObserver = new ResizeObserver((entries) => {
-      console.log('asdf');
       if (entries[0].target.clientHeight < entries[0].target.scrollHeight) {
         this.hasScrollBar = true
       } else {

+ 3 - 5
src/pages/material.js

@@ -7,8 +7,8 @@ import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'
 import { showLoginTips } from '@/utils/request'
 import { Button } from 'element-ui';
-Vue.component(Button.name, Button);
 
+Vue.component(Button.name, Button);
 
 window.tipInstance = null
 
@@ -20,12 +20,10 @@ Vue.use(Viewer,{
   }
 })
 
-
-
 Vue.config.productionTip = false
 
-window.addEventListener('store', () => {
-  console.log(localStorage.getItem('token'));
+store.dispatch('refreshUserInfo')
+window.addEventListener('storage', () => {
   if (!localStorage.getItem('token')) {
     showLoginTips()
   }

+ 3 - 11
src/utils/request.js

@@ -13,7 +13,6 @@ import { base64ToBlob } from "./file";
 import { checkLogin } from "@/api";
 import { LoginDetector } from "@/utils/starter";
 import { $alert, $confirm } from "@/components/shared/message";
-import store from '@/Store'
 
 let vue = new Vue();
 
@@ -55,7 +54,7 @@ export const showLoginTips = () => {
 
   return $confirm({
     title: "提示",
-    content: "登录态失效,请重新登录",
+    content: "登录态失效,请重新登录",
     okText: "去登录",
     noText: "登录完毕,继续",
     okLink: "/",
@@ -66,16 +65,14 @@ export const showLoginTips = () => {
     no: function() {
       checkLogin().then((response) => {
         if (response.code === statusCode.SUCCESS) {
-          store.dispatch('refreshUserInfo')
           postQueue.length && postQueue.forEach((item) => item());
           postQueue = [];
           LoginDetector.valid();
-          let url = window.location.href
-          window.location.href = url
+          location.reload()
         } else if (response.code === statusCode.FAILURE_CODE_5001) {
           showLoginTips();
         }
-      });
+      })
       showLoginTips.__is_show = false;
     },
   });
@@ -206,11 +203,6 @@ export const http = {
             postQueue.push(function() {
               http[method](url, data, done, fail);
             });
-            // if (url.indexOf('isLogin') == -1) {
-            //     postQueue.push(function() {
-            //         http[method](url, data, done, fail)
-            //     })
-            // }
           }
         });
 

+ 1 - 1
src/views/material/image/index.vue

@@ -77,7 +77,7 @@
           <div v-else-if="sub.type == 'image'" class="img">
             <img
               :id="'img' + item.id"
-              :src="data + `?${Math.random()}`"
+              :src="data + `?x-oss-process=image/resize,p_10&${Math.random()}`"
               alt=""
               @click="previewImage(item)"
             />

+ 24 - 3
src/views/material/popup/panoImagePreviewer.vue

@@ -1,11 +1,14 @@
 <template>
   <popup v-if="ifShow">
     <div class="preview-wrapper" ref="preview-wrapper">
-      <div class="title">
+      <div v-if="!isFullscreen" class="title">
         <i class="iconfont icon-material_panoramic_picture title-icon"/>
         {{imageTitleList[currentIndex]}}
       </div>
-      <img class="close-btn" :src="require('@/assets/images/icons/material_preview_close@2x.png')" @click=onClickClose />
+      <img v-if="!isFullscreen" class="close-btn" :src="require('@/assets/images/icons/material_preview_close@2x.png')" @click=onClickClose />
+      <div v-if="isFullscreen" class="close-btn--full-screen" @click=onClickClose>
+        <i class="iconfont icon-pop-ups_shut-down close-btn--full-screen__icon"/>
+      </div>
       <iframe
         ref="iframe"
         class="iframe"
@@ -38,7 +41,7 @@
         </i>
         <i v-if="isFullscreen" class="iconfont icon-material_preview_drop_out hover-tips" @click="onClickCancelFullScreen()">
           <div>
-            <div class="remark">取消全屏</div>
+            <div class="remark">退出全屏</div>
           </div>
         </i>
       </div>
@@ -190,6 +193,24 @@ export default {
     z-index: 2;
     cursor: pointer;
   }
+  .close-btn--full-screen {
+    position: absolute;
+    top: -40px;
+    right: -40px;
+    width: 80px;
+    height: 80px;
+    border-radius: 50%;
+    z-index: 2;
+    cursor: pointer;
+    background: rgba(0, 0, 0, 0.3);
+    .close-btn--full-screen__icon {
+      position: absolute;
+      left: 19px;
+      bottom: 19px;
+      color: #fff;
+      font-size: 12px;
+    }
+  }
   .toolbar {
     position: absolute;
     bottom: 110px;

+ 1 - 1
src/views/material/video/index.vue

@@ -362,7 +362,7 @@ export default {
         (data) => {
           const newData = data.data.list.map((i) => {
             i.fileSize = changeByteUnit(Number(i.fileSize));
-            i.icon = i.ossPath + this.$videoImg;
+            i.icon = i.ossPath + '?x-oss-process=video/snapshot,t_0,f_jpg,w_89,h_50,m_fast,ar_auto';
             i.createTime = i.createTime.substring(0, i.createTime.length - 3)
             i.updateTime = i.updateTime.substring(0, i.updateTime.length - 3)
             return i;