From 392e848b293b802fca5bcc5fa9ca556783d7161d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=96=E5=8F=AB?= <392494244@qq.com> Date: Fri, 8 Dec 2023 17:28:35 +0800 Subject: [PATCH] 1 --- app/api/controller/food/User.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/controller/food/User.php b/app/api/controller/food/User.php index 62902c5..fc28e6f 100644 --- a/app/api/controller/food/User.php +++ b/app/api/controller/food/User.php @@ -140,9 +140,12 @@ class User extends Controller return $this->renderSuccess([], '成功'); } $where = []; - $where['openid'] = $post['openid']; - $openid = $post['openid']; + if (!empty($post['openid'])) { + $where['openid'] = $post['openid']; + $openid = $post['openid']; + + } if (!empty($post['coupon_id'])) { $where['coupon_user_id'] = $post['coupon_id']; if (!empty($where['openid'])) {