dever 6 年之前
父節點
當前提交
ac61f4841d
共有 1 個文件被更改,包括 14 次插入1 次删除
  1. 14 1
      main/src/Journal.php

+ 14 - 1
main/src/Journal.php

@@ -397,6 +397,19 @@ class Journal extends Core
         }
         }
 
 
         $applet_type = Dever::input('applet_type');
         $applet_type = Dever::input('applet_type');
+
+        $this->data['info']['vip_state'] = 2;
+        $version_code = Dever::input('version_code');
+        if ($version_code) {
+            $source_type = Dever::input('source_type');
+            $version_where['source_type'] = $source_type;
+            $version_where['name'] = $version_code;
+            $version = Dever::db('main/version')->getOne($version_where);
+            if ($version && $version['vip'] > 0) {
+               $this->data['info']['vip_state'] = $version['vip'];
+            }
+        }
+
         if ($applet_type == 2 && isset($this->data['config']['ios_pay']) && $this->data['config']['ios_pay'] == 1 && $info['buy'] == 1) {
         if ($applet_type == 2 && isset($this->data['config']['ios_pay']) && $this->data['config']['ios_pay'] == 1 && $info['buy'] == 1) {
             # 关闭支付
             # 关闭支付
             if ($subscribe == 1) {
             if ($subscribe == 1) {
@@ -407,7 +420,7 @@ class Journal extends Core
             }
             }
             
             
             $this->setButton('buy', -1);
             $this->setButton('buy', -1);
-            $this->setButton('code', -1);
+            $this->setButton('code', 1);
             //$this->setButton('share', -1);
             //$this->setButton('share', -1);
         }
         }