Ver código fonte

feat: NG-15: 新会员注册时增加国家与语言选项.

zhangl 1 ano atrás
pai
commit
942e70f261

+ 8 - 7
frontendApi/modules/v1/controllers/UserController.php

@@ -480,13 +480,6 @@ class UserController extends BaseController {
      * 报单管理
      */
     public function actionDec() {
-        // 默认国家
-        $countryId = \Yii::$app->request->get('countryId');
-        if (!$countryId) {
-            return static::notice(Yii::t('app', 'countryDoesNotSelect'), 400);
-        }
-        // 生成随机码 , 初始化redis
-        $userName = Info::generateWebName($countryId);
         $redis = \Yii::$app->redis;
         $post = \Yii::$app->request->post();
         if (\Yii::$app->request->isPost) {
@@ -550,6 +543,14 @@ class UserController extends BaseController {
             }
         }
 
+        // 默认国家
+        $countryId = \Yii::$app->request->get('countryId');
+        if (!$countryId) {
+            return static::notice(Yii::t('app', 'countryDoesNotSelect'), 400);
+        }
+        // 生成随机码 , 初始化redis
+        $userName = Info::generateWebName($countryId);
+
         //所有报单套餐
         $allDecPackage = DeclarationPackage::getAllData();
         $decLevels = Cache::getDecLevelConfig();