|
@@ -40,25 +40,18 @@ class Journal_v1 extends Core
|
|
|
$where['cate_id'] = $cate['id'];
|
|
|
}
|
|
|
$where['publish'] = 1;
|
|
|
+ $this->data['button'] = array();
|
|
|
|
|
|
- $this->data['push'] = array();
|
|
|
- if (isset($cate['journal_id'])) {
|
|
|
- $push_where['id'] = $cate['journal_id'];
|
|
|
- $push_where['publish'] = $where['publish'];
|
|
|
- $this->data['push'] = Dever::db('journal/info')->getOne($push_where);
|
|
|
- }
|
|
|
+
|
|
|
+ $this->data['push'] = Dever::db('journal/info')->getHot($where);
|
|
|
|
|
|
- if (!$this->data['push']) {
|
|
|
-
|
|
|
- $new_where['publish'] = $where['publish'];
|
|
|
- $this->data['push'] = Dever::db('journal/info')->getNew($new_where);
|
|
|
+ if ($this->data['push']) {
|
|
|
+ foreach ($this->data['push'] as $k => $v) {
|
|
|
+ $this->data['push'][$k] = $this->info($v);
|
|
|
+ $this->data['push'][$k] = $this->getButton($this->data['push'][$k]);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- $this->data['push'] = $this->info($this->data['push']);
|
|
|
- $this->data['button'] = array();
|
|
|
- $this->data['push'] = $this->getButton($this->data['push']);
|
|
|
-
|
|
|
-
|
|
|
$data = Dever::db('journal/info')->getAllByPage($where);
|
|
|
|
|
|
if ($data) {
|
|
@@ -134,13 +127,23 @@ class Journal_v1 extends Core
|
|
|
$where['publish'] = 2;
|
|
|
|
|
|
|
|
|
- $this->data['push'] = Dever::db('journal/info')->getNew($where);
|
|
|
+
|
|
|
|
|
|
- $this->data['push'] = $this->ding($this->data['push']);
|
|
|
+
|
|
|
|
|
|
$this->data['button'] = array();
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ $this->data['push'] = Dever::db('journal/info')->getHot($where);
|
|
|
+
|
|
|
+ if ($this->data['push']) {
|
|
|
+ foreach ($this->data['push'] as $k => $v) {
|
|
|
+ $this->data['push'][$k] = $this->info($v);
|
|
|
+ $this->data['push'][$k] = $this->getButton($this->data['push'][$k]);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$data = Dever::db('journal/info')->getAllByPage($where);
|