sign url
This commit is contained in:
parent
175d52c1d9
commit
03fd1dca7e
@ -1000,6 +1000,12 @@ class ActivityController extends Controller
|
|||||||
->where('type_id', $activity->id)
|
->where('type_id', $activity->id)
|
||||||
->value('url');
|
->value('url');
|
||||||
$activity->sign_qr_codes = $sign_qr_codes;
|
$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);
|
return $this->success('ok', $activity);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->getError($e);
|
$this->getError($e);
|
||||||
@ -1010,16 +1016,18 @@ class ActivityController extends Controller
|
|||||||
public function communityActivitySignInList(Request $request, $id)
|
public function communityActivitySignInList(Request $request, $id)
|
||||||
{
|
{
|
||||||
$activity = CommunityActivity::where('id', $id)->first();
|
$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();
|
$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);
|
$list = SignIn::where("qr_code_id", $qrCode->id);
|
||||||
$keyword = $request->input("keyword");
|
$keyword = $request->input("keyword");
|
||||||
if ($keyword) {
|
if ($keyword) {
|
||||||
$list = $list->where(function($sql) use($keyword) {
|
$list = $list->where(function ($sql) use ($keyword) {
|
||||||
$sql->where("name", "like", "%".$keyword."%")->orWhere("mobile", "like", "%".$keyword."%");
|
$sql->where("name", "like", "%" . $keyword . "%")->orWhere("mobile", "like", "%" . $keyword . "%");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$list = $list->paginate();
|
$list = $list->paginate();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user