From e3f0a24e4370725fd31311719054ea61e687879c Mon Sep 17 00:00:00 2001
From: yulingwei <2436953959@qq.com>
Date: Wed, 8 Jan 2020 17:20:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8E=A8=E5=B9=BF=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Admin/View/Article/pop_rule_edit.html | 5 +-
.../Controller/PromoteController.class.php | 50 ++++++-
.../Home/View/default/Promote/index.html | 60 ++++++++
.../Home/View/default/Promote/msg_list.html | 45 +++++-
.../View/default/Promote/pop_rule_detail.html | 129 ++++++++++++++++++
5 files changed, 282 insertions(+), 7 deletions(-)
create mode 100644 Application/Home/View/default/Promote/pop_rule_detail.html
diff --git a/Application/Admin/View/Article/pop_rule_edit.html b/Application/Admin/View/Article/pop_rule_edit.html
index 6c906281b..6385b498e 100644
--- a/Application/Admin/View/Article/pop_rule_edit.html
+++ b/Application/Admin/View/Article/pop_rule_edit.html
@@ -15,8 +15,9 @@
-
-
+
+
+ *排序越小越靠前
diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php
index d43e3250f..1d3156628 100644
--- a/Application/Home/Controller/PromoteController.class.php
+++ b/Application/Home/Controller/PromoteController.class.php
@@ -213,6 +213,24 @@ class PromoteController extends BaseController
$this->assign('todayAddSpendData', $todayAddSpendData);
$this->assign('mounthAddSpendData', $mounthAddSpendData);
+ // 规则弹窗事宜
+ $rules = M("document_pop_rules")
+ //->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
+ ->order("sort asc, id desc")
+ ->limit('0, 5')
+ ->select();
+ $this->assign("rules", $rules);
+ $this->assign("rules_count", count($rules));
+
+ $currentTime = strtotime(date('Y-m-d'));
+ $weekArray = [7,1,2,3,4,5,6];
+ $week = $weekArray[date("w")];
+ $match_rules = M("document_pop_rules")
+ ->field('id')
+ ->where("(type = 1 and pop_time = {$currentTime}) or (type = 2 and pop_time = {$week})")
+ ->order("sort asc, id desc")
+ ->select();
+ $this->assign("match_rules_id", $match_rules ? json_encode(array_column($match_rules, 'id')) : []);
$this->assign("user_count", $user_count);
$this->assign("total_money", $total_money);
@@ -238,6 +256,30 @@ class PromoteController extends BaseController
$this->display();
}
+ public function popRuleDetail($id=0, $p=1, $row=1, $force=false)
+ {
+ $result = M("document_pop_rules")->where("id in ({$id})")->page($p, $row)->select();
+ if (empty($result)) {
+ return $this->error("未找到数据", [], true);
+ }
+ $count = M("document_pop_rules")->where("id in ({$id})")->count();
+ if ($p + 1 <= $count) {
+ $this->assign("next_page",$p+1);
+ }
+ if ($p - 1 >= 0) {
+ $this->assign("preview_page",$p-1);
+ }
+ if ($p + 1 > $count) {
+ $this->assign("close_btn", true);
+ }
+ $this->assign("count", $count);
+ $this->assign("force", $force);
+ // return $this->success("获取数据成功", $result, true);
+ //$this->show("{$result['title']}
".$result['content']);
+ $this->assign("rule",$result[0]);
+ $this->display('pop_rule_detail');
+ }
+
private function caculateSpend($pay_time, $condition, $create = [], $type = 0)
{
$map['promote_id'] = array('egt', 0);
@@ -543,7 +585,12 @@ class PromoteController extends BaseController
}
$count = M("protect_log","tab_")->field($field)->count();
- }*/ else {
+ }*/
+ else if ($type == 57) {
+ $data_list = M('document_pop_rules')->order("sort asc, id desc")->page($p, $row)->select();
+ $count = count(M('document_pop_rules')->count());
+ }
+ else {
$data_list = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->limit('0,50')->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->page($page, $row)->select(); //游戏公告
$count = M("document", "sys_")->where("category_id=56 and status=1")->count();
}
@@ -563,7 +610,6 @@ class PromoteController extends BaseController
$gg_ReadDocument = M("document_read", "sys_")->where($gg_where)->count();
// var_dump($gg_ReadDocument);die();
-
$zx_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select();
$zx_Count = count($zx_data);
$zx_data = implode(',', array_column($zx_data, 'id'));
diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html
index 0c550f33c..2d9564276 100644
--- a/Application/Home/View/default/Promote/index.html
+++ b/Application/Home/View/default/Promote/index.html
@@ -72,6 +72,13 @@
+ 平台规则
+
+
+
+
查看更多>
@@ -123,6 +130,18 @@
+
+
+ 暂无平台规则
+
+
+
+ {$rule.title}
+ {$rule.operate_time|date="Y/m/d",###}
+
+
+
+
@@ -186,6 +205,47 @@
\ No newline at end of file
diff --git a/Application/Home/View/default/Promote/pop_rule_detail.html b/Application/Home/View/default/Promote/pop_rule_detail.html
new file mode 100644
index 000000000..ae07b7b33
--- /dev/null
+++ b/Application/Home/View/default/Promote/pop_rule_detail.html
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ 充值查询列表|----软件管理平台
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{$rule.title}
+
{$rule.content}
+
+
+
+
+ if(C('COLOR_STYLE')=='blue_color') echo '
+
+ ';
+
+
+
+
+
+
+
\ No newline at end of file