fix: 图片地址调整
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user