fix : 图片类型判断, 一体机modal样式

This commit is contained in:
2025-12-18 10:31:54 +08:00
parent 606b6104bb
commit 854bc9c197
2 changed files with 15 additions and 1 deletions

View File

@@ -30,3 +30,15 @@ uni-toast .uni-toast__content {
font-size: 30rpx !important; font-size: 30rpx !important;
} }
uni-modal .uni-modal{
max-width: 450rpx !important;
}
uni-modal .uni-modal__bd{
font-size: 34rpx !important;
min-height: 100rpx !important;
}
uni-modal .uni-modal__ft{
font-size: 36rpx !important;
line-height: 80rpx !important;
}

View File

@@ -470,7 +470,8 @@ function isImage(type) {
'apng', 'avif', 'heic', 'heif', 'jfif' 'apng', 'avif', 'heic', 'heif', 'jfif'
]; ];
const lowerType = type.toLowerCase(); const lowerType = type.toLowerCase();
return imageTypes.includes(lowerType);
return imageTypes.some(item=>lowerType.includes(item))
} }
function isFile(type) { function isFile(type) {
@@ -510,6 +511,7 @@ function uploadCamera(type = 'camera') {
// 继续上传 // 继续上传
$api.uploadFile(tempFilePaths[0], true).then((resData) => { $api.uploadFile(tempFilePaths[0], true).then((resData) => {
resData = JSON.parse(resData); resData = JSON.parse(resData);
console.log(file.type,'++')
if (isImage(file.type)) { if (isImage(file.type)) {
filesList.value.push({ filesList.value.push({
url: resData.msg, url: resData.msg,