From 48b4748277ce3d096af148b703b44776cefec66c Mon Sep 17 00:00:00 2001 From: tping Date: Wed, 8 Sep 2021 15:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Qrcode/Controller/JumpController.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Application/Qrcode/Controller/JumpController.class.php b/Application/Qrcode/Controller/JumpController.class.php index 1fef70571..dc30d5722 100644 --- a/Application/Qrcode/Controller/JumpController.class.php +++ b/Application/Qrcode/Controller/JumpController.class.php @@ -65,7 +65,7 @@ class JumpController extends HomeController $backgroundImg = ($isHttps? 'https://': 'http://').$_SERVER['HTTP_HOST']."/Public/Qrcode/images/b1.png"; $qrCodeImg = ($isHttps? 'https://': 'http://').$_SERVER['HTTP_HOST']."/Public/Qrcode/images/qrcode.png"; $id = I('request.id', ''); - if (!$id) { + if (!$id || $id == 'undefined') { $this->ajaxReturn([ 'id' => $_REQUEST['id'], 'status' => 1, @@ -75,6 +75,14 @@ class JumpController extends HomeController } // 二维码: $qrcodePromotionList = M('qrcode_promotion_list', 'tab_')->where(['unique_str' => $id])->find(); + if (!$qrcodePromotionList) { + $this->ajaxReturn([ + 'id' => $_REQUEST['id'], + 'status' => 1, + 'background_img' => $backgroundImg, + 'qrcode_img' => $qrCodeImg + ]); + } $qrcode = json_decode($qrcodePromotionList['qrcode_img'], true); $qrcodeCnt = count($qrcode); $intervalMin = $qrcodePromotionList['interval_min'];