Update index.js

This commit is contained in:
huxuejian 2026-09-09 11:35:06 +08:00
parent c315e10473
commit ad8cca11c2

View File

@ -208,9 +208,9 @@ async function getHlwDrugInfo(ctx) {
const page = Number.isSafeInteger(requestedPage) && requestedPage > 0 ? requestedPage : 1;
const pageSize = Number.isSafeInteger(requestedPageSize) && requestedPageSize > 0 ? requestedPageSize : 10;
const query = {};
if (typeof ctx.corpId === "string" && ctx.corpId.trim()) {
query.corpId = ctx.corpId.trim();
}
// if (typeof ctx.corpId === "string" && ctx.corpId.trim()) {
// query.corpId = ctx.corpId.trim();
// }
if (typeof ctx.name === "string" && ctx.name.trim()) {
query.name = new RegExp(ctx.name.trim(), "i")
};