From 5bc8710c9f744ade523ef85ffc889b10c8f1edd9 Mon Sep 17 00:00:00 2001 From: zhanggucheng Date: Tue, 8 Feb 2022 22:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/PromoteController.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index fdee75781..053392275 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -207,8 +207,17 @@ class PromoteController extends BaseController $this->assign('todayAddSpendData', $todayAddSpendData); $this->assign('mounthAddSpendData', $mounthAddSpendData); + + $promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong'); + if ($promoteBelong == 1 || $promoteBelong == 2) { + $compang_belongs = 1; + }else { + $compang_belongs = 2; + } + // 规则弹窗事宜 $rules = M("document_pop_rules") + ->where(['belongs' => $compang_belongs]) //->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})") ->order("sort asc, id desc") ->limit('0, 5') @@ -216,12 +225,6 @@ class PromoteController extends BaseController $this->assign("rules", $rules); $this->assign("rules_count", count($rules)); - $promoteBelong = M('promote', 'tab_')->where(['id'=>get_pid()])->getField('company_belong'); - if ($promoteBelong == 1 || $promoteBelong == 2) { - $compang_belongs = 1; - }else { - $compang_belongs = 2; - } $belongs = M("document_pop_rules") ->where(['belongs' => $compang_belongs])->count(); if (intval($belongs) > 0) {