v1.2.1版本,优化调整了很多,整改验收阶段新加字段

This commit is contained in:
王利强
2026-06-13 08:50:51 +08:00
parent 2af9f1fd59
commit 1fe87ec438
591 changed files with 5072 additions and 2706 deletions

View File

@@ -79,23 +79,34 @@ common_vendor.index.addInterceptor("chooseImage", {
res.tempFiles = validTempFiles;
}
});
const UPLOAD_ALLOWED_EXTENSIONS = ["bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf"];
const QINIU_UPLOAD_HOST_MARKERS = ["qiniup.com", "qbox.me"];
function validateUploadLocalFileExt(filePath) {
if (!filePath)
return true;
const cleanPath = filePath.split("?")[0];
const ext = cleanPath.split(".").pop().toLowerCase();
if (!UPLOAD_ALLOWED_EXTENSIONS.includes(ext)) {
common_vendor.index.showToast({
title: `不支持 .${ext} 格式,请上传合规的文件或图片`,
icon: "none",
duration: 3e3
});
return false;
}
return true;
}
common_vendor.index.addInterceptor("uploadFile", {
invoke(args) {
const filePath = args.filePath;
if (filePath) {
const cleanPath = filePath.split("?")[0];
const ext = cleanPath.split(".").pop().toLowerCase();
const allowedExtensions = ["bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf"];
if (!allowedExtensions.includes(ext)) {
common_vendor.index.showToast({
title: `不支持 .${ext} 格式,请上传合规的文件或图片`,
icon: "none",
duration: 3e3
});
return false;
}
const uploadUrl = args.url || "";
const isQiniuUpload = QINIU_UPLOAD_HOST_MARKERS.some((m) => uploadUrl.includes(m));
if (isQiniuUpload) {
return validateUploadLocalFileExt(args.filePath) ? args : false;
}
return args;
if (uploadUrl.includes("/frontend/attachment/upload")) {
return validateUploadLocalFileExt(args.filePath) ? args : false;
}
return validateUploadLocalFileExt(args.filePath) ? args : false;
}
});
function createApp() {