dever 6 years ago
parent
commit
ffc59648d0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      main/src/User.php

+ 6 - 1
main/src/User.php

@@ -31,8 +31,13 @@ class User extends Core
             } else {
                 $this->data['user']['vip_end'] = '';
             }
+
+            $vip_config = Dever::db('vip/config')->one($this->data['system']);
             # 是否展示会员支付,1展示,2不展示
-            $this->data['user']['vip_state'] = 1;
+            $this->data['user']['vip_state'] = 2;
+            if ($vip_config && isset($vip_config['button'])) {
+                $this->data['user']['vip_state'] = $vip_config['button'];
+            }
 
             $score = Dever::db('score/user')->all(array('uid' => $this->data['uid']));
             $score_num = 0;