Kirin 3 лет назад
Родитель
Сommit
721306b88a
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      app/models/mining/MiningMachine.php

+ 5 - 1
app/models/mining/MiningMachine.php

@@ -118,7 +118,11 @@ class MiningMachine extends BaseModel
                 return BaseModel::setErrorInfo('支付失败', true);
                 return BaseModel::setErrorInfo('支付失败', true);
             }
             }
             BaseModel::commitTrans();
             BaseModel::commitTrans();
-            UserLevel::setLevelComplete($uid);
+            $uper = User::getUserInfo($uid);
+            while ($uper) {
+                UserLevel::setLevelComplete($uper['uid']);
+                $uper = User::getUserInfo($uper['spread_uid']);
+            }
             return true;
             return true;
         } catch (Exception $e) {
         } catch (Exception $e) {
             return BaseModel::setErrorInfo($e->getMessage(), true);
             return BaseModel::setErrorInfo($e->getMessage(), true);