dever 6 éve
szülő
commit
ffc59648d0
1 módosított fájl, 6 hozzáadás és 1 törlés
  1. 6 1
      main/src/User.php

+ 6 - 1
main/src/User.php

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