| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <?php
- namespace common\enums;
- /**
- *
- * 装修枚举
- *
- * Class DiyEnum
- * @package common\enums
- */
- class DiyEnum
- {
- const HOME_PAGE = 'home_page';
- const GOODS_DETAIL = 'goods_detail';
- const USER_CENTER = 'user_center';
- const CUSTOM_PAGE = 'custom_page';
- const GOODS_TEMPLATE = 'goods_template';
- const HOME_PAGE_PATH = '/pages/index/index';
- const GOODS_DETAIL_PATH = '/plugins/pages/goods/detail';
- const GOODS_CATE_PATH = '/plugins/pages/goods/list';// 商品搜索
- const GOODS_MENU_PATH = '/pages/menu/index';// 商品分类
- const USER_CENTER_PATH = '/pages/user/index';
- const CUSTOM_PAGE_PATH = '/plugins/pages/diy_page/detail';
- const GROUP_BUY_GOODS_DETAIL = '/plugins/group_buy/groupDetail';// 拼团分享使用
- const GROUP_BUY_GOODS_INFO = '/plugins/group_buy/goodsDetail';// 拼团商品详情
- const GROUP_BUY_GOODS_LIST = '/plugins/group_buy/list';
- const GROUP_BUY_GOODS_COPY_LIST = '/plugins2/GroupBuyCopy/list';
- const SCORE_MALL_GOODS_LIST = '/plugins/score_mall/cateList';
- const FUN_MALL_GOODS_LIST = '/plugins4/FunMall/cateList';
- const BARGAIN_SHARE = '/plugins/bargain/bargain';
- const BARGAIN_GOODS_DETAIL = '/plugins/bargain/goodsDetail';
- const BARGAIN_GOODS_LIST = '/plugins/bargain/list';
- const COURSE_PATH = '/plugins/course/details';
- const OPERATING_NOTE_CONTENT_LIST = '/plugins/operating_note/detail';
- const LUCKY_GROUP_GOODS_DETAIL = '/plugins/LuckyGroup/productDetail';
- const LUCKY_GROUP_GOODS_LIST = '/plugins/LuckyGroup/cateList';
- const O2O_STORE_DETAIL = '/plugins2/Store/store/index';
- const O2O_STORE_CATE = '/plugins2/Store/store/salesroomclassify';
- const O2O_MCH_DETAIL = '/plugins/Mch/store/index';
- const O2O_MCH_CATE = '/plugins/Mch/store/salesroomclassify';
- const O2O_STORE_GOODS = '/plugins2/Store/store/storeDetail';
- const O2O_MCH_GOODS = '/plugins/Mch/store/index';
- const O2O_GOODS_DETAIL_PATH = '/plugins2/Store/store/storeDetail';
- const SECKILL_GOODS_INFO = '/plugins/pages/goods/detail';
- const SECONDARY_CARD_LIST = '/customAddons/SecondaryCard/myCardList';
- const PRODUCT_GIFT_GOODS_DETAIL = '/plugins/pages/goods/detail';
- const DEPOSIT_PRESALE_GOODS_DETAIL = '/plugins/deposit_presale/groupDetail';
- // const DEPOSIT_PRESALE_GOODS_LIST = '/plugins/deposit_presale/list';
- const DEPOSIT_PRESALE_CATEGORY_GOODS_LIST = 'plugins/earnest/list';
- const SMART_FORM_PAGE = '/plugins/SmartForm/SmartForm'; # 自定义表单
- const ALIPAY_MCH_COUPON_PAGE = '/plugins2/merchantVoucher/activeCoupon'; # 支付宝商家券
- // 底部导航默认数据
- const DEFULT_BUTTOM_NAV = '[{"selectedIconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590503_gCYTr0cg.png","iconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590503_gLpL5nCX.png","text":"首页","url":"\/pages\/index\/index","open_type":"page","params":{"title":"QMALL","route":"\/pages\/index\/index","open_type":"page","navigate":"navigateTo"}},{"selectedIconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590386_pCEjG1TB.png","text":"分类","iconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590382_COLL9mew.png","url":"\/pages\/menu\/index","open_type":"page","params":{"id":"2","name":"","title":"全部分类","cat_id":"4","open_type":"page","route":"\/pages\/menu\/index","remark":""}},{"selectedIconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590508_DXUc05dJ.png","text":"购物车","iconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590508_NKBUkndD.png","url":"\/pages\/cart\/index","open_type":"page","params":{"id":"4","name":"","title":"购物车","cat_id":"4","open_type":"page","route":"\/pages\/cart\/index","remark":""}},{"selectedIconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590515_p2Mq97rw.png","text":"我的","iconPath":"https:\/\/shuzixiangdao.oss-cn-guangzhou.aliyuncs.com\/images\/2021\/12\/04\/image_1638590515_bVB7u7gb.png","url":"\/pages\/user\/index","open_type":"page","params":{"id":"3","title":"我的","template":"user_center","created_at":"1619431341","route":"\/pages\/user\/index","open_type":"page"}}]';
- //登录页面
- const USER_LOGIN = '/pages/public/login'; # 登录页面
- const APP_DOWNLOAD_GUIDE = '/pages/public/registered'; # app下载引导页
- const STORE_GUARDIAN_TEMPLATE = '/pages/AntTechnology/storeIndex/index'; // 门店管家页面
- const GROUP_BUY_COPY_GOODS_DETAIL = '/plugins2/GroupBuyCopy/groupDetail';// 拼团新分享使用
- const GROUP_BUY_COPY_GOODS_INFO = '/plugins2/GroupBuyCopy/goodsDetail';// 拼团商品详情
- const GROUP_BUY_COPY_GOODS_LIST = '/plugins2/GroupBuyCopy/list';
- const LAO_DA_FU_GOODS_DETAIL_PATH = '/plugins2/LaoDaFu/store/storeDetail';
- const SCORE_GAME_SHOP_TYPE = '/customAddons/ScoreGame/physicalStore/storeList'; //积分增长赢-实体店分类
- const SCORE_GAME_MENBER_TYPE = '/customAddons/PhysicalTherapist/index';//积分增长赢-理疗师分类
- const SCORE_GAME_CONSUMER_CARD = '/customAddons/ScoreGame/consumerCardRecharge';//积分增长赢-消费卡充值
- const SCORE_GAME_SECONDARY_CARD = '/customAddons/ScoreSecondaryCard/cardList';//积分增长赢-次卡
- const O2O_STEWARD_STORE_CATE_SEARCH = '/customDesigns/AntTechnology/search/index';
- /**
- * 模板
- * @return array
- */
- public static function template(): array
- {
- return [
- self::HOME_PAGE => '系统首页',
- self::GOODS_DETAIL => '商品详情',
- self::USER_CENTER => '用户中心',
- self::CUSTOM_PAGE => '自定义页面',
- ];
- }
- /**
- * 页面对应路由
- * @Author: lun
- * @DateTime: 2021/11/4 0004 16:09
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @return array|string[]
- */
- public static function templateRoute($template = '')
- {
- $data = [
- self::HOME_PAGE => self::HOME_PAGE_PATH,
- self::GOODS_DETAIL => self::GOODS_DETAIL_PATH,
- self::USER_CENTER => self::USER_CENTER_PATH,
- self::CUSTOM_PAGE => self::CUSTOM_PAGE_PATH,
- self::GOODS_TEMPLATE => self::GOODS_DETAIL_PATH,
- ];
- return $template ? $data[$template] : $data;
- }
- /**
- * 根据模板获取对应的组件分组
- * @Author: lun
- * @DateTime: 2021/9/27 0027 17:32
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @param string $template
- * @return string[]|\string[][]
- */
- public static function getGroup($template = 'custom_page')
- {
- $groupArr = [
- 'home_page' => ['img_text', 'base_goods', 'marketing', 'store', 'other'],
- 'goods_detail' => ['goods', 'img_text', 'base_goods'],
- 'user_center' => ['member', 'img_text'],
- 'custom_page' => ['img_text', 'base_goods', 'marketing', 'store', 'other'],
- 'goods_template' => ['goods', 'img_text', 'goods_template'],
- ];
- return $template ? $groupArr[$template] : $groupArr;
- }
- /** 组件分类 **/
- public static function groupName(): array
- {
- return [
- /** 特殊组件开始 **/
- 'member' => '会员组件',
- 'goods' => '商品组件',
- /** 特殊组件结束 **/
- /** 基础组件开始 **/
- 'img_text' => '图文类',
- 'base_goods' => '商品类',
- 'marketing' => '营销类',
- 'store' => '门店组件',
- 'other' => '其他组件',
- 'goods_template' => '商品类',
- /** 基础组件结束 **/
- ];
- }
- /**
- * 模板分类
- * @Author: lun
- * @DateTime: 2021/12/13 0013 18:42
- * @Copyright: copyright (c) 2021 广东七件事集团
- * @param null $cate_id
- * @return string|string[]
- */
- public static function getTemplateCate($cate_id = null)
- {
- $data = [
- 1 => '其他',
- 2 => '美妆',
- 3 => '母婴用品',
- 4 => '珠宝',
- 5 => '日用百货',
- 6 => '服饰箱包',
- 7 => '家具',
- 8 => '节日',
- 9 => '食品/水果/生鲜',
- 10 => '家电',
- 11 => '百货市场',
- 12 => '线上教育',
- 13 => '门店',
- ];
- return $cate_id ? $data[$cate_id] : $data;
- }
- }
|