ThemePageEnum.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop100%开源免费商用商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | 商业版本务必购买商业授权,以免引起法律纠纷
  8. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  9. // | gitee下载:https://gitee.com/likeshop_gitee
  10. // | github下载:https://github.com/likeshop-github
  11. // | 访问官网:https://www.likeshop.cn
  12. // | 访问社区:https://home.likeshop.cn
  13. // | 访问手册:http://doc.likeshop.cn
  14. // | 微信公众号:likeshop技术社区
  15. // | likeshop团队 版权所有 拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshopTeam
  18. // +----------------------------------------------------------------------
  19. namespace app\common\enum;
  20. /**
  21. * 主题页面枚举
  22. * Class ThemePageEnum
  23. * @package app\common\enum
  24. */
  25. class ThemePageEnum
  26. {
  27. const TYPE_HOME = 1;
  28. const TYPE_GOODS_CATEGORY = 2;
  29. const TYPE_MEMBER_CENTRE = 3;
  30. const TYPE_CART = 4;
  31. const TYPE_GOODS_DETAIL = 5;
  32. //组件
  33. const GOODS = 'goodsgroup'; //商品组件
  34. const COUPON = 'coupon'; //优惠券组件
  35. const USERSERVE = 'userserve'; //我的服务
  36. const TABS = 'tabs'; //选项卡
  37. const NOTICE = 'notice'; //公告
  38. const GOODSRECOM = 'goodsrecom'; //商品推荐
  39. const NAVIGATION = 'navigation'; //导航组件
  40. const SPELLGROUP = 'spellgroup'; //拼团组件
  41. const SECKILL = 'seckill'; //秒杀组件
  42. const MNPLIVE = 'mnplive'; //小程序直播组件
  43. const PRESELL = 'presell'; //预售组件
  44. //需要替换数据的组件
  45. const MODULE = [
  46. self::GOODS,self::COUPON,self::USERSERVE,self::TABS, self::NOTICE,
  47. self::GOODSRECOM,self::SPELLGROUP,self::SECKILL,self::MNPLIVE, self::PRESELL,
  48. ];
  49. /**
  50. * @notes 获取类型
  51. * @param bool $from
  52. * @return array|mixed|string
  53. * @author cjhao
  54. * @date 2021/8/6 16:27
  55. */
  56. public static function getTypeDesc($from = true)
  57. {
  58. $desc = [
  59. self::TYPE_HOME => '首页',
  60. self::TYPE_GOODS_CATEGORY => '商品分类',
  61. self::TYPE_MEMBER_CENTRE => '个人中心',
  62. self::TYPE_CART => '购物车',
  63. self::TYPE_GOODS_DETAIL => '商品详情',
  64. ];
  65. if(true === $from){
  66. return $desc;
  67. }
  68. return $desc[$from] ?? '';
  69. }
  70. }