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'
# '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'
@@ -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;
}
}
};