From b7d83b0dae17b8ffb6c0e4bc08bcc93d6005c012 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Mon, 4 Dec 2023 23:52:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../router/service/client/user/pub/getCompany.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uniCloud-aliyun/cloudfunctions/router/service/client/user/pub/getCompany.js b/uniCloud-aliyun/cloudfunctions/router/service/client/user/pub/getCompany.js index a229cda..d844fc9 100644 --- a/uniCloud-aliyun/cloudfunctions/router/service/client/user/pub/getCompany.js +++ b/uniCloud-aliyun/cloudfunctions/router/service/client/user/pub/getCompany.js @@ -17,10 +17,10 @@ module.exports = { } if (!vk.pubfn.isNull(data.keyword)) whereJson['company.companyName'] = new RegExp(data.keyword); if (!vk.pubfn.isNull(data.isCoop)) whereJson.isCoop = data.isCoop; - if (vk.pubfn.isNull(data.province) && data.province.length > 0) { + if (vk.pubfn.isNull(data.province) && data.province && data.province.length > 0) { whereJson['businessCard.address.province.code'] = _.in(data.province); } - if (data.mainSpotCategoryIds.length > 0) { + if (vk.pubfn.isNull(data.mainSpotCategoryIds) && data.mainSpotCategoryIds && data.mainSpotCategoryIds.length > 0) { whereJson['businessCard.mainSpotCategoryIds'] = _.in(data.mainSpotCategoryIds); } // 业务逻辑开始-----------------------------------------------------------