This commit is contained in:
Hankin 2026-05-08 16:36:25 +08:00
parent 175d52c1d9
commit 03fd1dca7e

View File

@ -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);
}
}
/**
* 移除活动或服务