diff --git a/.env.development.yh b/.env.development.yh index 081b31b5..dafada1a 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -2,9 +2,9 @@ ENV = 'development.yh' # 'development.yh' -# VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' +VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' -VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' +# VITE_APP_BASE_H5_API_Url = 'http://25.18.122.91:9786' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' diff --git a/src/components/image-preview/image-preview.vue b/src/components/image-preview/image-preview.vue index 31582e02..7afd6b89 100644 --- a/src/components/image-preview/image-preview.vue +++ b/src/components/image-preview/image-preview.vue @@ -13,6 +13,7 @@ import { previewFile, previewCacheThumbImage } from '@/api/common.js'; import { get_base_url } from '@/api/request.js'; import { useStorageStore } from '@/store/storage.js'; + import { getToken } from '@/common/common.js' // const storageStore = useStorageStore() export default { @@ -53,7 +54,8 @@ imgUrlShow: '', watching: false, base_url: get_base_url(), - showModel: false + showModel: false, + token: getToken() }; }, computed: { @@ -151,16 +153,16 @@ mounted() { if (this.imgId) { if (this.imgId.indexOf('/') === 0) { - this.imgUrlShow = this.base_url + this.imgId; + this.imgUrlShow = this.base_url + this.imgId + '?tk=' + this.token; } else if (this.imgId.indexOf('http') === 0) { - this.imgUrlShow = this.imgId; + this.imgUrlShow = this.imgId + '?tk=' + this.token; } else { this.getPreviewUrlBlob(this.imgId); } } this.watching = true; if (this.src) { - this.imgUrlShow = this.base_url + this.src; + this.imgUrlShow = this.base_url + this.src + '?tk=' + this.token; } } };