From 03fd1dca7edd40de9e2d5ead2330b12573216d11 Mon Sep 17 00:00:00 2001 From: Hankin Date: Fri, 8 May 2026 16:36:25 +0800 Subject: [PATCH] sign url --- .../Server/Admin/ActivityController.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Server/Admin/ActivityController.php b/app/Http/Controllers/Server/Admin/ActivityController.php index 3f4a7b7..e24a188 100644 --- a/app/Http/Controllers/Server/Admin/ActivityController.php +++ b/app/Http/Controllers/Server/Admin/ActivityController.php @@ -1000,6 +1000,12 @@ class ActivityController extends Controller ->where('type_id', $activity->id) ->value('url'); $activity->sign_qr_codes = $sign_qr_codes; + + $temp_url = urlencode(env('APP_URL') . '/pu/#/activitySignIn/' . $activity->id); + $jump_url = env('APP_URL') . '/api/official/live/wechat/FamilyAuth?merchant_id=' . $request->account_id . + '&qr_code_id=' . $sign_qr_codes->id . '&url=' . $temp_url; + $activity->sign_url = $jump_url; + return $this->success('ok', $activity); } catch (\Exception $e) { $this->getError($e); @@ -1010,16 +1016,18 @@ class ActivityController extends Controller public function communityActivitySignInList(Request $request, $id) { $activity = CommunityActivity::where('id', $id)->first(); - if (empty($activity)) return $this->failure("活动不存在"); + if (empty($activity)) + return $this->failure("活动不存在"); $qrCode = Qrcode::where("merchant_id", $activity->merchant_id)->where("type_id", $activity->id)->first(); - if (empty($qrCode)) return $this->failure("签到码不存在"); + if (empty($qrCode)) + return $this->failure("签到码不存在"); $list = SignIn::where("qr_code_id", $qrCode->id); $keyword = $request->input("keyword"); if ($keyword) { - $list = $list->where(function($sql) use($keyword) { - $sql->where("name", "like", "%".$keyword."%")->orWhere("mobile", "like", "%".$keyword."%"); + $list = $list->where(function ($sql) use ($keyword) { + $sql->where("name", "like", "%" . $keyword . "%")->orWhere("mobile", "like", "%" . $keyword . "%"); }); } $list = $list->paginate(); @@ -1029,7 +1037,7 @@ class ActivityController extends Controller } return $this->success("Ok", $list); - } + } /** * 移除活动或服务