"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const common_vendor = require("./common/vendor.js"); const uni_modules_uviewPlus_index = require("./uni_modules/uview-plus/index.js"); if (!Math) { "./pages/index/index.js"; "./pages/map/map.js"; "./pages/plandetail/plandetail.js"; "./pages/Inspectionresult/Inspectionresult.js"; "./pages/membermanagemen/membermanagemen.js"; "./pages/corporateInformation/corporateInformation.js"; "./pages/editcompanInformation/editcompanInformation.js"; "./pages/checklist/checklist.js"; "./pages/editchecklist/editchecklist.js"; "./pages/Inspectionlog/Inspectionlog.js"; "./pages/Inspectionchecklist/Inspectionchecklist.js"; "./pages/Idphotomanagement/Idphotomanagement.js"; "./pages/hiddendanger/Inspection.js"; "./pages/hiddendanger/view.js"; "./pages/hiddendanger/rectification.js"; "./pages/hiddendanger/acceptance.js"; "./pages/hiddendanger/assignment.js"; "./pages/closeout/application.js"; "./pages/closeout/editor.js"; "./pages/equipmentregistration/equipmentregistration.js"; "./pages/area/management.js"; "./pages/Inspectionwarning/Inspectionwarning.js"; "./pages/personalcenter/my.js"; "./pages/personalcenter/helpcenter.js"; "./pages/personalcenter/notification.js"; "./pages/personalcenter/settings.js"; "./pages/personalcenter/account.js"; "./pages/personalcenter/edit.js"; "./pages/login/login.js"; "./pages/login/reg.js"; "./pages/login/enterprise.js"; "./pages/login/success.js"; "./pages/login/forget.js"; "./pages/login/agreement.js"; } const _sfc_main = { onLaunch: function() { common_vendor.index.__f__("log", "at App.vue:4", "App Launch"); }, onShow: function() { common_vendor.index.__f__("log", "at App.vue:7", "App Show"); }, onHide: function() { common_vendor.index.__f__("log", "at App.vue:10", "App Hide"); } }; common_vendor.index.addInterceptor("chooseImage", { success(res) { const allowedExtensions = ["bmp", "gif", "jpg", "jpeg", "png"]; const validTempFilePaths = []; const validTempFiles = []; let hasInvalid = false; let invalidExt = ""; res.tempFiles.forEach((file, index) => { const path = file.path || res.tempFilePaths[index]; const cleanPath = path.split("?")[0]; const ext = cleanPath.split(".").pop().toLowerCase(); if (allowedExtensions.includes(ext)) { validTempFiles.push(file); validTempFilePaths.push(res.tempFilePaths[index]); } else { hasInvalid = true; invalidExt = ext; } }); if (hasInvalid) { common_vendor.index.showToast({ title: `已过滤不支持的 .${invalidExt} 格式图片,请上传 png/jpg/jpeg/gif/bmp`, icon: "none", duration: 3500 }); } res.tempFilePaths = validTempFilePaths; 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 uploadUrl = args.url || ""; const isQiniuUpload = QINIU_UPLOAD_HOST_MARKERS.some((m) => uploadUrl.includes(m)); if (isQiniuUpload) { return validateUploadLocalFileExt(args.filePath) ? args : false; } if (uploadUrl.includes("/frontend/attachment/upload")) { return validateUploadLocalFileExt(args.filePath) ? args : false; } return validateUploadLocalFileExt(args.filePath) ? args : false; } }); function createApp() { const app = common_vendor.createSSRApp(_sfc_main); app.use(uni_modules_uviewPlus_index.uviewPlus); return { app }; } createApp().app.mount("#app"); exports.createApp = createApp; //# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map