Prechádzať zdrojové kódy

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

kevin 1 rok pred
rodič
commit
2a729fe00f

+ 1 - 6
common/models/FreeTemplate.php

@@ -38,18 +38,13 @@ class FreeTemplate extends \common\components\ActiveRecord
         ];
         ];
     }
     }
 
 
-    public function behaviors()
-    {
-
-    }
-
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */
     public function attributeLabels()
     public function attributeLabels()
     {
     {
         return [
         return [
-            'id' => 'id',
+            'id' => 'ID',
             'country_id' => '国家ID',
             'country_id' => '国家ID',
             'freight' => '运费',
             'freight' => '运费',
             'free_shipping' => '免运费阈值',
             'free_shipping' => '免运费阈值',

+ 2 - 0
common/models/forms/FreeTemplateForm.php

@@ -3,6 +3,7 @@ namespace common\models\forms;
 
 
 use common\components\Model;
 use common\components\Model;
 use common\helpers\Form;
 use common\helpers\Form;
+use common\helpers\snowflake\PageSnowFake;
 use common\models\Countries;
 use common\models\Countries;
 use common\models\FreeTemplate;
 use common\models\FreeTemplate;
 use Yii;
 use Yii;
@@ -77,6 +78,7 @@ class FreeTemplateForm extends Model
             $this->modelClass::deleteOne($this->countryId);
             $this->modelClass::deleteOne($this->countryId);
             // 添加/修改数据
             // 添加/修改数据
             $model = new FreeTemplate();
             $model = new FreeTemplate();
+            $model->id = PageSnowFake::instance()->generateId();
             $model->country_id = $this->countryId;
             $model->country_id = $this->countryId;
             $model->freight = $this->freight;
             $model->freight = $this->freight;
             $model->free_shipping = $this->freeShipping;
             $model->free_shipping = $this->freeShipping;