修复检索问题

master
yulingwei 5 years ago
parent e3f0a24e43
commit ed9ddd2d67

@ -863,7 +863,7 @@ class ArticleController extends AdminController {
} }
} }
public function pop_rules($row = 10, $type = '', $tag = '', $p = 1) public function pop_rules($row = 10, $p = 1)
{ {
$map = []; $map = [];
$map['_string'] = " 1=1 "; $map['_string'] = " 1=1 ";
@ -873,8 +873,8 @@ class ArticleController extends AdminController {
if (isset($_GET['time-end'])) { if (isset($_GET['time-end'])) {
$map['_string'] .= " and operate_time < " . (strtotime($_GET['time-end']) + 86400); $map['_string'] .= " and operate_time < " . (strtotime($_GET['time-end']) + 86400);
} }
if (isset($type)) { if (isset($_GET['type'])) {
$map['type'] = $type; $map['type'] = $_GET['type'];
} }
if (!empty($_GET['title'])) { if (!empty($_GET['title'])) {
$map['title'] = ['like', "%{$_GET['title']}%"]; $map['title'] = ['like', "%{$_GET['title']}%"];
@ -890,7 +890,7 @@ class ArticleController extends AdminController {
$item['time_desc'] = date("Y-m-d", $item['pop_time']); $item['time_desc'] = date("Y-m-d", $item['pop_time']);
break; break;
case '2': case '2':
$item['time_desc'] = "每周".$weekDes[$item['pop_time']]; $item['time_desc'] = "每周".$weekDes[$item['pop_time']-1];
break; break;
} }
} }

Loading…
Cancel
Save