修复画布图片加载不出来问题

This commit is contained in:
X1627315083
2025-05-09 16:00:50 +08:00
parent 404744bce5
commit ae4977abd9
4 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ NODE_ENV = 'development'
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VUE_APP_BASE_URL = 'https://www.api.aida.com.hk'
# 徐佩
# VUE_APP_BASE_URL = 'http://192.168.1.4:5567'
VUE_APP_BASE_URL = 'http://192.168.31.118:5567'
# 海波
# VUE_APP_BASE_URL = 'http://192.168.1.2:5567'

View File

@@ -755,8 +755,8 @@ export default defineComponent({
if(key == 'upImgFiles')imgWidth[key] = setImageWidth(key,img);
let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
var match = url.match(/^(?:https?:\/\/[^\/]+)\/(.*)/);
minioUrl = match[1]
// let id =
let proportion = img.height / img.width; //计算图形宽高比例
// let imgWidth = setImageWidth(key)

View File

@@ -296,8 +296,8 @@ export default defineComponent({
}
let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
var match = url.match(/^(?:https?:\/\/[^\/]+)\/(.*)/);
minioUrl = match[1]
// let id =
let proportion = img.height / img.width; //计算图形宽高比例
let scaleWH = imgWidth[key] / img.width; //计算放到画布上缩小倍率

View File

@@ -1148,8 +1148,8 @@ class MyCanvas {
let imgWidth = await this.setImageWidth(key,img);
if(imgUrl?.split('?')){
let url = imgUrl.split('?')[0]
var match = url.match(/:(\d+)\/(.*)/);
minioUrl = match[2]
var match = url.match(/^(?:https?:\/\/[^\/]+)\/(.*)/);
minioUrl = match[1]
}
let proportion = img.height / img.width; //计算图形宽高比例
let scaleWH = imgWidth / img.width; //计算放到画布上缩小倍率