get_lang('dict_shop_manjian_condition_type.over_n_yuan'), self::OVER_N_PIECE => get_lang('dict_shop_manjian_condition_type.over_n_piece'), ]; if ($type == '') return $list; return $list[ $type ] ?? ''; } /** * 参与类型 * @param $type * @return array|mixed|string */ public static function getGoodsType($type = '') { $list = [ self::ALL_GOODS => get_lang('dict_shop_manjian_goods_type.all_goods'), self::SELECTED_GOODS => get_lang('dict_shop_manjian_goods_type.selected_goods'), self::SELECTED_GOODS_NOT => get_lang('dict_shop_manjian_goods_type.selected_goods_not'), ]; if ($type == '') return $list; return $list[ $type ] ?? ''; } /** * 参与会员类型 * @param $type * @return array|mixed|string */ public static function getJoinMemberType($type = '') { $list = [ self::ALL_MEMBER => get_lang('dict_shop_manjian_join_member_type.all_member'), self::SELECTED_MEMBER_LEVEL => get_lang('dict_shop_manjian_join_member_type.selected_member_level'), self::SELECTED_MEMBER_LABEL => get_lang('dict_shop_manjian_join_member_type.selected_member_label'), ]; if ($type == '') return $list; return $list[ $type ] ?? ''; } /** * 优惠规格 * @param $type * @return array|mixed|string */ public static function getRuleType($type = '') { $list = [ self::LADDER => get_lang('dict_shop_manjian_rule_type.ladder'), self::CYCLE => get_lang('dict_shop_manjian_rule_type.cycle'), ]; if ($type == '') return $list; return $list[ $type ] ?? ''; } /** * 状态 * @param $type * @return array|mixed|string */ public static function getStatus($type = '') { $data = [ self::NOT_ACTIVE => get_lang('dict_shop_manjian_status.not_active'), // 未开始 self::ACTIVE => get_lang('dict_shop_manjian_status.active'), // 进行中 self::END => get_lang('dict_shop_manjian_status.end'), // 已结束 self::CLOSE => get_lang('dict_shop_manjian_status.close'), // 已关闭 ]; if (!$type) { return $data; } return $data[ $type ] ?? ''; } }