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