dever 6 years ago
parent
commit
76c85265ab
4 changed files with 15 additions and 6 deletions
  1. 2 0
      act/database/subscribe.php
  2. 3 3
      main/lib/Core.php
  3. 1 0
      main/src/Journal.php
  4. 9 3
      main/src/View.php

+ 2 - 0
act/database/subscribe.php

@@ -145,6 +145,7 @@ return array
 				'type' => 'yes',
 				'avatar' => array('yes-t_2.avatar', '!='),
 				'state' => 1,
+				'status' => 'yes-t_2.status',
 			),
 			# 联表
 			'join' => array
@@ -174,6 +175,7 @@ return array
 				'source' => array('yes', 'in'),
 				'cate_id' => 'yes-t_2.cate_id',
 				'state' => 1,
+				'status' => 'yes-t_2.status',
 			),
 			# 联表
 			'join' => array

+ 3 - 3
main/lib/Core.php

@@ -25,16 +25,16 @@ class Core
         $this->data['config'] = Dever::db('main/config')->one();
         $this->data['system'] = Dever::input('system', 1);
 
-        $source_type = Dever::input('source_type');
+        $this->source_type = Dever::input('source_type');
         $this->app = false;
-        if ($source_type == 'ios' || $source_type == 'android') {
+        if ($this->source_type == 'ios' || $this->source_type == 'android') {
             $this->app = true;
         }
 
         $this->data['ios_state'] = 2;
         $version_code = Dever::input('version_code');
         if ($version_code && $this->app) {
-            $version_where['source_type'] = $source_type;
+            $version_where['source_type'] = $this->source_type;
             $version_where['name'] = $version_code;
             $version = Dever::db('main/version')->getOne($version_where);
             if ($version && $version['vip'] > 0) {

+ 1 - 0
main/src/Journal.php

@@ -141,6 +141,7 @@ class Journal extends Core
         //$data = Dever::cache($key);
         $data = array();
         if (!$data) {
+            $where['status'] = 2;
             $data = Dever::db('act/subscribe')->getMyAll($where);
             if ($data) {
                 //Dever::cache($key, $data, 900);

+ 9 - 3
main/src/View.php

@@ -69,14 +69,20 @@ class View extends Core
         if ($this->data['info']['pdate'] > 0) {
             $this->data['info']['pdate_time'] = date('Y-m-d H:i:s', $this->data['info']['pdate']);
         }
-
+        /*
         if (isset($this->data['info']['share_content'])) {
             $source = Dever::db('source/info')->one(1);
             $this->data['info']['share_link'] = $source['code'];
         }
+        */
 
-        $link = Dever::url('view.get?type=' . $type . '&id=' . $id, 'h5');
-        $this->data['info']['share_link'] = $link;
+        if ($this->source_type == 'ios') {
+            $source = Dever::db('source/info')->one(1);
+            $this->data['info']['share_link'] = $source['code'];
+        } else {
+            $link = Dever::url('view.get?type=' . $type . '&id=' . $id, 'h5');
+            $this->data['info']['share_link'] = $link;
+        }
 
         if ($this->data['info']['num_view'] > 100000) {
             //$this->data['info']['num_view'] = '10w+';