| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <?php
- namespace common\components;
- /**
- * 配置字典
- * @author
- */
- class configDict
- {
-
- public static $dict = [
- 'openId' => 1,//开放平台初始数据
- 'openAdminId' => 1,//开放平台初始管理员id
- 'merchantId' => 1,//公众平台的默认初始商户id
- 'categoryClassify' => ['goodsLink' => 0, 'articleLink' => 1],
- 'categoryClassifyName' => [0 => '商品', 1 => '文章'],//导航菜单的分类属性
- 'categoryClassifyUrl' => [//导航菜单分类属性对应的访问链接
- 0 => '/mobile/goods-list',
- 1 => '/article/article-list',
- ],
- 'merchant' => [
- 'authAccount' => [3]//0个人个体户 1未认证服务号 2未认证订阅号 3服务号 4订阅号
- ],
- 'merchantStatus' => ['checking' => 0, 'pass' => 1, 'noPass' => 2, 'freeze' => 3, 'unfreeze' => 4, 'shut' => 5],
- 'merchantStatusName' => [0 => '审核中', 1 => '审核通过', 2 => '审核未通过', 3 => '冻结', 4 => '解除冻结', 5 => '自主关闭'],
-
- 'riseType' => ['noRise' => 0, 'percent' => 1, 'amount' => 2,],//涨价方式
- 'riseTypeName' => [0 => '不涨价', 1 => '按百分比', 2 => '按金额'],
-
- 'accountStyle' => ['serviceAccount' => 0, 'subscribeAccount' => 1, 'unAuthServiceAccount' => 2],//公众号类型
- 'accountStyleName' => [0 => '服务号', 1 => '订阅号', 2 => '未认证服务号'],
-
- 'payStyleName' => [0 => '第三方支付', 1 => '非第三方支付'],
- 'payStyle' => ['weixinPay' => 0, 'alipay' => 0, 'thirdPay' => 0, 'balancePay' => 1, 'cashPay' => 1, 'selfPay' => 1],//公众号的微信支付、支付宝支付属于第三方支付,余额现金属于非第三方
- 'payWay' => ['weixinPay' => 0, 'alipay' => 1, 'balancePay' => 2],
- 'payWayName' => [0 => '微信', 1 => '支付宝', 2 => '余额'],
- 'payWayFullName' => [0 => '微信支付', 1 => '支付宝', 2 => '余额支付'],
- 'payStatusName' => [-1 => '客户关闭', 0 => '待付款', 1 => '已付款'],
- 'payStatus' => ['cancel' => -1, 'waitForPay' => 0, 'waitForSend' => 1],
-
- 'sendStatusName' => [0 => '待发货', 1 => '送货中', 2 => '已送达'],
- 'sendStatus' => ['waitForSend' => 0, 'sending' => 1, 'reached' => 2],
-
- 'replyType' => ['redirectUrl' => 0, 'text' => 1, 'news' => 2, 'multiNews' => 3],
- 'replyTypeName' => [0 => '跳转链接', 1 => '回复文字', 2 => '回复单图文', 3 => '回复多图文'],
-
- 'goodsStatusName' => [0 => '正常', 1 => '下架', 2 => '删除'],
- 'goodsStatus' => ['online' => 0, 'soldOut' => 1, 'del' => 2],
-
- 'goodsDelStatusName' => [0 => '正常,未删除', 1 => '删除'],
- 'goodsDelStatus' => ['normal' => 0, 'del' => 1],
-
- 'wxMenuOption' => ['redirectToCommonUseUrl' => 0, 'redirectToCustomUrl' => 1, 'showText' => 2, 'redirectToMiniProgram' => 3],
- 'wxMenuOptionName' => [
- 0 => ['name' => '跳转到-常用链接', 'key' => 0, 'replyType' => 0],//replyType 回复类型
- 1 => ['name' => '跳转到-自定义网址', 'key' => 1, 'replyType' => 0],
- 2 => ['name' => '跳转到-文字', 'key' => 2, 'replyType' => 1],
- 3 => ['name' => '跳转到-小程序', 'key' => 3, 'replyType' => 0],
- ],
-
- 'reachPeriodName' => [0 => '上午', 1 => '下午', 2 => '晚上'],
- 'reachPeriod' => ['am' => 0, 'pm' => 1, 'night' => 2],
-
- 'manageStyle' => ['retail' => 0, 'train' => 1, 'wholesale' => 2],//经营类型
- 'manageStyleName' => [0 => '零售', 1 => '花艺培训', 2 => '批发'],//经营类型
- 'commonUseUrl' => [//常用链接 manageStyle 0 零售 1 培训学校 2批发商
- 1 => ['name' => '商城首页', 'url' => '/mobile/index', 'key' => 1, 'manageStyle' => 0],
- 2 => ['name' => '我的订单', 'url' => '/center/order', 'key' => 2, 'manageStyle' => 0],
- 3 => ['name' => '会员中心', 'url' => '/center/index', 'key' => 3, 'manageStyle' => 0],
- 4 => ['name' => '我的会员卡', 'url' => '/center/qr-code', 'key' => 4, 'manageStyle' => 0],
- 5 => ['name' => '培训首页', 'url' => '/train/index', 'key' => 5, 'manageStyle' => 1],
- 6 => ['name' => '我的代金劵', 'url' => '/center/coupon', 'key' => 6, 'manageStyle' => 0],
- 7 => ['name' => '快速付款', 'url' => '/payment/quick-order', 'key' => 7, 'manageStyle' => 0],
- ],
- 'commonUseUrlMapped' => ['mall' => 1, 'myOrder' => 2, 'memberCenter' => 3, 'myMemberCard' => 4, 'trainIndex' => 5, 'myCoupon' => 6, 'quickOrder' => 7],
-
- //运费
- 'freight' => [
- 'firstDistance' => 5000,//5公里内
- 'firstPrice' => 0,//16元运费
- 'nextDistance' => 1000,//每增加1公里
- 'nextPrice' => 2,//增加2元
- ],
- "iWantToJoin" => "iWantToJoin",//我要入驻
-
- "io" => ['payout' => 0, 'income' => 1, 'other' => 2],
- "ioName" => [0 => '支出', 1 => '收入', 2 => '其它'],
-
- "inviteUseTo" => [//邀请码用处
- 'applyMerchant' => ['key' => 0, 'name' => 'xhApplyOrder'],//申请公众号
- 'openRenew' => ['key' => 1, 'name' => 'xhOpenRenewOrder'],//开通续费
- ],
-
- "capitalType" => [//流水类型,充值支付回调时的订单类型
- 'xhOrder' => ['id' => 0, 'name' => 'xhOrder'],
- 'xhActiveOrder' => ['id' => 2, 'name' => 'xhActiveOrder'],
- 'xhRecharge' => ['id' => 4, 'name' => 'xhRecharge'],
- 'xhUserUnite' => ['id' => 5, 'name' => 'xhUserUnite'],//支付宝关联微信帐号,积分累加订单
- 'xhDrawCash' => ['id' => 6, 'name' => 'xhDrawCash'],
- 'xhApplyOrder' => ['id' => 7, 'name' => 'xhApplyOrder'],
- 'xhMergeUser' => ['id' => 8, 'name' => 'xhMergeUser'],
- 'xhRenew' => ['id' => 9, 'name' => 'xhRenew'],
- ],
- "capitalTypeList" => [//流水类型的对应链接,后台收支明细查看时跳转的链接
- 0 => ['link' => '/capital/order-detail', 'name' => '网店', 'orderLink' => '/order/detail'],
- 2 => ['link' => '/capital/active-order-detail', 'name' => '活动报名', 'orderLink' => ''],
- 4 => ['link' => '/capital/recharge-detail', 'name' => '充值', 'orderLink' => ''],
- 5 => ['link' => '/capital/user-unite', 'name' => '帐号关联', 'orderLink' => ''],
- 6 => ['link' => '/capital/draw-cash', 'name' => '提现', 'orderLink' => ''],
- 7 => ['link' => '/capital/apply-order-detail', 'name' => '接入申请', 'orderLink' => ''],
- 8 => ['link' => '/capital/merge-user', 'name' => '帐号合并', 'orderLink' => ''],
- 9 => ['link' => '/capital/renew', 'name' => '续费', 'orderLink' => '']
- ],
- "imgSavePath" => [//图片保存目录
- 'wxUserAvatar' => 'weixinUserAvatar',//微信用户头像
- 'wxUserImg' => 'weixinUserImg',//微信用户上传的图片
- 'wxMpQrcode' => 'weixinMpQrcode',//公众号二维码
- 'wxMpAvatar' => 'weixinMpAvatar',//公众号头像
- 'wxAdminAvatar' => 'weixinAdminAvatar',//管理员头像
- 'wxAdminImg' => 'weixinAdminImg',//微信后台管理上传图片
- ],
- //模板消息
- 'tMessage' => [
- 'OPENTM207430125' => '操作成功通知',
- 'OPENTM401915538' => '审核通知',
- 'TM00006' => '充值通知',
- 'OPENTM201205968' => '订单送达通知',
- 'OPENTM207777535' => '付款提醒',
- 'OPENTM401761342' => '订单价格修改通知',
- 'OPENTM205211943' => '会员升级通知',
- 'TM00230' => '积分变动通知',
- 'OPENTM200605630' => '任务处理通知',
- // 'OPENTM401027382' => '课程报名成功',
- 'OPENTM207422813' => '收入提醒',
- 'OPENTM202297555' => '下单成功通知',
- 'OPENTM207327227' => '宝贝售出提醒',
- 'OPENTM207188526' => '付款成功',
- // 'TM00575' => '报名成功通知',
- // 'OPENTM201319876' => '结算通知',
- ],
- //格式: 表名 => ['表字段' => [...]]
- 'xhShop' => [ //表名
- 'status' => [0 => '运营后台审核中', 1 => '微信审核中', 2 => '审核通过', 3 => '未通过', 4 => '微信系统错误'],//门店审核状态(表字段)
- ],
- 'xhActiveOrder' => [ //表名
- 'payStatus' => [-1 => '未通过', 0 => '等待审批', 1 => '通过'],
- ],
- 'xhLuckyDrawAwardCustomer' => [ //表名
- 'status' => [-1 => '过期未领取', 0 => '待发放', 1 => '已发放'],
- ],
-
- 'xhGuaGuaWin' => [ //表名
- 'status' => [1 => '未领取', 2 => '已发放', 3 => '过期未领取'],
- ],
-
- 'trainDemo' => [//培训演示使用的公众号
- 'merchant' => ['name' => '花掌柜', 'account' => '16063078665', 'wxPayMerchantId' => '1265953301', 'wxPayKey' => 'woz23aG739jscv4309275jnza3qw8dwm'],
- 'platform' => ['name' => '花汇宝', 'account' => '16063078661', 'wxPayMerchantId' => '1398843402', 'wxPayKey' => 'db123jf239jswx2309h10jnze3qwjd1v'],
- ],
-
- //图片形状和比例类型
- 'imgShape' => [
- 'square' => ['id' => 0],//正方形 1:1 400x400
- 'rectangle' => ['id' => 1],//长方形 3:2 450x300
- 'focus' => ['id' => 2],//焦点图 750x280
- ],
- 'imgShapeGetId' => [
- 0 => ['name' => 'square'],
- 1 => ['name' => 'rectangle'],
- 2 => ['name' => 'focus'],
- ],
- //用户来源
- 'userSource' => [
- 0 => 'official',
- 1 => 'alipay',
- 2 => 'mini',
- ],
- 'userSourceGetId' => [
- 'official' => ['id' => 0, 'name' => 'official'],
- 'alipay' => ['id' => 1, 'name' => 'alipay'],
- 'mini' => ['id' => 2, 'name' => 'mini'],
- ],
- ];
-
- //生成二维码的Key
- public static $qrKey = [
- 'user' => 'huahuibao_user_',
- 'coupon' => 'huahuibao_coupon_',
- 'xhStudent' => 'xhStudent_',
- 'gathering' => 'gathering_',//收款二维码
- ];
-
- public static $cacheKey = [
- 'tagUser' => '_tagUser_',//标签下的用户
- 'userTag' => 'userTag_',//用户的标签
- 'merchantTag' => 'merchantTag_',//商家的标签
- 'userCart' => 'userCart_',
- 'cart' => 'cart_',
- 'userCoupon' => 'userCoupon_',//用户代金劵
- 'merchantAccount' => 'merchant_account_',//根据account取商家信息
- 'merchantId' => 'merchant_id_',//根据id取商家信息
- 'merchantAsset' => 'merchantAsset_',
- 'merchantExtend' => 'merchantExtend_',
- 'merchantAppId' => 'merchantAppId_',
- 'gatherVisitIPByDay' => 'gatherVisitIPByDay',//每天访问的IP列表
- 'statVisitNumByDay' => 'statVisitNumByDay',//每天访问量
- 'statUserNumByDay' => 'statUserNumByDay',//每天新增粉丝
- 'statIncome' => 'statIncome',//每天增加的收入,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于收入,充值暂不归属于商家收入
- 'statDealByDay' => 'statDealByDay',//每天新增的交易,微信支付、支付宝支付、余额支付,加积分(现金消费)都属于交易,充值暂不归属于商家交易
- 'merchantTrade' => 'merchantTrade',
- 'latestVisitNum' => 'latestVisitNum_',//最近N天访问数
- 'latestIncomeNum' => 'latestIncomeNum_',//最近N天的收入金额
- 'latestUserNum' => 'latestUserNum_',//最近N天的粉丝变化
- 'wxOpen' => 'wxOpen_',
- 'goodsGetById' => 'goodsGetById_',
- 'article' => 'article_',
- 'slide' => 'slide_',
- 'recommendGoods' => 'recommendGoods_',
- 'tMessage' => 'tMessage_',
- 'admin' => 'admin_',
- 'order' => 'order_',
- 'categoryGoodsList' => 'categoryGoodsList_',
- 'categoryList' => 'categoryList_',
- 'categoryNavigationBar' => 'categoryNavigationBar_',
- 'category' => 'category_',
- 'mobileOpenAdmin' => 'mobileOpenAdmin_',
- 'openAdmin' => 'openAdmin_',
- 'inviteCodeList' => 'inviteCodeList',
- 'coupon' => 'coupon_',
- 'swoolePhoneMsg' => 'swoole:phone:message',//swoole进程中断时,保存上次发送手机短信的时间
-
- //表数据缓存
- 'xhUserAsset' => 'xhUserAsset_',
- 'xhUserAlipayAsset' => 'xhUserAlipayAsset',
- 'xhAdminMobile' => 'xhAdminMobile_',
- 'xhActive' => 'xhActive_',
- 'xhActiveTicketClass' => 'xhActiveTicketClass_',
- 'xhActiveOrder' => 'xhActiveOrder_',
- 'xhUnionUser' => 'xhUnionUser_',
- 'xhGoodsSetting' => 'xhGoodsSetting_',
- 'xhUser' => 'xhUser_',
- 'xhUserAlipay' => 'xhUserAlipay',
- 'xhUserOpenId' => 'xhUser_openId_',
- 'xhUserUnite' => 'xhUserUnite',
- 'xhDrawCash' => 'xhDrawCash_',
- 'xhWxMenu' => 'xhWxMenu_',
- 'xhWxMenuKey' => 'xhWxMenuKey_',
- 'xhWxMenuList' => 'xhWxMenuList_',
- 'xhShop' => 'xhShop_',
- 'xhWifiList' => 'xhWifiList_',
- 'xhAdminOpenId' => 'xhAdminOpenId_',
- 'xhTrainClass' => 'xhTrainClass_',
- 'xhTrainCourse' => 'xhTrainCourse_',
- 'xhTrainStudent' => 'xhTrainStudent_',
- 'xhTrainUserCourse' => 'xhTrainUserCourse_',
- 'xhOrderDayNum' => 'xhOrderDayNum',
- 'xhOrderMonthNum' => 'xhOrderMonthNum',
- 'xhStatIncome' => 'xhStatIncome',
- 'xhStatIncomeMonth' => 'xhStatIncomeMonth',
- 'xhUserByMonth' => 'xhUserByMonth',
- 'xhUserByDay' => 'xhUserByDay',
- 'xhVisitByMonth' => 'xhVisitByMonth',
- 'xhVisitByDay' => 'xhVisitByDay',
- 'xhInvite' => 'xhInvite_',
- 'xhMerchantAccount' => 'xhMerchantAccount_',
- 'xhApplyOrder' => 'xhApplyOrder_',
- 'xhInviteCode' => 'xhInviteCode_',
- 'xhSetMeal' => 'xhSetMeal_',
- 'xhGoodsPrice' => 'xhGoodsPrice_',
- 'xhAdminToMerchant' => 'xhAdminToMerchant',
- 'xhAdminToMerchantList' => 'xhAdminToMerchantList',
- 'xhUserIntegral' => 'xhUserIntegral_',
- 'xhLuckyDrawActivity' => 'xhLuckyDrawActivity_',
- 'xhLuckyDrawAward' => 'xhLuckyDrawAward_',
- 'xhLuckyDrawAwardParticipant' => 'xhLuckyDrawAwardParticipant_',
- 'xhLuckyDrawAwardCustomer' => 'xhLuckyDrawAwardCustomer_',
- ];
-
- /**
- * 取配置文件的值
- */
- public static function getConfig($category, $name = null)
- {
- return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
- }
-
-
- public function getValue($category, $name = '')
- {
- return empty($name) ? self::$dict[$category] : self::$dict[$category][$name];
- }
-
- /**
- * 取缓存Key
- */
- public static function getCacheKey($key)
- {
- if (isset(self::$cacheKey[$key])) {
- return self::$cacheKey[$key];
- }
- }
-
- public static function getQrKey($key)
- {
- if (isset(self::$qrKey[$key])) {
- return self::$qrKey[$key];
- }
- }
-
- }
|