feat: add business feasibility report upload

dev-QQq
chenyuan 3 weeks ago
parent c8618d8206
commit cf3a52f4cf

@ -379,3 +379,14 @@ export function checkBusinessFeasibilityStepTwo(payload) {
} }
return request({ url: "/api/student-training-answers/business-feasibility/step-2/validate", method: "post", data: value, headers: { repeatSubmit: false } }); return request({ url: "/api/student-training-answers/business-feasibility/step-2/validate", method: "post", data: value, headers: { repeatSubmit: false } });
} }
export function checkBusinessFeasibilityStepThree(payload) {
const reportUrl = String(payload?.reportUrl || "").trim();
const reportName = String(payload?.reportName || "").trim();
const supported = /\.(pdf|docx?|png|jpe?g)(?:\?|$)/i;
if (isStudentDemo()) {
if (!reportUrl || !supported.test(reportUrl) && !supported.test(reportName)) return Promise.reject(new Error("请上传 PDF、Word、PNG 或 JPG 格式的可行性论证报告"));
return Promise.resolve({ code: 200, data: { valid: true, message: "校验通过" } });
}
return request({ url: "/api/student-training-answers/business-feasibility/step-3/validate", method: "post", data: { reportUrl, reportName }, headers: { repeatSubmit: false } });
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save