dever 6 years ago
parent
commit
891d7296b8
1 changed files with 11 additions and 0 deletions
  1. 11 0
      main/lib/Core.php

+ 11 - 0
main/lib/Core.php

@@ -30,6 +30,17 @@ class Core
         if ($source_type == 'ios' || $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['name'] = $version_code;
+            $version = Dever::db('main/version')->getOne($version_where);
+            if ($version && $version['vip'] > 0) {
+               $this->data['ios_state'] = $version['vip'];
+            }
+        }
     }
 
     # 图片处理