kevin_zhangl 3 лет назад
Родитель
Сommit
dbd1205e30

+ 5 - 0
common/helpers/user/Info.php

@@ -12,6 +12,7 @@ namespace common\helpers\user;
 use common\components\ActiveQuery;
 use common\components\ActiveRecord;
 use common\helpers\Cache;
+use common\helpers\LoggerTool;
 use common\helpers\Tool;
 use common\models\BaUser;
 use common\models\BaUserInfo;
@@ -24,6 +25,7 @@ use common\models\DecRole;
 use common\models\EmployLevel;
 use common\models\OpenBank;
 use common\models\Region;
+use common\models\StarCrownLevel;
 use common\models\User;
 use common\models\UserBonus;
 use common\models\UserInfo;
@@ -129,6 +131,7 @@ class Info {
         if (!$data['DEC_LV']) $data['DEC_LV'] = DeclarationLevel::getDefaultLevelId();
         if (!$data['LAST_DEC_LV']) $data['LAST_DEC_LV'] = DeclarationLevel::getDefaultLevelId();
         if (!$data['EMP_LV']) $data['EMP_LV'] = EmployLevel::getDefaultLevelId();
+        if (!$data['CROWN_LV']) $data['CROWN_LV'] = StarCrownLevel::getDefaultLevelId();
         return $data;
     }
 
@@ -205,6 +208,7 @@ class Info {
                     if (!$data['DEC_LV']) $data['DEC_LV'] = DeclarationLevel::getDefaultLevelId();
                     if (!$data['LAST_DEC_LV']) $data['LAST_DEC_LV'] = DeclarationLevel::getDefaultLevelId();
                     if (!$data['EMP_LV']) $data['EMP_LV'] = EmployLevel::getDefaultLevelId();
+                    if (!$data['CROWN_LV']) $data['CROWN_LV'] = StarCrownLevel::getDefaultLevelId();
                     if (!$data['HIGHEST_EMP_LV']) $data['HIGHEST_EMP_LV'] = EmployLevel::getDefaultLevelId();
                     return $data;
                 }else{
@@ -245,6 +249,7 @@ class Info {
         $baseInfo['LAST_DEC_LV_NAME'] = Cache::getDecLevelConfig()[$baseInfo['LAST_DEC_LV']]['LEVEL_NAME'];
         $baseInfo['EMP_LV_NAME'] = Cache::getEmpLevelConfig()[$baseInfo['EMP_LV']]['LEVEL_NAME'];
         $baseInfo['HIGHEST_EMP_LV_NAME'] = '';
+        $baseInfo['CROWN_LV_NAME'] = Cache::getStarCrownLevelConfig()[$baseInfo['CROWN_LV']]['LEVEL_NAME'];
         // 获取会员报单级别
         $baseInfo['DEC_ROLE_NAME'] = '无';
         //民族

+ 5 - 0
frontendApi/modules/v1/controllers/DashboardController.php

@@ -56,6 +56,9 @@ class DashboardController extends BaseController
             $empLvName = Cache::getEmpLevelConfig()[$baseInfo['SHOW_EMP_LV']]['LEVEL_NAME'];
         }
 
+        $crownLv = $baseInfo['CROWN_LV'];
+        $crownLvName = $baseInfo['CROWN_LV_NAME'];
+
         //会员级别
         $decLv = $baseInfo['DEC_LV'];
         $decLvName = $baseInfo['DEC_LV_NAME'];
@@ -119,6 +122,8 @@ class DashboardController extends BaseController
             'nowTime' => $nowTime,
             'empLv'=>$empLv,
             'empLvName'=>$empLvName,
+            'crownLv'=>$crownLv,
+            'crownLvName'=>$crownLvName,
             'decLv'=>$decLv,
             'decLvName'=>$decLvName,
             'slides'=>Ad::findUseSlaves()->select('ID,IMAGE,LID,TITLE,CONTENT,TYPE')->where('LID=:LID AND STATUS=1', [':LID'=>'7EFF6260A16C3CC7E053693418AC03E4'])->orderBy('SORT ASC')->asArray()->all(),

+ 1 - 1
frontendApi/modules/v1/controllers/SiteController.php

@@ -163,7 +163,7 @@ class SiteController extends BaseController
             'crownLevels' => $crownLevels,
             'menu' => $menu,
             'daysDiff' => $daysDiff,
-            'periodNum' => $periodNum . ' ,' . $wkrd . ' PC of ' . $monthArray[$curYM['CALC_MONTH']],
+            'periodNum' => $periodNum . ',' . $wkrd . ' PC of ' . $monthArray[$curYM['CALC_MONTH']],
             'shopWalletType' => $shopWalletType,
             'whetherBA' => false,
         ];