| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace common\enums;
- /**
- *
- * 设置枚举
- * Class SettingEnum
- * @package common\enums
- */
- class SettingEnum
- {
- const MALL_BASIC = 'mall_basic';
- const MALL_ASSETS = 'mall_assets';
- const MALL_ORDER = 'mall_order';
- const MALL_USER = 'mall_user';
- const PAY = 'pay';
- const MALL_CART = 'mall_cart'; //购物车
- const MALL_STORAGE = 'mall_storage';
- const MALL_CAT = 'mall_cat';//发薪猫
- /**
- * 根据类型获取商城设置的配置
- * @Author: lun
- * @DateTime: 2021/10/15 0015 18:14
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @param string $type
- * @return array|string[]|\string[][]
- */
- public static function getMallType($type = ''): array
- {
- $data = [
- self::MALL_BASIC => ['basic', 'logistics', 'service', 'copyright', 'follow', 'user', 'pay', 'notice_wechat', 'notice_sms', 'notice_alipay','goods','order_pay','order_comment','printer','sensitive','area','upgrade','goodsdetail'],
- self::MALL_ASSETS => ['withdraw_balance','withdraw_income','recharge','score','balance','digital', 'other'],
- self::MALL_ORDER => ['order', 'return_address', 'freight', 'marketing'],
- self::MALL_USER => ['user', 'user_agree','user_custom_text','user_operate','user_reward','user_reward_redpacket'],
- self::MALL_STORAGE => ['storage', 'storage_driver', 'limit'],
- self::MALL_CART => ['cart'],
- self::MALL_CAT => ['cat']
- ];
- return $type ? $data[$type] : $data;
- }
- /**
- * 获取平台配置
- * @Author: lun
- * @DateTime: 2022/2/24 0024 18:49
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @param string $type
- * @return string[]|\string[][]
- */
- public static function getPlatformType($type = '')
- {
- $data = [
- self::PAY => ['wechat', 'alipay','addons'],
- ];
- return $type ? $data[$type] : $data;
- }
- }
|