12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的多应用管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace addon\mall\app\dict\goods;
- class GoodsStatusDict
- {
- // 销售中
- const ONLINE = 1;
- // 仓库中
- const OFFLINE = 0;
- //待审核
- const WAIT_AUDIT = -1;
- //未审核通过
- const AUDIT_REFUSE = -2;
- //强制下架
- const AUDI_TO_FINE = -3;
- /**
- * 商品状态
- * @param $type
- * @return array|mixed|string
- */
- public static function getType($type = '')
- {
- $list = [
- 'goods_status_' . self::ONLINE => [
- 'value' => self::ONLINE,
- 'label' => get_lang('dict_mall_goods_status.online'),
- ],
- 'goods_status_' . self::OFFLINE => [
- 'value' => self::OFFLINE,
- 'label' => get_lang('dict_mall_goods_status.offline'),
- ],
- 'goods_status_' . self::WAIT_AUDIT => [
- 'value' => self::WAIT_AUDIT,
- 'label' => get_lang('dict_mall_goods_status.wait_audit'),
- ],
- 'goods_status_' . self::AUDIT_REFUSE => [
- 'value' => self::AUDIT_REFUSE,
- 'label' => get_lang('dict_mall_goods_status.audit_refuse'),
- ],
- 'goods_status_' . self::AUDI_TO_FINE => [
- 'value' => self::AUDI_TO_FINE,
- 'label' => get_lang('dict_mall_goods_status.audi_to_fine'),
- ],
- ];
- if ($type == '') return $list;
- return $list[ $type ];
- }
- }
|