This commit is contained in:
尖叫 2023-12-08 17:17:23 +08:00
parent 886cfbaf9f
commit 3a1c786f93

View File

@ -135,9 +135,10 @@ class User extends Controller
public function getWxUserCoupon()
{
$post = $_GET;
$where = [];
if (!empty($post['openid'])) {
$where['openid'] = $post['openid'];
$openid = $post['openid'];
}
if (!empty($post['coupon_id'])) {
@ -147,8 +148,8 @@ class User extends Controller
}
}
$data = Db::name('food_coupon_user_wx')->where($where)->select();
$data['wx_openid'] = $openid ?? '';
return $this->renderSuccess($data, '成功');
}