shish 3 yıl önce
ebeveyn
işleme
f9cbf8bd0c

+ 0 - 3
app-hd/controllers/ConsoleController.php

@@ -111,9 +111,6 @@ class ConsoleController extends BaseController
     public function actionInit()
     {
         $dict = dict::get();
-        if (getenv('YII_ENV') != 'production') {
-            $dict['hdMiniMessage'] = $dict['hdMiniMessageDev'];
-        }
 
         $shop = isset($this->shop) && !empty($this->shop) ? $this->shop->attributes : [];
 

+ 21 - 2
common/components/dict.php

@@ -19,6 +19,16 @@ class dict
             ['num' => 80, 'amount' => 65],
             ['num' => 100, 'amount' => 80],
         ],
+        'kmPackCostDev' => [
+            ['num' => 10, 'amount' => 0.15],
+            ['num' => 25, 'amount' => 0.25],
+            ['num' => 30, 'amount' => 0.3],
+            ['num' => 40, 'amount' => 0.35],
+            ['num' => 50, 'amount' => 0.40],
+            ['num' => 60, 'amount' => 0.45],
+            ['num' => 80, 'amount' => 0.65],
+            ['num' => 100, 'amount' => 0.8],
+        ],
         'transType' => [
             //德邦
             'db' => 0,
@@ -36,6 +46,12 @@ class dict
             ['sign' => 2, 'option' => [['num' => 40, 'amount' => 50], ['num' => 60, 'amount' => 100], ['num' => 100, 'amount' => 200]]],
             ['sign' => 3, 'perKiloCost' => 4],
         ],
+        'transCostDev' => [
+            ['sign' => 0, 'perKiloCost' => 0.05],
+            ['sign' => 1, 'perKiloCost' => 0.09],
+            ['sign' => 2, 'option' => [['num' => 40, 'amount' => 0.05], ['num' => 60, 'amount' => 0.1], ['num' => 100, 'amount' => 0.2]]],
+            ['sign' => 3, 'perKiloCost' => 0.04],
+        ],
         //默认开启订阅消息
         'subscribeMessage' => 1,
         'hdMiniMessage' => [
@@ -438,7 +454,6 @@ class dict
     public static function get()
     {
         $respond = self::$data;
-
         //根据环境获取小程序原始ID
         if (isset($respond['miniOriginalId']['dev'])) {
             $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['dev'];
@@ -448,7 +463,11 @@ class dict
                 $respond['miniOriginalId']['current'] = $respond['miniOriginalId']['product'];
             }
         }
-
+        if (getenv('YII_ENV') != 'production') {
+            $respond['kmPackCost'] = $respond['kmPackCostDev'];
+            $respond['transCost'] = $respond['transCostDev'];
+            $respond['hdMiniMessage'] = $respond['hdMiniMessageDev'];
+        }
         return $respond;
     }