EvaluateDict.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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\goods;
  12. class EvaluateDict
  13. {
  14. const AUDIT_NO = 0;
  15. const AUDIT = 1;
  16. const AUDIT_ADOPT = 2;
  17. const AUDIT_REFUSE = 3;
  18. /**
  19. * 评价状态
  20. * @param $type
  21. * @return array|mixed|string
  22. */
  23. public static function getStatus($type = '')
  24. {
  25. $data = [
  26. self::AUDIT_NO => get_lang('dict_mall_goods_evalute.audit_no'), // 无需审核
  27. self::AUDIT => get_lang('dict_mall_goods_evalute.audit'),//待审核
  28. self::AUDIT_ADOPT => get_lang('dict_mall_goods_evalute.audit_adopt'),//审核通过
  29. self::AUDIT_REFUSE => get_lang('dict_mall_goods_evalute.audit_refuse'),//审核拒绝
  30. ];
  31. if (!$type) {
  32. return $data;
  33. }
  34. return $data[ $type ] ?? '';
  35. }
  36. }