From 9418debe004b683fa97ce5e0fa47d2d7695120cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Wed, 4 Mar 2026 11:04:18 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5F=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- .../image-preview/preview-detail.vue | 94 +++++++++++++------ src/pages/course/components/talkingItem.vue | 9 +- src/store/storage.js | 7 +- 4 files changed, 76 insertions(+), 38 deletions(-) diff --git a/.env.development b/.env.development index 1af6108b..fe9b88ca 100644 --- a/.env.development +++ b/.env.development @@ -4,12 +4,12 @@ ENV = 'development' -VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' +# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001' #VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' -# VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' +VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_API_Url = 'http://192.168.247.200' # VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001' # VITE_APP_BASE_API_Url = 'http://192.168.108.129' diff --git a/src/components/image-preview/preview-detail.vue b/src/components/image-preview/preview-detail.vue index 720121c9..827eaffe 100644 --- a/src/components/image-preview/preview-detail.vue +++ b/src/components/image-preview/preview-detail.vue @@ -6,12 +6,24 @@ - + + + + + + + + + + + + @@ -56,7 +68,8 @@ watching: false, videoContext: null, base_url: get_base_url(), - scale: 1 + scale: 1, + currentIndex: 0 }; }, computed: { @@ -79,44 +92,21 @@ src() { return this.storageStore?.getFileSrc }, + srcList() { + return this.storageStore?.getFileSrcList + } }, watch: { fileId: { handler(newval, oldval) { - if (this.fileType === 'image') { - if (newval.indexOf('/') === 0) { - this.fileUrlShow = this.base_url + newval + '?tk=' + getToken(); - return; - } - if (newval.indexOf('http') === 0) { - this.fileUrlShow = newval + '?tk=' + getToken(); - return; - } - if (newval && this.watching) { - this.getImagePreviewUrlBlob(newval); - } - } - if (this.fileType === 'video') { - if (newval.indexOf('http') === 0) { - this.fileUrlShow = newval + '?tk=' + getToken() - } else { - if (newval && this.watching) { - this.getPreviewUrlBlob(newval); - } - } - } - this.videoContext = uni.createVideoContext(`video` + this.fileId) + this.initFileId(newval, oldval) }, immediate: true, deep: true, }, src: { handler(newval, oldval) { - if (newval.indexOf('http') === 0) { - this.fileUrlShow = newval + '?tk=' + getToken() - } else { - this.fileUrlShow = this.base_url + newval + '?tk=' + getToken() - } + this.initSrc(newval, oldval) }, immediate: true, deep: true, @@ -131,6 +121,41 @@ } }, methods: { + initFileId(newval, oldval) { + if (this.fileType === 'image') { + if (newval.indexOf('/') === 0) { + this.fileUrlShow = this.base_url + newval + '?tk=' + getToken(); + return; + } + if (newval.indexOf('http') === 0) { + this.fileUrlShow = newval + '?tk=' + getToken(); + return; + } + if (newval && this.watching) { + this.getImagePreviewUrlBlob(newval); + } + } + if (this.fileType === 'video') { + if (newval.indexOf('http') === 0) { + this.fileUrlShow = newval + '?tk=' + getToken() + } else { + if (newval && this.watching) { + this.getPreviewUrlBlob(newval); + } + } + } + this.videoContext = uni.createVideoContext(`video` + this.fileId) + }, + initSrc(newval, oldval) { + let _src + if (newval.indexOf('http') === 0) { + _src = newval + '?tk=' + getToken() + } else { + _src = this.base_url + newval + '?tk=' + getToken() + } + this.fileUrlShow = _src + return _src + }, getImagePreviewUrlBlob(id) { if (!id) { this.fileUrlShow = ''; @@ -303,6 +328,11 @@ z-index: 999; background-color: rgba(0, 0, 0, 0.65); + .stack-swiper { + width: 100vw; + height: 100vh; + } + movable-view { position: fixed; display: flex; @@ -322,10 +352,12 @@ movable-view image { width: 100%; } + .detail-img { width: calc(100% - 40rpx); height: calc(100% - 100rpx); } + // .detail-img { // position: absolute; // left: 50%; diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 51529cee..456638bf 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -69,7 +69,7 @@ + :imgId="item" :previewDetail="false" @click="previewImage(item, imgAddrs)"> @@ -476,12 +476,13 @@ fileSrc: obj.vidAddr }) } - const previewImage = (obj)=>{ + const previewImage = (obj, arr=[])=>{ storageStore.setShowPreviewDetail({ status: true, - fileType: 'image', + fileType: arr.length>0?'imageList':'image', fileId: '', - fileSrc: obj + fileSrc: obj, + fileSrcList: arr }) } diff --git a/src/store/storage.js b/src/store/storage.js index 80cf4ace..af43a267 100644 --- a/src/store/storage.js +++ b/src/store/storage.js @@ -12,6 +12,7 @@ export const useStorageStore = defineStore('storageStore',{ fileType: 'iamge', fileId: '', fileSrc: '', + fileSrcList: [], gettingVoiceId: '' }), getters:{ @@ -39,6 +40,9 @@ export const useStorageStore = defineStore('storageStore',{ getFileSrc(state){ return state.fileSrc }, + getFileSrcList(state){ + return state.fileSrcList + }, getGettingVoiceId(state){ return state.gettingVoiceId }, @@ -47,11 +51,12 @@ export const useStorageStore = defineStore('storageStore',{ setGettingVoiceId(id){ return this.gettingVoiceId = id }, - setShowPreviewDetail({ status = false, fileType = 'image', fileId = '', fileSrc = '' }){ + setShowPreviewDetail({ status = false, fileType = 'image', fileId = '', fileSrc = '', fileSrcList = [] }){ this.showPreviewDetail = status this.fileId = fileId this.fileType = fileType this.fileSrc = fileSrc + this.fileSrcList = fileSrcList }, setTouchBtnZIndex(index = 12){ this.touchBtnZIndex = index