From b25d3633964d36a7db7399967ae5990d2ba9b0a8 Mon Sep 17 00:00:00 2001 From: tping Date: Mon, 30 Aug 2021 16:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=8C=89=E6=97=B6=E9=97=B4=E8=BD=AE=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QrCodePromotionController.class.php | 24 +++++++++++++++++++ .../View/default/Public/promote_base.html | 1 - .../View/default/QrCodePromotion/linkAdd.html | 6 ++--- .../default/QrCodePromotion/linkLists.html | 6 ++--- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/Application/Qrcode/Controller/QrCodePromotionController.class.php b/Application/Qrcode/Controller/QrCodePromotionController.class.php index 8e1919eef..db07d80e4 100644 --- a/Application/Qrcode/Controller/QrCodePromotionController.class.php +++ b/Application/Qrcode/Controller/QrCodePromotionController.class.php @@ -220,6 +220,30 @@ class QrCodePromotionController extends BaseController $this->display(); } + public function linkEdit() + { + $id = I('request.id', 0); + if (!$id) return ; + + if (IS_POST) { + M('qrcode_promotion_list', 'tab_')->where([ + "id" => $id + ])->save([ + 'interval_min' => I('post.interval_min') + ]); + $this->ajaxReturn(['status' => 1, 'message' => '保存成功!']); + } + + $qrcodePromotionList = M('qrcode_promotion_list', 'tab_')->where([ + "id" => $id + ])->find(); + + $this->assign('id', $id); + $this->assign('qp_id', $qrcodePromotionList['qp_id']); + $this->assign('interval_min', $qrcodePromotionList['interval_min']); + $this->display(); + } + public function linkDel() { $id = I('request.id', 0); diff --git a/Application/Qrcode/View/default/Public/promote_base.html b/Application/Qrcode/View/default/Public/promote_base.html index d70cd5a48..7d6c3b257 100644 --- a/Application/Qrcode/View/default/Public/promote_base.html +++ b/Application/Qrcode/View/default/Public/promote_base.html @@ -53,7 +53,6 @@
- 市场总监联系方式:13637338237(李总监)
diff --git a/Application/Qrcode/View/default/QrCodePromotion/linkAdd.html b/Application/Qrcode/View/default/QrCodePromotion/linkAdd.html index 8e4209c49..26e45f4f3 100644 --- a/Application/Qrcode/View/default/QrCodePromotion/linkAdd.html +++ b/Application/Qrcode/View/default/QrCodePromotion/linkAdd.html @@ -28,7 +28,7 @@ *轮播二维码间隔时间(分钟): - + @@ -63,7 +63,7 @@ 'onUploadComplete' : function(file, data) { var res = eval('(' + data + ')'); var src = res.path; - $('#img').append(''); + $('#img').append(''); $('#img').append(''); imgIndex = imgIndex + 1; // $('#img').html('') @@ -99,7 +99,7 @@ if (result.status == 1) { layer.msg(result.message) setTimeout(function() { - // window.location.href = "{:U('QrCodePromotion/linkLists')}"; + window.location.href = "{:U('QrCodePromotion/linkLists', ['id' => $qp_id])}"; }, 200) } else { layer.msg(result.message) diff --git a/Application/Qrcode/View/default/QrCodePromotion/linkLists.html b/Application/Qrcode/View/default/QrCodePromotion/linkLists.html index db9750abe..202fabc71 100644 --- a/Application/Qrcode/View/default/QrCodePromotion/linkLists.html +++ b/Application/Qrcode/View/default/QrCodePromotion/linkLists.html @@ -23,7 +23,7 @@ 推广链接短地址 添加人员 添加时间 - 二维码 + 操作 @@ -36,9 +36,10 @@ {$record.short_link} {$record.admin_name} {$record.create_time|date='Y-m-d H:i:s', ###} - + @@ -100,7 +101,6 @@ $(function(){ $(".delete-btn").click(function() { if (confirm("确认删除吗?")) { var id = $(this).data('id'); - alert(id); $.ajax({ type: 'post', dataType: 'json',