fix: 图片地址调整

This commit is contained in:
杨航
2025-12-02 21:14:28 +08:00
parent 807d0c506b
commit 80dcfdde1f
2 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -2,9 +2,9 @@
ENV = 'development.yh' ENV = 'development.yh'
# '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_H5_API_Url = 'http://25.18.122.78:9786'
# 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_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604'
@@ -13,6 +13,7 @@
import { previewFile, previewCacheThumbImage } from '@/api/common.js'; import { previewFile, previewCacheThumbImage } from '@/api/common.js';
import { get_base_url } from '@/api/request.js'; import { get_base_url } from '@/api/request.js';
import { useStorageStore } from '@/store/storage.js'; import { useStorageStore } from '@/store/storage.js';
import { getToken } from '@/common/common.js'
// const storageStore = useStorageStore() // const storageStore = useStorageStore()
export default { export default {
@@ -53,7 +54,8 @@
imgUrlShow: '', imgUrlShow: '',
watching: false, watching: false,
base_url: get_base_url(), base_url: get_base_url(),
showModel: false showModel: false,
token: getToken()
}; };
}, },
computed: { computed: {
@@ -151,16 +153,16 @@
mounted() { mounted() {
if (this.imgId) { if (this.imgId) {
if (this.imgId.indexOf('/') === 0) { 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) { } else if (this.imgId.indexOf('http') === 0) {
this.imgUrlShow = this.imgId; this.imgUrlShow = this.imgId + '?tk=' + this.token;
} else { } else {
this.getPreviewUrlBlob(this.imgId); this.getPreviewUrlBlob(this.imgId);
} }
} }
this.watching = true; this.watching = true;
if (this.src) { if (this.src) {
this.imgUrlShow = this.base_url + this.src; this.imgUrlShow = this.base_url + this.src + '?tk=' + this.token;
} }
} }
}; };