ShippingTemplateDict.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace addon\mall\app\dict\delivery;
  12. class ShippingTemplateDict
  13. {
  14. const WEIGHT = 'weight';
  15. const NUM = 'num';
  16. const VOLUME = 'volume';
  17. /**
  18. * 获取运费模板计费类型
  19. * @param $type
  20. * @return array|mixed|string
  21. */
  22. public static function getFeeType($type = ''){
  23. $type_list = [
  24. self::NUM => get_lang('dict_mall_delivery.num'),
  25. self::WEIGHT => get_lang('dict_mall_delivery.weight'),
  26. self::VOLUME => get_lang('dict_mall_delivery.volume')
  27. ];
  28. if ($type == '') return $type_list;
  29. return $type_list[$type] ?? '';
  30. }
  31. }