dever 6 years ago
parent
commit
ab644cbb47
5 changed files with 34 additions and 9 deletions
  1. 3 2
      act/lib/Invite.php
  2. 3 2
      act/lib/Subscribe.php
  3. 13 1
      config/base.php
  4. 4 3
      main/src/Journal.php
  5. 11 1
      main/src/View.php

+ 3 - 2
act/lib/Invite.php

@@ -10,7 +10,8 @@ class Invite
     public function getList($uid, $id, $type = 4, $num = false)
     {
         $key = 'invite_' . $uid . '_' . $type . '_' . $id;
-        $data = Dever::cache($key);
+        //$data = Dever::cache($key);
+        $data = array();
         if (!$data) {
         	$where['source_uid'] = $uid;
             $where['type'] = $type;
@@ -22,7 +23,7 @@ class Invite
             $data = Dever::db('act/invite')->getAll($where);
 
             if ($data) {
-                Dever::cache($key, $data, 900);
+                //Dever::cache($key, $data, 900);
             }
         }
 

+ 3 - 2
act/lib/Subscribe.php

@@ -37,7 +37,8 @@ class Subscribe
     public function getList($id, $type = 4)
     {
         $key = 'subscribe_' . $type . '_' . $id;
-        $data = Dever::cache($key);
+        //$data = Dever::cache($key);
+        $data = array();
         if (!$data) {
             $where['type'] = $type;
             $where['data_id'] = $id;
@@ -45,7 +46,7 @@ class Subscribe
             $data = Dever::db('act/subscribe')->getAll($where);
 
             if ($data) {
-                Dever::cache($key, $data, 900);
+                //Dever::cache($key, $data, 900);
             }
         }
         

+ 13 - 1
config/base.php

@@ -3,9 +3,21 @@ $config['base'] = array
 (
 	'name' => '精美时尚',
 	'version' => '1.0.0 Beta',
+
+	# 路由结束时要执行的方法
+	'route' => array
+	(
+		'end' => array
+		(
+			'main/view.article' => 'main/lib/view.end',
+			'main/view.vod' => 'main/lib/view.end',
+			'main/view.live' => 'main/lib/view.end',
+			'main/view.feature' => 'main/lib/view.end',
+		),
+	),
   
   
-  'replace' => array('https://pili-live-hls.jstyle.cn/' =>'http://pili-live-hls.jstyle.cn/'),
+	'replace' => array('https://pili-live-hls.jstyle.cn/' =>'http://pili-live-hls.jstyle.cn/'),
 
 	# 后台头部菜单
 	'top' => 'passport/system_id',

+ 4 - 3
main/src/Journal.php

@@ -105,7 +105,7 @@ class Journal extends Core
             $this->data['journal'] = array();
         }
 
-        Dever::cache($key, $this->data, 900);
+        //Dever::cache($key, $this->data, 900);
 
         return $this->data;
     }
@@ -138,11 +138,12 @@ class Journal extends Core
         $where['cate_id'] = $cate['id'];
 
         $key = 'my_subscribe_' . $where['uid'] . '_' . $cate['id'];
-        $data = Dever::cache($key);
+        //$data = Dever::cache($key);
+        $data = array();
         if (!$data) {
             $data = Dever::db('act/subscribe')->getMyAll($where);
             if ($data) {
-                Dever::cache($key, $data, 900);
+                //Dever::cache($key, $data, 900);
             }
         }
         

+ 11 - 1
main/src/View.php

@@ -127,17 +127,27 @@ class View extends Core
                 $this->data['user_act']['note'] = 2;
             }
 
+            /*
             if (isset($this->data['info']['status']) && $this->data['info']['status'] == 2) {
                 # 直播中
                 Dever::load('act/lib/watch')->submit($this->data['uid'], $id, $type);
             }
+            */
         }
         
-
+        /*
         if ($this->addView) {
             # 浏览量+1
             Dever::load($method)->addView($id);
         }
+        */
+
+        # 传给下一步操作的参数
+        $this->data['end']['type'] = $type;
+        $this->data['end']['id'] = $id;
+        $this->data['end']['method'] = $method;
+        $this->data['end']['addview'] = $this->addView;
+        $this->data['end']['status'] = isset($this->data['info']['status']) ? $this->data['info']['status'] : false;
 
         return $this->data;
     }