其余文件
This commit is contained in:
9
app/common/enum/ActivityAreaEnum.php
Normal file
9
app/common/enum/ActivityAreaEnum.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
class ActivityAreaEnum
|
||||
{
|
||||
|
||||
const STATUS_OPEN = 1;
|
||||
const STATUS_CLOSE = 0;
|
||||
|
||||
}
|
||||
211
app/common/enum/AdEnum.php
Normal file
211
app/common/enum/AdEnum.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
class AdEnum{
|
||||
const MOBILE = 1;
|
||||
const PC = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Notes:获取终端
|
||||
* @param bool $from
|
||||
* @return array|mixed
|
||||
* @author: cjhao 2021/4/19 11:32
|
||||
*/
|
||||
public static function getTerminal($from = true){
|
||||
$desc = [
|
||||
self::MOBILE => '移动端商城',
|
||||
self::PC => 'PC端商城',
|
||||
];
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from];
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:商城页面路径
|
||||
* @param bool $type
|
||||
* @param bool $from
|
||||
* @return array|mixed
|
||||
* @author: cjhao 2021/4/20 11:55
|
||||
*/
|
||||
public static function getLinkPage($type = true,$from = true){
|
||||
$page = [
|
||||
self::MOBILE => [
|
||||
[
|
||||
'name' => '商品分类',
|
||||
'path' => '/pages/goods_cate/goods_cate',
|
||||
'is_tab' => 1,
|
||||
],
|
||||
[
|
||||
'name' => '领券中心',
|
||||
'path' => '/bundle/pages/get_coupon/get_coupon',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '个人中心',
|
||||
'path' => '/pages/user/user',
|
||||
'is_tab' => 1,
|
||||
],
|
||||
[
|
||||
'name' => '限时秒杀',
|
||||
'path' => '/bundle/pages/goods_seckill/goods_seckill',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '拼团活动',
|
||||
'path' => '/bundle/pages/goods_combination/goods_combination',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '热销榜单',
|
||||
'path' => '/pages/active_list/active_list?type=hot',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '会员中心',
|
||||
'path' => '/bundle/pages/user_vip/user_vip',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '商城首页',
|
||||
'path' => '/pages/index/index',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '砍价活动',
|
||||
'path' => '/bundle/pages/bargain/bargain',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '新品推荐',
|
||||
'path' => '/pages/active_list/active_list?type=new',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '店铺街',
|
||||
'path' => '/pages/shop_street/shop_street',
|
||||
'is_tab' => 1,
|
||||
],
|
||||
[
|
||||
'name' => '商家入驻',
|
||||
'path' => '/bundle/pages/store_settled/store_settled',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '消息通知',
|
||||
'path' => '/pages/message_center/message_center',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '积分签到',
|
||||
'path' => '/bundle/pages/integral_sign/integral_sign',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '积分商城',
|
||||
'path' => '/bundle/pages/integral_mall/integral_mall',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
],
|
||||
self::PC => [
|
||||
[
|
||||
'name' => '商品分类',
|
||||
'path' => '/category',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '领券中心',
|
||||
'path' => '/get_coupons',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '购物车',
|
||||
'path' => '/get_cart',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '我的订单',
|
||||
'path' => '/get_order',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '商家入驻',
|
||||
'path' => '/shop',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '帮助中心',
|
||||
'path' => '/help',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '限时秒杀',
|
||||
'path' => '/seckill',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '热销榜单',
|
||||
'path' => '/goods_list/1',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '新品推荐',
|
||||
'path' => '/goods_list/2',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '店铺街',
|
||||
'path' => '/shop_street',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
[
|
||||
'name' => '商城资讯',
|
||||
'path' => '/news_list',
|
||||
'is_tab' => 0,
|
||||
],
|
||||
],
|
||||
];
|
||||
if(true !== $type){
|
||||
$page = $page[$type] ?? [];
|
||||
}
|
||||
if(true === $from){
|
||||
return $page;
|
||||
}
|
||||
return $page[$from] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:获取商品详情路径
|
||||
* @param bool $from
|
||||
* @return array|mixed|string
|
||||
* @author: cjhao 2021/4/20 14:06
|
||||
*/
|
||||
public static function getGoodsPath($from = true){
|
||||
$desc = [
|
||||
self::MOBILE => '/pages/goods_details/goods_details',
|
||||
self::PC => '/goods_details',
|
||||
];
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
}
|
||||
40
app/common/enum/AfterSaleEnum.php
Normal file
40
app/common/enum/AfterSaleEnum.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 售后退款相关 枚举类型
|
||||
* Class AfterSaleEnum
|
||||
* @Author ISH
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class AfterSaleEnum
|
||||
{
|
||||
//售后状态status
|
||||
const STATUS_ING = 0;//-申请退款
|
||||
const STATUS_MECHANT_REFUSED = 1;//商家拒绝
|
||||
const STATUS_GOODS_RETURNED = 2;//商品待退货
|
||||
const STATUS_RECEIVE_GOODS = 3;//商家待收货
|
||||
const STATUS_MECHANT_REFUSED_GOODS = 4;//商家拒收货
|
||||
const STATUS_WAITING = 5;//等待退款
|
||||
const STATUS_COMPLETE = 6;//退款成功
|
||||
|
||||
}
|
||||
15
app/common/enum/BargainEnum.php
Normal file
15
app/common/enum/BargainEnum.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class BargainEnum
|
||||
{
|
||||
const STATUS_NORMAL = 0;//进行中
|
||||
const STATUS_SUCCESS = 1;//成功
|
||||
const STATUS_FAIL = 2;//失败
|
||||
const STATUS_FINISH = 3;//提前结束
|
||||
|
||||
const TO_BE_REVIEWED = 0; //待审核
|
||||
const AUDIT_PASS = 1; //审核通过
|
||||
const AUDIT_REFUND = 2; //审核拒绝
|
||||
}
|
||||
45
app/common/enum/ChatMsgEnum.php
Normal file
45
app/common/enum/ChatMsgEnum.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class ChatMsgEnum
|
||||
{
|
||||
|
||||
const TYPE_TEXT = 1; // 文本
|
||||
const TYPE_IMG = 2; // 图片
|
||||
const TYPE_GOODS = 3; // 商品
|
||||
|
||||
|
||||
public static function getMsgType($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_TEXT => '文本',
|
||||
self::TYPE_IMG => '图片',
|
||||
self::TYPE_GOODS => '商品',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
31
app/common/enum/ChatRecordEnum.php
Normal file
31
app/common/enum/ChatRecordEnum.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class ChatRecordEnum
|
||||
{
|
||||
|
||||
// 聊天记录类型
|
||||
const TYPE_NORMAL = 1; // 普通记录
|
||||
const TYPE_NOTICE = 2; // 通知类型(例如转接客服时通知用户消息)
|
||||
|
||||
}
|
||||
74
app/common/enum/ClientEnum.php
Normal file
74
app/common/enum/ClientEnum.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class ClientEnum
|
||||
{
|
||||
const unknown = 0;// 未知来源
|
||||
const mnp = 1;//小程序
|
||||
const oa = 2;//公众号
|
||||
const ios = 3;
|
||||
const android = 4;
|
||||
const pc = 5;
|
||||
const h5 = 6;//h5(非微信环境h5)
|
||||
|
||||
function getName($value)
|
||||
{
|
||||
switch ($value) {
|
||||
case self::unknown:
|
||||
$name = '未知来源';
|
||||
break;
|
||||
case self::mnp:
|
||||
$name = '小程序';
|
||||
break;
|
||||
case self::h5:
|
||||
$name = 'h5';
|
||||
break;
|
||||
case self::ios:
|
||||
$name = '苹果';
|
||||
break;
|
||||
case self::android:
|
||||
$name = '安卓';
|
||||
break;
|
||||
case self::oa:
|
||||
$name = '公众号';
|
||||
break;
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
public static function getClient($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::unknown => '未知来源',
|
||||
self::pc => 'pc商城',
|
||||
self::h5 => 'h5商城',
|
||||
self::oa => '公众号商城',
|
||||
self::mnp => '小程序商城',
|
||||
self::ios => '苹果APP商城',
|
||||
self::android => '安卓APP商城',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知来源';
|
||||
}
|
||||
}
|
||||
78
app/common/enum/CommunityArticleEnum.php
Normal file
78
app/common/enum/CommunityArticleEnum.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
/**
|
||||
* 种草社区文章枚举
|
||||
* Class CommunityArticleEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class CommunityArticleEnum
|
||||
{
|
||||
const STATUS_WAIT = 0; //待审核
|
||||
const STATUS_SUCCESS = 1; //审核通过
|
||||
const STATUS_REFUSE = 2; //审核拒绝
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取审核状态描述
|
||||
* @param bool $status
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/5/6 10:41
|
||||
*/
|
||||
public static function getStatusDesc($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::STATUS_WAIT => '审核中',
|
||||
self::STATUS_SUCCESS => '审核通过',
|
||||
self::STATUS_REFUSE => '审核拒绝',
|
||||
];
|
||||
if (true === $status) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes
|
||||
* @param $article
|
||||
* @param bool $page_detail 是否为详情页描述 true=详情页描述 false=作品列表页描述
|
||||
* @return mixed|string
|
||||
* @author 段誉
|
||||
* @date 2022/5/12 16:11
|
||||
*/
|
||||
public static function getStatusRemarkDesc($article, $page_detail = true)
|
||||
{
|
||||
$desc = '';
|
||||
if ($article['status'] == self::STATUS_WAIT) {
|
||||
$desc = $page_detail ? '审核通过后,将展示在首页!' : '通过后将展示在社区';
|
||||
}
|
||||
|
||||
if ($article['status'] == self::STATUS_REFUSE) {
|
||||
$desc = $page_detail ? $article['audit_remark'] : '查看未通过原因';
|
||||
}
|
||||
|
||||
return $desc;
|
||||
}
|
||||
|
||||
}
|
||||
55
app/common/enum/CommunityCommentEnum.php
Normal file
55
app/common/enum/CommunityCommentEnum.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
/**
|
||||
* 种草社区评论枚举
|
||||
* Class CommunityCommentEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class CommunityCommentEnum
|
||||
{
|
||||
const STATUS_WAIT = 0; //待审核
|
||||
const STATUS_SUCCESS = 1; //审核通过
|
||||
const STATUS_REFUSE = 2; //审核拒绝
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取审核状态描述
|
||||
* @param bool $status
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/5/6 10:41
|
||||
*/
|
||||
public static function getStatusDesc($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::STATUS_WAIT => '审核中',
|
||||
self::STATUS_SUCCESS => '审核通过',
|
||||
self::STATUS_REFUSE => '审核拒绝',
|
||||
];
|
||||
if (true === $status) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status];
|
||||
}
|
||||
|
||||
}
|
||||
43
app/common/enum/CommunityLikeEnum.php
Normal file
43
app/common/enum/CommunityLikeEnum.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
/**
|
||||
* 种草社区点赞枚举
|
||||
* Class CommunityLikeEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class CommunityLikeEnum
|
||||
{
|
||||
|
||||
// 点赞类型
|
||||
const TYPE_ARTICLE = 1; // 文章类型
|
||||
const TYPE_COMMENT = 2; // 评论类型
|
||||
|
||||
|
||||
// 点赞类型
|
||||
const LIKE_TYPE = [
|
||||
self::TYPE_ARTICLE,
|
||||
self::TYPE_COMMENT,
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
21
app/common/enum/DecorationEnum.php
Normal file
21
app/common/enum/DecorationEnum.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
class DecorationEnum
|
||||
{
|
||||
// 商品分类页布局图片
|
||||
const CATEGORY_LAYOUT = [
|
||||
1 => '/static/common/image/default/category_layout1.png',
|
||||
2 => '/static/common/image/default/category_layout2.png',
|
||||
3 => '/static/common/image/default/category_layout3.png',
|
||||
4 => '/static/common/image/default/category_layout4.png'
|
||||
];
|
||||
|
||||
// 提示消息
|
||||
const CATEGORY_LAYOUT_TIPS = [
|
||||
1 => '一级布局,适合商品分类较少情形',
|
||||
2 => '一级布局,适合商品分类较少情形',
|
||||
3 => '二级布局,适合商品分类适中情形',
|
||||
4 => '三级布局,适合商品分类丰富情形'
|
||||
];
|
||||
}
|
||||
25
app/common/enum/DistributionOrderGoodsEnum.php
Normal file
25
app/common/enum/DistributionOrderGoodsEnum.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
class DistributionOrderGoodsEnum
|
||||
{
|
||||
//分销订单状态
|
||||
const STATUS_WAIT_HANDLE = 1;//待返佣
|
||||
const STATUS_SUCCESS = 2;//已结算
|
||||
const STATUS_ERROR = 3;//已失效
|
||||
|
||||
|
||||
//分销订单状态
|
||||
public static function getOrderStatus($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::STATUS_WAIT_HANDLE => '待返佣',
|
||||
self::STATUS_SUCCESS => '已结算',
|
||||
self::STATUS_ERROR => '已失效',
|
||||
];
|
||||
if ($status === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status] ?? '未知';
|
||||
}
|
||||
}
|
||||
29
app/common/enum/FileEnum.php
Normal file
29
app/common/enum/FileEnum.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class FileEnum
|
||||
{
|
||||
const IMAGE_TYPE = 10; //图片类型
|
||||
const VIDEO_TYPE = 20; //视频类型
|
||||
const FILE_TYPE = 30; //文件类型
|
||||
const OTHER_TYPE = 40; //文件类型
|
||||
}
|
||||
35
app/common/enum/FootprintEnum.php
Normal file
35
app/common/enum/FootprintEnum.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class FootprintEnum
|
||||
{
|
||||
const ENTER_MALL = 1; //访问商城
|
||||
const BROWSE_GOODS = 2; //浏览商品
|
||||
const ADD_CART = 3; //加入购物车
|
||||
const RECEIVE_COUPON = 4; //领取优惠券
|
||||
const PLACE_ORDER = 5; //商品下单
|
||||
|
||||
/**
|
||||
* @Notes: 获取场景描述
|
||||
* @Author: 张无忌
|
||||
* @param bool $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getSceneDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::ENTER_MALL => '访问商城',
|
||||
self::BROWSE_GOODS => '浏览商品',
|
||||
self::ADD_CART => '加入购物车',
|
||||
self::RECEIVE_COUPON => '领取优惠券',
|
||||
self::PLACE_ORDER => '下单结算',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知';
|
||||
}
|
||||
}
|
||||
11
app/common/enum/FreightEnum.php
Normal file
11
app/common/enum/FreightEnum.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
class FreightEnum
|
||||
{
|
||||
//计费方式
|
||||
const CHARGE_WAY_WEIGHT = 1;//按重量计费
|
||||
const CHARGE_WAY_VOLUME = 2; //体积计费
|
||||
const CHARGE_WAY_PIECE = 3;//按件计费
|
||||
}
|
||||
145
app/common/enum/GoodsEnum.php
Normal file
145
app/common/enum/GoodsEnum.php
Normal file
@ -0,0 +1,145 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class GoodsEnum
|
||||
{
|
||||
// 商品类型
|
||||
const TYPE_ACTUAL = 0; // 实物商品
|
||||
const TYPE_VIRTUAL = 1; // 虚拟商品
|
||||
|
||||
/**
|
||||
* 运费类型
|
||||
*/
|
||||
const EXPRESS_TYPE_FREE = 1; //包邮
|
||||
const EXPRESS_TYPE_UNIFIED = 2; //统一运费
|
||||
const EXPRESS_TYPE_TEMPLATE = 3; //运费模板
|
||||
|
||||
|
||||
/**
|
||||
* 销售状态
|
||||
*/
|
||||
const STATUS_SOLD_OUT = 0; //仓库中
|
||||
const STATUS_SHELVES = 1; //上架中
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
const DEL_NORMAL = 0; // 正常
|
||||
const DEL_TRUE = 1; // 已删除
|
||||
const DEL_RECYCLE = 2; // 回收站
|
||||
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
const AUDIT_STATUS_STAY = 0; //待审核
|
||||
const AUDIT_STATUS_OK = 1; //审核通过
|
||||
const AUDIT_STATUS_REFUSE = 2; //审核失败
|
||||
|
||||
/**
|
||||
* 商品类型
|
||||
*/
|
||||
const SALES = 1; // 销售中
|
||||
const WAREHOUSE = 2; // 仓库中
|
||||
const WARNING = 3; // 库存预警
|
||||
const RECYCLE_BIN = 4; // 回收站
|
||||
const WAIT_AUDIT = 5; // 待审核
|
||||
const UNPASS_AUDIT = 6; // 未通过审核
|
||||
|
||||
/**
|
||||
* 配送方式
|
||||
*/
|
||||
const DELIVERY_EXPRESS = 1;// 快递发货
|
||||
const DELIVERY_VIRTUAL = 2;// 虚拟发货
|
||||
const DELIVERY_SELF = 3;// 线下自提
|
||||
|
||||
|
||||
// 买家付款后
|
||||
const AFTER_PAY_AUTO_DELIVERY = 1;// 自动发货
|
||||
const AFTER_PAY_SELF_DELIVERY = 2;// 手动发货
|
||||
|
||||
// 卖家发货后
|
||||
const AFTER_DELIVERY_AUTO_COMFIRM = 1;// 自动完成订单
|
||||
const AFTER_DELIVERY_SELF_COMFIRM = 2;// 买家确认订单
|
||||
|
||||
|
||||
/**
|
||||
* @notes 商品类型
|
||||
* @param bool $type
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 18:38
|
||||
*/
|
||||
public static function getTypeDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_ACTUAL => '实物商品',
|
||||
self::TYPE_VIRTUAL => '虚拟商品',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 配送方式
|
||||
* @param bool $type
|
||||
* @return string|string[]
|
||||
* @author ljj
|
||||
* @date 2023/6/28 5:07 下午
|
||||
*/
|
||||
public static function getDeliveryTypeDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::DELIVERY_EXPRESS => '快递发货',
|
||||
self::DELIVERY_VIRTUAL => '虚拟发货',
|
||||
self::DELIVERY_SELF => '线下自提',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
static function getDeliveryLists($delivery_types) : array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
$delivery_types = array_unique($delivery_types);
|
||||
$lists = self::getDeliveryTypeDesc();
|
||||
|
||||
foreach ($delivery_types as $delivery_type) {
|
||||
if (isset($lists[$delivery_type])) {
|
||||
$result[] = [
|
||||
'delivery_type' => $delivery_type,
|
||||
'delivery_type_text' => $lists[$delivery_type],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
73
app/common/enum/IntegralGoodsEnum.php
Normal file
73
app/common/enum/IntegralGoodsEnum.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 积分商品
|
||||
* Class IntegralGoodsEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class IntegralGoodsEnum
|
||||
{
|
||||
// 兑换类型
|
||||
const TYPE_GOODS = 1; //商品
|
||||
const TYPE_BALANCE = 2; //红包(余额)
|
||||
|
||||
// 商品状态
|
||||
const STATUS_SOLD_OUT = 0; //下架
|
||||
const STATUS_SHELVES = 1; //上架中
|
||||
|
||||
// 删除状态
|
||||
const DEL_NORMAL = 0; // 正常
|
||||
const DEL_TRUE = 1; // 已删除
|
||||
|
||||
|
||||
// 兑换方式
|
||||
const EXCHANGE_WAY_INTEGRAL = 1; // 积分
|
||||
const EXCHANGE_WAY_HYBRID = 2; // 积分 + 金额
|
||||
|
||||
|
||||
// 物流类型
|
||||
const DELIVERY_NO_EXPRESS = 0; // 无需物流
|
||||
const DELIVERY_EXPRESS = 1; // 快递配送
|
||||
|
||||
// 运费
|
||||
const EXPRESS_TYPE_FREE = 1; // 包邮
|
||||
const EXPRESS_TYPE_UNIFIED = 2; // 统一运费
|
||||
|
||||
/**
|
||||
* @notes 兑换类型
|
||||
* @param bool $type
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/2/25 17:48
|
||||
*/
|
||||
public static function getTypeDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_GOODS => '商品',
|
||||
self::TYPE_BALANCE => '红包',
|
||||
];
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
}
|
||||
89
app/common/enum/IntegralOrderEnum.php
Normal file
89
app/common/enum/IntegralOrderEnum.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 积分订单
|
||||
* Class IntegralOrderEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class IntegralOrderEnum
|
||||
{
|
||||
// 订单状态order_status
|
||||
const ORDER_STATUS_NO_PAID = 0;//待支付
|
||||
const ORDER_STATUS_DELIVERY = 1;//待发货
|
||||
const ORDER_STATUS_GOODS = 2;//待收货
|
||||
const ORDER_STATUS_COMPLETE = 3;//已完成
|
||||
const ORDER_STATUS_DOWN = 4;//已关闭
|
||||
|
||||
// 退款状态 refund_status
|
||||
const NO_REFUND = 0;//未退款
|
||||
const IS_REFUND = 1;//已退款
|
||||
|
||||
// 发货状态 shipping_status
|
||||
const SHIPPING_NO = 0; //未发货
|
||||
const SHIPPING_FINISH = 1; //已发货
|
||||
|
||||
|
||||
/**
|
||||
* @notes 订单状态
|
||||
* @param bool $type
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/3/3 14:18
|
||||
*/
|
||||
public static function getOrderStatus($type=true)
|
||||
{
|
||||
$desc = [
|
||||
self::ORDER_STATUS_NO_PAID => '待支付',
|
||||
self::ORDER_STATUS_DELIVERY => '待发货',
|
||||
self::ORDER_STATUS_GOODS => '待收货',
|
||||
self::ORDER_STATUS_COMPLETE => '已完成',
|
||||
self::ORDER_STATUS_DOWN => '已关闭'
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知来源';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 退款状态
|
||||
* @param bool $type
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/3/3 14:18
|
||||
*/
|
||||
public static function getRefundStatus($type=true)
|
||||
{
|
||||
$desc = [
|
||||
self::NO_REFUND => '未退款',
|
||||
self::IS_REFUND => '已退款',
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '--';
|
||||
}
|
||||
}
|
||||
32
app/common/enum/KefuEnum.php
Normal file
32
app/common/enum/KefuEnum.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class KefuEnum
|
||||
{
|
||||
/**
|
||||
* 客服账号类型
|
||||
*/
|
||||
const TYPE_PLATFORM = 0; // 平台
|
||||
const TYPE_SHOP = 1; // 商家
|
||||
|
||||
}
|
||||
133
app/common/enum/LiveGoodsEnum.php
Normal file
133
app/common/enum/LiveGoodsEnum.php
Normal file
@ -0,0 +1,133 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
class LiveGoodsEnum
|
||||
{
|
||||
// 产品来源类型
|
||||
const SOURCE_TYPE_GOODS = 0; // 商品库
|
||||
const SOURCE_TYPE_SELF = 1;// 自定义
|
||||
|
||||
|
||||
// 系统审核状态
|
||||
const SYS_AUDIT_STATUS_WAIT_PLATFORM = 0;
|
||||
const SYS_AUDIT_STATUS_WAIT_WECHAT = 1;
|
||||
const SYS_AUDIT_STATUS_SUCCESS = 2;
|
||||
const SYS_AUDIT_STATUS_FAIL = 3;
|
||||
|
||||
|
||||
// 微信审核状态
|
||||
const WX_AUDIT_STATUS_WAIT = 0;
|
||||
const WX_AUDIT_STATUS_ING = 1;
|
||||
const WX_AUDIT_STATUS_SUCCESS = 2;
|
||||
const WX_AUDIT_STATUS_FAIL = 3;
|
||||
|
||||
|
||||
// 商品价格类型 1:一口价 2:价格区间 3:显示折扣价
|
||||
const PRICE_ONE = 1;
|
||||
const PRICE_RANGE = 2;
|
||||
const PRICE_DISCOUNT = 3;
|
||||
|
||||
|
||||
/**
|
||||
* @notes 审核状态描述
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/15 18:49
|
||||
*/
|
||||
public static function getAuditStatusDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::SYS_AUDIT_STATUS_WAIT_PLATFORM => '待平台审核',
|
||||
self::SYS_AUDIT_STATUS_WAIT_WECHAT => '待微信审核',
|
||||
self::SYS_AUDIT_STATUS_SUCCESS => '审核通过',
|
||||
self::SYS_AUDIT_STATUS_FAIL => '审核未通过',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '未知';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 价格类型
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/16 21:54
|
||||
*/
|
||||
public static function getPriceTypeDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::PRICE_ONE => '一口价',
|
||||
self::PRICE_RANGE => '价格区间',
|
||||
self::PRICE_DISCOUNT => '显示价格',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '未知';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 商品来源类型描述
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/17 9:36
|
||||
*/
|
||||
public static function getSourceTypeDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::SOURCE_TYPE_GOODS => '商品库',
|
||||
self::SOURCE_TYPE_SELF => '自定义',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '未知';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 微信审核状态
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/20 10:32
|
||||
*/
|
||||
public static function getWxAuditStatusDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::WX_AUDIT_STATUS_WAIT => '微信未审核',
|
||||
self::WX_AUDIT_STATUS_ING => '微信审核中',
|
||||
self::WX_AUDIT_STATUS_SUCCESS => '微信审核通过',
|
||||
self::WX_AUDIT_STATUS_FAIL => '微信审核失败',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
104
app/common/enum/LiveRoomEnum.php
Normal file
104
app/common/enum/LiveRoomEnum.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
class LiveRoomEnum
|
||||
{
|
||||
// 审核状态
|
||||
const AUDIT_STATUS_WAIT = 0;
|
||||
const AUDIT_STATUS_SUCCESS = 1;
|
||||
const AUDIT_STATUS_FAIL = 2;
|
||||
|
||||
|
||||
// 直播间状态
|
||||
const LIVE_STATUS_WAIT = 102;
|
||||
const LIVE_STATUS_ING = 101;
|
||||
const LIVE_STATUS_END = 103;
|
||||
const LIVE_STATUS_DISABLE = 104;
|
||||
const LIVE_STATUS_STOP = 105;
|
||||
const LIVE_STATUS_ERROR = 106;
|
||||
const LIVE_STATUS_EXPIRE = 107;
|
||||
|
||||
|
||||
// 审核状态
|
||||
const AUDIT_STATUS = [
|
||||
self::AUDIT_STATUS_WAIT,
|
||||
self::AUDIT_STATUS_SUCCESS,
|
||||
self::AUDIT_STATUS_FAIL,
|
||||
];
|
||||
|
||||
|
||||
// 直播间状态
|
||||
const LIVE_STATUS = [
|
||||
self::LIVE_STATUS_WAIT,
|
||||
self::LIVE_STATUS_ING,
|
||||
self::LIVE_STATUS_END,
|
||||
self::LIVE_STATUS_DISABLE,
|
||||
self::LIVE_STATUS_STOP,
|
||||
self::LIVE_STATUS_ERROR,
|
||||
self::LIVE_STATUS_EXPIRE,
|
||||
];
|
||||
|
||||
/**
|
||||
* @notes 审核状态描述
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/15 18:49
|
||||
*/
|
||||
public static function getAuditStatusDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::AUDIT_STATUS_WAIT => '待审核',
|
||||
self::AUDIT_STATUS_SUCCESS => '审核通过',
|
||||
self::AUDIT_STATUS_FAIL => '审核未通过',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取直播间状态描述
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2023/2/15 18:59
|
||||
*/
|
||||
public static function getLiveStatusDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::LIVE_STATUS_WAIT => '未开始',
|
||||
self::LIVE_STATUS_ING => '直播中',
|
||||
self::LIVE_STATUS_END => '已结束',
|
||||
self::LIVE_STATUS_DISABLE => '禁播',
|
||||
self::LIVE_STATUS_STOP => '暂停',
|
||||
self::LIVE_STATUS_ERROR => '异常',
|
||||
self::LIVE_STATUS_EXPIRE => '已过期',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from];
|
||||
}
|
||||
|
||||
}
|
||||
355
app/common/enum/MenuEnum.php
Normal file
355
app/common/enum/MenuEnum.php
Normal file
@ -0,0 +1,355 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
class MenuEnum
|
||||
{
|
||||
//基础菜单
|
||||
const BASE_INDEX = 101;//商城首页
|
||||
const BASE_GOODS_CATEGORY = 102;//商品分类
|
||||
const BASE_COMMUNITY = 103;//种草社区
|
||||
const BASE_CART = 104;//购物车
|
||||
const BASE_USER = 105;//个人中心
|
||||
|
||||
//个人中心
|
||||
const SHOP_SECKILL = 201;//秒杀列表
|
||||
const SHOP_TEAM = 202;//拼团列表
|
||||
const SHOP_BARGAIN = 203;//砍价列表
|
||||
const SHOP_COUPON = 204;//领券中心
|
||||
const SHOP_VIP = 205;//会员中心
|
||||
const SHOP_LIVE_ROOM = 206;//小程序直播
|
||||
const SHOP_TEAM_LOG = 207;//拼团记录
|
||||
const SHOP_BARGAIN_LOG = 208;//砍价记录
|
||||
const SHOP_STREET = 209;//店铺街
|
||||
const SHOP_APPLY = 210;//商家入驻
|
||||
const SHOP_MY_COUPON = 211;//我的优惠券
|
||||
const SHOP_ACTIVE_NEW = 212;//新品推荐
|
||||
const SHOP_INTEGRAL_MALL = 213;//积分商城
|
||||
const SHOP_INTEGRAL_SIGN = 214;//积分签到
|
||||
const SHOP_ACTIVE_HOT = 215;//热销榜单
|
||||
const SHOP_WALLET = 216;//我的钱包
|
||||
const SHOP_COLLECTION = 217;//我的收藏
|
||||
const SHOP_HELP = 218;//帮助中心
|
||||
const SHOP_ADDRESS = 219;//收货地址
|
||||
const SHOP_NEWS = 220;//商城资讯
|
||||
const SHOP_COMMENTS = 221;//我的评价
|
||||
const SHOP_USER_SETTING = 222;//个人设置
|
||||
const SHOP_RECHARGE = 223;//用户充值
|
||||
const SHOP_GOODS_SEARCH = 224;//商品搜索
|
||||
const SHOP_CONTACT = 225;//联系客服
|
||||
const SHOP_MESSAGE = 226;//消息通知
|
||||
const SHOP_SERVER_EXPLAN_1 = 227;//隐私政策
|
||||
const SHOP_SERVER_EXPLAN_0 = 228;//服务协议
|
||||
|
||||
//分销菜单
|
||||
const DISTRIBUTION_PROMOTION = 301;//分销推广
|
||||
const DISTRIBUTION_POSTER = 302;//分销海报
|
||||
|
||||
/**
|
||||
* Notes: 菜单内容
|
||||
* @param bool $scene 场景:1-基础链接;2-商城链接;3-分销链接
|
||||
* @param bool $from 菜单来源:获取具体的某个菜单
|
||||
* @return array
|
||||
* name => '菜单名称'
|
||||
* link => 调整链接
|
||||
* is_tab => 是否的tab页
|
||||
* link_type => 菜单类型:1-跳转;2-web-view;3-按钮(微信小程序可调用客服)
|
||||
* menu_type => 菜单内容类型:1-正常内容;2-分销菜单
|
||||
*
|
||||
*/
|
||||
public static function getMenuContent($scene = true,$from = true){
|
||||
//基础链接
|
||||
$base = [
|
||||
self::BASE_INDEX => [
|
||||
'name' => '商城首页',
|
||||
'link' => '/pages/index/index',
|
||||
'is_tab' => 1,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::BASE_GOODS_CATEGORY => [
|
||||
'name' => '商品分类',
|
||||
'link' => '/pages/goods_cate/goods_cate',
|
||||
'is_tab' => 1,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::BASE_COMMUNITY => [
|
||||
'name' => '种草社区',
|
||||
'link' => '/pages/community/community',
|
||||
'is_tab' => 1,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::BASE_CART => [
|
||||
'name' => '购物车',
|
||||
'link' => '/pages/shop_cart/shop_cart',
|
||||
'is_tab' => 1,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::BASE_USER => [
|
||||
'name' => '个人中心',
|
||||
'link' => '/pages/user/user',
|
||||
'is_tab' => 1,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
];
|
||||
//商城链接
|
||||
$user = [
|
||||
self::SHOP_SECKILL => [
|
||||
'name' => '秒杀列表',
|
||||
'link' => '/bundle/pages/goods_seckill/goods_seckill',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_TEAM => [
|
||||
'name' => '拼团列表',
|
||||
'link' => '/bundle/pages/goods_combination/goods_combination',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_BARGAIN => [
|
||||
'name' => '砍价列表',
|
||||
'link' => '/bundle/pages/bargain/bargain',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_COUPON => [
|
||||
'name' => '领券中心',
|
||||
'link' => '/bundle/pages/get_coupon/get_coupon',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_VIP => [
|
||||
'name' => '会员中心',
|
||||
'link' => '/bundle/pages/user_vip/user_vip',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_LIVE_ROOM => [
|
||||
'name' => '小程序直播',
|
||||
'link' => '/bundle_b/pages/live_room/live_room',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_TEAM_LOG => [
|
||||
'name' => '拼团记录',
|
||||
'link' => '/bundle/pages/user_group/user_group',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_BARGAIN_LOG => [
|
||||
'name' => '砍价记录',
|
||||
'link' => '/bundle/pages/bargain_code/bargain_code',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_STREET => [
|
||||
'name' => '店铺街',
|
||||
'link' => '/pages/shop_street/shop_street',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_APPLY => [
|
||||
'name' => '商家入驻',
|
||||
'link' => '/bundle/pages/store_settled/store_settled',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_MY_COUPON => [
|
||||
'name' => '我的优惠券',
|
||||
'link' => '/bundle/pages/user_coupon/user_coupon',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_ACTIVE_NEW => [
|
||||
'name' => '新品推荐',
|
||||
'link' => '/pages/active_list/active_list?type=new',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_INTEGRAL_MALL => [
|
||||
'name' => '积分商城',
|
||||
'link' => '/bundle/pages/integral_mall/integral_mall',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_INTEGRAL_SIGN => [
|
||||
'name' => '积分签到',
|
||||
'link' => '/bundle/pages/integral_sign/integral_sign',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_ACTIVE_HOT => [
|
||||
'name' => '热销榜单',
|
||||
'link' => '/pages/active_list/active_list?type=hot',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_WALLET => [
|
||||
'name' => '我的钱包',
|
||||
'link' => '/bundle/pages/user_wallet/user_wallet',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_COLLECTION => [
|
||||
'name' => '我的收藏',
|
||||
'link' => '/bundle/pages/user_collection/user_collection',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_HELP => [
|
||||
'name' => '帮助中心',
|
||||
'link' => '/pages/news_list/news_list?type=1',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_ADDRESS => [
|
||||
'name' => '收货地址',
|
||||
'link' => '/bundle/pages/user_address/user_address',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_NEWS => [
|
||||
'name' => '商城资讯',
|
||||
'link' => '/pages/news_list/news_list',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_COMMENTS => [
|
||||
'name' => '我的评价',
|
||||
'link' => '/bundle/pages/all_comments/all_comments',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_USER_SETTING => [
|
||||
'name' => '个人设置',
|
||||
'link' => '/bundle/pages/user_set/user_set',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_RECHARGE => [
|
||||
'name' => '用户充值',
|
||||
'link' => '/bundle/pages/user_payment/user_payment',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_GOODS_SEARCH => [
|
||||
'name' => '商品搜索',
|
||||
'link' => '/pages/goods_search/goods_search',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_CONTACT => [
|
||||
'name' => '联系客服',
|
||||
'link' => '/bundle/pages/chat/chat',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_MESSAGE => [
|
||||
'name' => '消息通知',
|
||||
'link' => '/pages/message_center/message_center',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_SERVER_EXPLAN_1 => [
|
||||
'name' => '隐私政策',
|
||||
'link' => '/bundle/pages/server_explan/server_explan?type=1',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
self::SHOP_SERVER_EXPLAN_0 => [
|
||||
'name' => '服务协议',
|
||||
'link' => '/bundle/pages/server_explan/server_explan?type=0',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 1,
|
||||
],
|
||||
];
|
||||
//分销链接
|
||||
$distribution = [
|
||||
self::DISTRIBUTION_PROMOTION => [
|
||||
'name' => '分销推广',
|
||||
'link' => '/bundle/pages/user_spread/user_spread',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 2,
|
||||
],
|
||||
self::DISTRIBUTION_POSTER => [
|
||||
'name' => '分销海报',
|
||||
'link' => '/bundle/pages/invite_fans/invite_fans',
|
||||
'is_tab' => 0,
|
||||
'link_type' => 1,
|
||||
'menu_type' => 2,
|
||||
],
|
||||
];
|
||||
|
||||
if($scene === true){
|
||||
$content = array_merge($base,$user,$distribution);
|
||||
} else {
|
||||
switch ($scene) {
|
||||
case 1:
|
||||
$content = $base;
|
||||
break;
|
||||
case 2:
|
||||
$content = $user;
|
||||
break;
|
||||
case 3:
|
||||
$content = $distribution;
|
||||
break;
|
||||
default:
|
||||
$config_name = 'config'.$scene;
|
||||
$content = $$config_name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($from === true){
|
||||
return $content;
|
||||
}
|
||||
return $content[$from] ?? [];
|
||||
}
|
||||
}
|
||||
196
app/common/enum/NoticeEnum.php
Normal file
196
app/common/enum/NoticeEnum.php
Normal file
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* Class NoticeEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class NoticeEnum
|
||||
{
|
||||
//通知类型
|
||||
const SYSTEM_NOTICE = 1; //系统通知
|
||||
const SMS_NOTICE = 2; //短信通知
|
||||
const OA_NOTICE = 3; //公众号模板通知
|
||||
const MNP_NOTICE = 4; //小程序订阅消息通知
|
||||
|
||||
|
||||
//通知对象
|
||||
const NOTICE_USER = 1; //通知会员
|
||||
const NOTICE_SHOP = 2; //通知商家
|
||||
const NOTICE_PLATFORM = 3; //通知平台
|
||||
const NOTICE_OTHER = 4; //通知游客(如新用户注册)
|
||||
|
||||
|
||||
//*************************************************通知会员********************************************************
|
||||
//通知会员-短信验证码
|
||||
const REGISTER_NOTICE = 100; //注册会员短信验证码通知
|
||||
const CHANGE_MOBILE_NOTICE = 101; //变更手机短信验证码通知
|
||||
const GET_BACK_MOBILE_NOTICE = 102; //找回密码短信验证码通知
|
||||
const GET_GODE_LOGIN_NOTICE = 110; //验证码登录
|
||||
const BIND_MOBILE_NOTICE = 111; //绑定手机号
|
||||
const GET_BACK_PAY_CODE_NOTICE = 112; //找回支付密码
|
||||
//通知会员-订单相关
|
||||
const ORDER_PAY_NOTICE = 103; //成功下单通知
|
||||
const ORDER_DELIVERY_NOTICE = 104; //订单发货通知
|
||||
const AFTER_SALE_NOTICE = 105; //售后退款申请状态通知
|
||||
//通知会员-佣金相关
|
||||
const GET_FUTURE_EARNINGS_NOTICE = 107; //获得预估推广佣金通知
|
||||
const GET_EARNINGS_NOTICE = 113; //确认收款
|
||||
//通知会员-其他
|
||||
const INVITE_SUCCESS_NOTICE = 106; //成功邀请粉丝通知
|
||||
const SHOP_APPLY_ERROR_NOTICE = 108; //商家入驻申请失败通知
|
||||
const SHOP_APPLY_SUCCESS_NOTICE = 109; //商家入驻申请成功通知
|
||||
const SHOP_APPLY_CHECK_CODE = 114; //商家入驻手机短信验证通知
|
||||
//**************************************************************************************************************
|
||||
|
||||
|
||||
//*************************************************通知商家和平台********************************************************
|
||||
//通知商家
|
||||
const USER_PAID_NOTICE_SHOP = 200;//会员支付下单通知商家
|
||||
const AFTER_SALE_NOTICE_SHOP = 201;//会员发起售后退款通知商家
|
||||
|
||||
//通知平台
|
||||
const SHOP_APPLY_NOTICE_PLATFORM = 300; //商家入驻通知
|
||||
const SHOP_WITHDRAWAL_NOTICE_PLATFORM = 301; //商家提现通知
|
||||
//*************************************************通知会员********************************************************
|
||||
|
||||
//通知平台的场景
|
||||
const NOTICE_PLATFORM_SCENE = [
|
||||
self::SHOP_APPLY_NOTICE_PLATFORM,
|
||||
self::SHOP_WITHDRAWAL_NOTICE_PLATFORM,
|
||||
];
|
||||
|
||||
//通知商家的场景
|
||||
const NOTICE_SHOP_SCENE = [
|
||||
self::USER_PAID_NOTICE_SHOP,
|
||||
self::AFTER_SALE_NOTICE_SHOP,
|
||||
];
|
||||
|
||||
|
||||
//通知会员的场景
|
||||
const NOTICE_USER_SCENE = [
|
||||
self::CHANGE_MOBILE_NOTICE,
|
||||
self::GET_BACK_MOBILE_NOTICE,
|
||||
self::ORDER_PAY_NOTICE,
|
||||
self::ORDER_DELIVERY_NOTICE,
|
||||
self::AFTER_SALE_NOTICE,
|
||||
self::INVITE_SUCCESS_NOTICE,
|
||||
self::GET_FUTURE_EARNINGS_NOTICE,
|
||||
self::GET_EARNINGS_NOTICE,
|
||||
self::SHOP_APPLY_ERROR_NOTICE,
|
||||
self::SHOP_APPLY_SUCCESS_NOTICE,
|
||||
self::GET_GODE_LOGIN_NOTICE,
|
||||
self::BIND_MOBILE_NOTICE,
|
||||
self::GET_BACK_PAY_CODE_NOTICE,
|
||||
self::SHOP_APPLY_CHECK_CODE,
|
||||
];
|
||||
|
||||
//通知游客(还不存在当前系统的人)
|
||||
const NOTICE_OTHER_SCENE = [
|
||||
self::REGISTER_NOTICE
|
||||
];
|
||||
|
||||
|
||||
//订单相关场景
|
||||
const ORDER_SCENE = [
|
||||
self::ORDER_PAY_NOTICE,
|
||||
self::ORDER_DELIVERY_NOTICE,
|
||||
self::AFTER_SALE_NOTICE,
|
||||
];
|
||||
|
||||
|
||||
//验证码的场景
|
||||
const NOTICE_NEED_CODE = [
|
||||
self::REGISTER_NOTICE,
|
||||
self::CHANGE_MOBILE_NOTICE,
|
||||
self::GET_BACK_MOBILE_NOTICE,
|
||||
self::GET_GODE_LOGIN_NOTICE,
|
||||
self::BIND_MOBILE_NOTICE,
|
||||
self::GET_BACK_PAY_CODE_NOTICE,
|
||||
self::SHOP_APPLY_CHECK_CODE,
|
||||
];
|
||||
|
||||
//场景值-短信场景
|
||||
const SMS_SCENE = [
|
||||
'DDZFTZ' => self::ORDER_PAY_NOTICE, //订单支付通知
|
||||
'DDFHTZ' => self::ORDER_DELIVERY_NOTICE, //订单发货通知
|
||||
'ZCYZ' => self::REGISTER_NOTICE, //注册验证
|
||||
'ZHMM' => self::GET_BACK_MOBILE_NOTICE, //找回密码
|
||||
'YZMDL' => self::GET_GODE_LOGIN_NOTICE, //验证码登录
|
||||
'BGSJHM' => self::CHANGE_MOBILE_NOTICE, //变更手机号码
|
||||
'BDSJHM' => self::BIND_MOBILE_NOTICE, //绑定手机号码
|
||||
'ZHZFMM' => self::GET_BACK_PAY_CODE_NOTICE, // 找回支付密码
|
||||
'SJRZSB' => self::SHOP_APPLY_ERROR_NOTICE, //商家入驻失败
|
||||
'SJRZCG' => self::SHOP_APPLY_SUCCESS_NOTICE, //商家入驻成功
|
||||
'SJSQYZ' => self::SHOP_APPLY_CHECK_CODE,//商家入驻申请验证码验证
|
||||
|
||||
'DDTZSJ' => self::USER_PAID_NOTICE_SHOP,//下单通知商家
|
||||
'SHTZSJ' => self::AFTER_SALE_NOTICE_SHOP,//售后通知商家
|
||||
|
||||
'SJSQTZPT' => self::SHOP_APPLY_NOTICE_PLATFORM, //商家申请通知平台
|
||||
'SJTXTZPT' => self::SHOP_WITHDRAWAL_NOTICE_PLATFORM, //商家提现通知平台
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Notes: 通知描述
|
||||
* @param $state
|
||||
* @author 段誉(2021/6/4 15:14)
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getSceneDesc($state)
|
||||
{
|
||||
$data = [
|
||||
//会员-短信验证码
|
||||
self::REGISTER_NOTICE => '注册会员短信验证码通知',
|
||||
self::CHANGE_MOBILE_NOTICE => '变更手机短信验证码通知',
|
||||
self::GET_BACK_MOBILE_NOTICE => '找回登录密码短信验证码通知',
|
||||
self::GET_GODE_LOGIN_NOTICE => '手机短信验证码登录通知',
|
||||
self::BIND_MOBILE_NOTICE => '手机绑定短信验证码验证通知',
|
||||
self::GET_BACK_PAY_CODE_NOTICE => '找回支付密码短信验证码通知',
|
||||
//会员-订单相关通知
|
||||
self::ORDER_PAY_NOTICE => '成功下单通知',
|
||||
self::ORDER_DELIVERY_NOTICE => '订单发货通知',
|
||||
self::AFTER_SALE_NOTICE => '售后退款申请状态通知',
|
||||
//会员-佣金相关通知
|
||||
self::GET_FUTURE_EARNINGS_NOTICE => '获得预估推广佣金通知',
|
||||
self::GET_EARNINGS_NOTICE => '确认收款',
|
||||
//会员-其他通知
|
||||
self::INVITE_SUCCESS_NOTICE => '成功邀请粉丝通知',
|
||||
self::SHOP_APPLY_ERROR_NOTICE => '商家入驻申请失败通知',
|
||||
self::SHOP_APPLY_SUCCESS_NOTICE => '商家入驻申请成功通知',
|
||||
self::SHOP_APPLY_CHECK_CODE => '商家入驻手机短信验证通知',
|
||||
|
||||
//平台
|
||||
self::SHOP_APPLY_NOTICE_PLATFORM => '商家入驻通知',
|
||||
self::SHOP_WITHDRAWAL_NOTICE_PLATFORM => '商家提现通知',
|
||||
|
||||
//商家
|
||||
self::USER_PAID_NOTICE_SHOP => '订单通知',
|
||||
self::AFTER_SALE_NOTICE_SHOP => '售后退款申请通知',
|
||||
];
|
||||
if ($state === true) {
|
||||
return $data;
|
||||
}
|
||||
return $data[$state] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
253
app/common/enum/OrderEnum.php
Normal file
253
app/common/enum/OrderEnum.php
Normal file
@ -0,0 +1,253 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
use app\common\model\order\Order;
|
||||
|
||||
/**
|
||||
* 订单相关 枚举类型
|
||||
* Class OrderEnum
|
||||
* @Author FZR
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class OrderEnum
|
||||
{
|
||||
const ORDER_CANCEL = 1; //直接退款
|
||||
const ORDER_AFTERSALE_CANCEL = 0; //售后退款退款(未退款也是0)
|
||||
//来源
|
||||
const ORDER_SOURCE_APPLET = 1;//小程序来源
|
||||
const ORDER_SOURCE_H5 = 2;//h5来源
|
||||
const ORDER_SOURCE_IOS = 3;//ios来源
|
||||
const ORDER_SOURCE_ANDROID = 4;//安卓来源
|
||||
|
||||
//订单状态order_status
|
||||
const ORDER_STATUS_NO_PAID = 0;//待支付
|
||||
const ORDER_STATUS_DELIVERY = 1;//待发货
|
||||
const ORDER_STATUS_GOODS = 2;//待收货
|
||||
const ORDER_STATUS_COMPLETE = 3;//已完成
|
||||
const ORDER_STATUS_DOWN = 4;//已关闭
|
||||
|
||||
// 是否可修改物流单号的状态
|
||||
const CAN_CHANGE_INVOICE_NO_ARR = [
|
||||
self::ORDER_STATUS_GOODS,
|
||||
];
|
||||
|
||||
//支付状态pay_status
|
||||
const PAY_STATUS_NO_PAID = 0;//待支付
|
||||
const PAY_STATUS_PAID = 1;//已支付
|
||||
const PAY_STATUS_REFUND = 2;//已退款
|
||||
const PAY_STATUS_REFUSE_REFUND = 3;//拒绝退款
|
||||
|
||||
//配送方式delivery_type
|
||||
const DELIVERY_TYPE_EXPRESS = 0;//快递配送
|
||||
const DELIVERY_TYPE_VIRTUAL = 1;//虚拟发货
|
||||
const DELIVERY_TYPE_SELF = 2;//线下自提
|
||||
|
||||
const DELIVERY_TYPES = [
|
||||
self::DELIVERY_TYPE_EXPRESS,
|
||||
self::DELIVERY_TYPE_VIRTUAL,
|
||||
self::DELIVERY_TYPE_SELF,
|
||||
];
|
||||
|
||||
//售后状态aftersale_status
|
||||
const AFTERSALE_STATUS_NO_SALE = 0;//不在售后中
|
||||
const AFTERSALE_STATUS_SALEING = 1;//售后中
|
||||
|
||||
//退款状态refund_status
|
||||
const REFUND_STATUS_NO_REFUND = 0;//未退款
|
||||
const REFUND_STATUS_PART_REFUND = 1;//部分退款
|
||||
const REFUND_STATUS_ALL_REFUND = 2;//全部退款
|
||||
|
||||
//订单类型
|
||||
const NORMAL_ORDER = 0;//普通订单
|
||||
const SECKILL_ORDER = 1;//秒杀订单
|
||||
const TEAM_ORDER = 2;//拼团订单
|
||||
const BARGAIN_ORDER = 3;//砍价订单
|
||||
|
||||
//结算状态
|
||||
const SETTLE_WAIT = 0; //待结算
|
||||
const SETTLE_FINISH = 1; //已结算
|
||||
|
||||
//发货状态
|
||||
const SHIPPING_NO = 0; //未发货
|
||||
const SHIPPING_FINISH = 1; //已发货
|
||||
|
||||
//标识子订单的退款
|
||||
const IS_CANCEL_NO = 0; //售后退款或未退款
|
||||
const IS_CANCEL_FINISH = 1; //直接退款
|
||||
|
||||
//核销状态
|
||||
const NOT_WRITTEN_OFF = 0;//待核销
|
||||
const WRITTEN_OFF = 1;//已核销
|
||||
|
||||
//订单赠送积分场景
|
||||
const ORDER_PAY = 1;//订单付款
|
||||
const ORDER_DELIVERY = 2;//订单发货
|
||||
const ORDER_FINISH = 3;//订单完成
|
||||
const ORDER_AFTER_SALE_OVER = 4;//订单超过售后期
|
||||
|
||||
|
||||
public static function getPayWay($log)
|
||||
{
|
||||
$desc = [
|
||||
OrderLogEnum::USER_ADD_ORDER => '会员提交订单',
|
||||
OrderLogEnum::USER_CANCEL_ORDER => '会员取消订单',
|
||||
OrderLogEnum::USER_DEL_ORDER => '会员删除订单',
|
||||
OrderLogEnum::USER_CONFIRM_ORDER => '会员确认收货',
|
||||
OrderLogEnum::USER_PAID_ORDER => '会员支付订单',
|
||||
];
|
||||
|
||||
if ($log === true) {
|
||||
return $desc;
|
||||
}
|
||||
|
||||
return isset($desc[$log]) ? $desc[$log] : $log;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 订单赠送积分场景
|
||||
* @param $log
|
||||
* @return mixed|string|string[]
|
||||
* @author ljj
|
||||
* @date 2022/2/18 4:01 下午
|
||||
*/
|
||||
public static function getOrderAward($log)
|
||||
{
|
||||
$desc = [
|
||||
self::ORDER_PAY => '订单付款',
|
||||
self::ORDER_DELIVERY => '订单发货',
|
||||
self::ORDER_FINISH => '订单完成',
|
||||
self::ORDER_AFTER_SALE_OVER => '订单超过售后期',
|
||||
];
|
||||
|
||||
if ($log === true) {
|
||||
return $desc;
|
||||
}
|
||||
|
||||
return isset($desc[$log]) ? $desc[$log] : $log;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Notes: 订单状态
|
||||
* @Author: 张无忌
|
||||
* @param bool $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getOrderStatus($type=true)
|
||||
{
|
||||
$desc = [
|
||||
self::ORDER_STATUS_NO_PAID => '待支付',
|
||||
self::ORDER_STATUS_DELIVERY => '待发货',
|
||||
self::ORDER_STATUS_GOODS => '待收货',
|
||||
self::ORDER_STATUS_COMPLETE => '已完成',
|
||||
self::ORDER_STATUS_DOWN => '已关闭'
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知来源';
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 支付状态
|
||||
* @Author: 张无忌
|
||||
* @param bool $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getPayStatus($type=true)
|
||||
{
|
||||
$desc = [
|
||||
self::PAY_STATUS_NO_PAID => '待支付',
|
||||
self::PAY_STATUS_PAID => '已支付',
|
||||
self::PAY_STATUS_REFUND => '已退款',
|
||||
self::PAY_STATUS_REFUSE_REFUND => '拒绝退款'
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知来源';
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 退款状态
|
||||
* @Author: 张无忌
|
||||
* @param bool $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getRefundStatus($type=true)
|
||||
{
|
||||
$desc = [
|
||||
self::REFUND_STATUS_NO_REFUND => '未退款',
|
||||
self::REFUND_STATUS_PART_REFUND => '部分退款',
|
||||
self::REFUND_STATUS_ALL_REFUND => '全部退款',
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '未知来源';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 核销状态描述
|
||||
* @param bool $value
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/11/2 14:08
|
||||
*/
|
||||
public static function getVerificationStatusDesc($value = true)
|
||||
{
|
||||
$data = [
|
||||
self::NOT_WRITTEN_OFF => '待核销',
|
||||
self::WRITTEN_OFF => '已核销',
|
||||
];
|
||||
if (true === $value) {
|
||||
return $data;
|
||||
}
|
||||
return $data[$value];
|
||||
}
|
||||
|
||||
static function getChangeDeliveryTypeItem($goods_delivery_type)
|
||||
{
|
||||
switch ($goods_delivery_type) {
|
||||
case GoodsEnum::DELIVERY_EXPRESS:
|
||||
return static::DELIVERY_TYPE_EXPRESS;
|
||||
break;
|
||||
case GoodsEnum::DELIVERY_VIRTUAL:
|
||||
return static::DELIVERY_TYPE_VIRTUAL;
|
||||
break;
|
||||
case GoodsEnum::DELIVERY_SELF:
|
||||
return static::DELIVERY_TYPE_SELF;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return static::DELIVERY_TYPE_EXPRESS;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
11
app/common/enum/OrderGoodsEnum.php
Normal file
11
app/common/enum/OrderGoodsEnum.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
class OrderGoodsEnum
|
||||
{
|
||||
//订单商品退款状态
|
||||
const REFUND_STATUS_NO = 0;//未申请退款
|
||||
const REFUND_STATUS_APPLY = 1;//申请退款
|
||||
const REFUND_STATUS_WAIT = 2;//等待退款
|
||||
const REFUND_STATUS_SUCCESS = 3;//退款成功
|
||||
}
|
||||
115
app/common/enum/OrderInvoiceEnum.php
Normal file
115
app/common/enum/OrderInvoiceEnum.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class OrderInvoiceEnum
|
||||
{
|
||||
/**
|
||||
* 发票类型
|
||||
* TYPE_NORMAL 普通
|
||||
* TYPE_SPEC 专用
|
||||
*/
|
||||
const TYPE_NORMAL = 0;
|
||||
const TYPE_SPEC = 1;
|
||||
|
||||
/**
|
||||
* 抬头类型
|
||||
* HEADER_TYPE_PERSONAL 个人
|
||||
* HEADER_TYPE_COMPANY 企业
|
||||
*/
|
||||
const HEADER_TYPE_PERSONAL = 0;
|
||||
const HEADER_TYPE_COMPANY = 1;
|
||||
|
||||
/**
|
||||
* 开票状态
|
||||
* STATUS_NO 未开票
|
||||
* STATUS_NO 已开票
|
||||
*/
|
||||
const STATUS_NO = 0;
|
||||
const STATUS_YES = 1;
|
||||
|
||||
/**
|
||||
* @notes 获取状态描述
|
||||
* @param bool $status
|
||||
* @return bool|mixed|string
|
||||
* @author 段誉
|
||||
* @date 2022/4/11 18:55
|
||||
*/
|
||||
public static function getStatusDesc($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::STATUS_NO => '未开票',
|
||||
self::STATUS_YES => '已开票',
|
||||
];
|
||||
|
||||
if ($status === true) {
|
||||
return $status;
|
||||
}
|
||||
|
||||
return isset($desc[$status]) ? $desc[$status] : $status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取类型描述
|
||||
* @param bool $type
|
||||
* @return bool|mixed|string
|
||||
* @author 段誉
|
||||
* @date 2022/4/12 9:14
|
||||
*/
|
||||
public static function getTypeDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_NORMAL => '电子普通发票',
|
||||
self::TYPE_SPEC => '专用发票',
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $type;
|
||||
}
|
||||
|
||||
return isset($desc[$type]) ? $desc[$type] : $type;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取抬头类型描述
|
||||
* @param bool $type
|
||||
* @return bool|mixed|string
|
||||
* @author 段誉
|
||||
* @date 2022/4/12 9:14
|
||||
*/
|
||||
public static function getHeaderTypeTextDesc($type = true)
|
||||
{
|
||||
$desc = [
|
||||
self::HEADER_TYPE_PERSONAL => '个人',
|
||||
self::HEADER_TYPE_COMPANY => '企业',
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $type;
|
||||
}
|
||||
|
||||
return isset($desc[$type]) ? $desc[$type] : $type;
|
||||
}
|
||||
|
||||
}
|
||||
56
app/common/enum/OrderLogEnum.php
Normal file
56
app/common/enum/OrderLogEnum.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
class OrderLogEnum
|
||||
{
|
||||
//操作人类型
|
||||
const TYPE_USER = 0;//会员
|
||||
const TYPE_SHOP = 1;//门店
|
||||
const TYPE_SYSTEM = 2;//系统
|
||||
|
||||
//订单动作
|
||||
const USER_ADD_ORDER = 101;//提交订单
|
||||
const USER_CANCEL_ORDER = 102;//取消订单
|
||||
const USER_DEL_ORDER = 103;//删除订单
|
||||
const USER_CONFIRM_ORDER = 104;//确认收货
|
||||
const USER_PAID_ORDER = 105;//支付订单
|
||||
|
||||
const SHOP_CANCEL_ORDER = 201;//商家取消订单
|
||||
const SHOP_DEL_ORDER = 202;//商家删除订单
|
||||
const SHOP_DELIVERY_ORDER = 203;//商家发货
|
||||
const SHOP_CONFIRM_ORDER = 204;//商家确认收货
|
||||
const SHOP_VERIFICATION = 205;//商家提货核销
|
||||
|
||||
const SYSTEM_CANCEL_ORDER = 301;//系统取消订单
|
||||
const SYSTEM_CONFIRM_ORDER = 302;//系统确认订单
|
||||
|
||||
//订单动作明细
|
||||
public static function getLogDesc($log)
|
||||
{
|
||||
$desc = [
|
||||
OrderLogEnum::USER_ADD_ORDER => '会员提交订单',
|
||||
OrderLogEnum::USER_CANCEL_ORDER => '会员取消订单',
|
||||
OrderLogEnum::USER_DEL_ORDER => '会员删除订单',
|
||||
OrderLogEnum::USER_CONFIRM_ORDER => '会员确认收货',
|
||||
OrderLogEnum::USER_PAID_ORDER => '会员支付订单',
|
||||
|
||||
OrderLogEnum::SHOP_CANCEL_ORDER => '商家取消订单',
|
||||
OrderLogEnum::SHOP_DEL_ORDER => '商家删除订单',
|
||||
OrderLogEnum::SHOP_DELIVERY_ORDER => '商家发货',
|
||||
OrderLogEnum::SHOP_CONFIRM_ORDER => '商家确认收货',
|
||||
OrderLogEnum::SHOP_VERIFICATION => '商家提货核销',
|
||||
|
||||
OrderLogEnum::SYSTEM_CANCEL_ORDER => '系统取消订单',
|
||||
OrderLogEnum::SYSTEM_CONFIRM_ORDER => '系统确认订单',
|
||||
];
|
||||
|
||||
if ($log === true) {
|
||||
return $desc;
|
||||
}
|
||||
|
||||
return isset($desc[$log]) ? $desc[$log] : $log;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
42
app/common/enum/OrderRefundEnum.php
Normal file
42
app/common/enum/OrderRefundEnum.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 退款订单相关 枚举类型
|
||||
* Class OrderRefundEnum
|
||||
* @Author ISH
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class OrderRefundEnum
|
||||
{
|
||||
//退款状态refund_status
|
||||
const REFUND_STATUS_ING = 0;//退款中
|
||||
const REFUND_STATUS_COMPLETE = 1;//退款完成
|
||||
const REFUND_STATUS_FAIL = 2;//退款失败
|
||||
const REFUND_STATUS_ABNORMAL = 3;//退款异常
|
||||
|
||||
|
||||
|
||||
//退款方式
|
||||
const REFUND_WAY_ORIGINAL = 1;//原路退回
|
||||
const REFUND_WAY_BALANCE = 2;//退回余额
|
||||
}
|
||||
85
app/common/enum/PayEnum.php
Normal file
85
app/common/enum/PayEnum.php
Normal file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 支付
|
||||
* Class PayEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class PayEnum
|
||||
{
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
const WECHAT_PAY = 1; //微信支付
|
||||
const ALI_PAY = 2; //支付宝支付
|
||||
const BALANCE_PAY = 3; //余额支付
|
||||
const OFFLINE_PAY = 4; //线下支付
|
||||
// 汇付斗拱微信
|
||||
const HFDG_WECHAT = 55;
|
||||
// 汇付斗拱支付宝
|
||||
const HFDG_ALIPAY = 66;
|
||||
|
||||
const UNPAID = 0;//待支付
|
||||
const ISPAID = 1;//已支付
|
||||
const REFUNDED = 2;//已退款
|
||||
const REFUSED_REFUND = 3;//拒绝退款
|
||||
|
||||
|
||||
/**
|
||||
* Notes: 支付方式
|
||||
* @param bool $type
|
||||
* @author 段誉(2021/5/7 15:01)
|
||||
* @return array|string
|
||||
*/
|
||||
public static function getPayWay($type = true)
|
||||
{
|
||||
$data = [
|
||||
self::WECHAT_PAY => '微信支付',
|
||||
self::ALI_PAY => '支付宝支付',
|
||||
self::BALANCE_PAY => '余额支付',
|
||||
self::OFFLINE_PAY => '线下支付',
|
||||
self::HFDG_WECHAT => '汇付斗拱(微信)',
|
||||
self::HFDG_ALIPAY => '汇付斗拱(支付宝)',
|
||||
];
|
||||
if (true === $type) {
|
||||
return $data;
|
||||
}
|
||||
return $data[$type] ?? '-';
|
||||
}
|
||||
|
||||
|
||||
//支付状态
|
||||
public static function getPayStatus($type)
|
||||
{
|
||||
$data = [
|
||||
PayEnum::UNPAID => '待支付',
|
||||
PayEnum::ISPAID => '已支付',
|
||||
PayEnum::REFUNDED => '已退款',
|
||||
PayEnum::REFUSED_REFUND => '拒绝退款',
|
||||
];
|
||||
|
||||
if ($type === true) {
|
||||
return $data;
|
||||
}
|
||||
return $data[$type] ?? '未知';
|
||||
}
|
||||
}
|
||||
47
app/common/enum/PrinterEnum.php
Normal file
47
app/common/enum/PrinterEnum.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
/**
|
||||
* 小票打印机类型
|
||||
* Class PrinterEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class PrinterEnum {
|
||||
const LYL_PRINTER = 'YLYP';
|
||||
|
||||
/**
|
||||
* @notes 获取小票打印机列表
|
||||
* @param bool $from
|
||||
* @return array|mixed|string
|
||||
* @author cjhao
|
||||
* @date 2021/9/30 10:23
|
||||
*/
|
||||
public static function getPrinterDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::LYL_PRINTER => '易联云',
|
||||
];
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
11
app/common/enum/RechargeOrderEnum.php
Normal file
11
app/common/enum/RechargeOrderEnum.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
class RechargeOrderEnum
|
||||
{
|
||||
const WECHAT_PAY = 1; //微信支付
|
||||
const ALI_PAY = 2; //支付宝支付
|
||||
|
||||
const PAY_STATUS_NO_PAID = 0; //待支付
|
||||
const PAY_STATUS_PAID = 1; //已支付
|
||||
}
|
||||
101
app/common/enum/ShopAdEnum.php
Normal file
101
app/common/enum/ShopAdEnum.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
|
||||
class ShopAdEnum
|
||||
{
|
||||
// 移动端
|
||||
const TERMINAL_MOBILE = 1;
|
||||
// PC端
|
||||
const TERMINAL_PC = 2;
|
||||
|
||||
// 位置 店铺主页
|
||||
const PLACE_SHOP_HOME = 1;
|
||||
|
||||
static function getPlaceDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::PLACE_SHOP_HOME => '店铺主页',
|
||||
];
|
||||
|
||||
return $from === true ? $desc : ($desc[$from] ?? '');
|
||||
}
|
||||
|
||||
static function getTerminal($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TERMINAL_MOBILE => '移动端',
|
||||
self::TERMINAL_PC => 'PC端',
|
||||
];
|
||||
|
||||
return $from === true ? $desc : ($desc[$from] ?? '');
|
||||
}
|
||||
|
||||
static function getLinkPage(): array
|
||||
{
|
||||
return [
|
||||
// [
|
||||
// 'name' => '店铺信息',
|
||||
// 'list' => [
|
||||
// [
|
||||
// 'name' => '店铺页面',
|
||||
// 'type' => 'shop',
|
||||
// ],
|
||||
// ],
|
||||
// ],
|
||||
[
|
||||
'name' => '商品信息',
|
||||
'list' => [
|
||||
[
|
||||
'name' => '商品列表',
|
||||
'type' => 'goods',
|
||||
],
|
||||
// [
|
||||
// 'name' => '商品分类',
|
||||
// 'type' => 'goods_category',
|
||||
// ],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
static function getShopLinkPaths(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
'name' => '店铺首页',
|
||||
'path' => '/pages/store_index/store_index',
|
||||
],
|
||||
[
|
||||
'name' => '店铺信息',
|
||||
'path' => '/pages/store_detail/store_detail',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
static function getShopGoodsListPath(): string
|
||||
{
|
||||
return '/pages/goods_details/goods_details';
|
||||
}
|
||||
|
||||
static function getShopGoodsCategoryPath(): string
|
||||
{
|
||||
return '/pages/store_index/store_index';
|
||||
}
|
||||
}
|
||||
213
app/common/enum/ShopEnum.php
Normal file
213
app/common/enum/ShopEnum.php
Normal file
@ -0,0 +1,213 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class ShopEnum
|
||||
{
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
const AUDIT_STATUS_STAY = 1; //待审核
|
||||
const AUDIT_STATUS_OK = 2; //审核通过
|
||||
const AUDIT_STATUS_REFUSE = 3; //审核拒绝
|
||||
|
||||
/**
|
||||
* 商家类型
|
||||
*/
|
||||
const SHOP_TYPE_SELF = 1; //官方自营
|
||||
const SHOP_TYPE_IN = 2; //入驻商家
|
||||
|
||||
/**
|
||||
* 营业状态
|
||||
*/
|
||||
const SHOP_RUN_CLOSE = 0; //暂停营业
|
||||
const SHOP_RUN_OPEN = 1; //营业中
|
||||
|
||||
/**
|
||||
* 冻结状态
|
||||
*/
|
||||
const SHOP_FREEZE_NORMAL = 0; //正常
|
||||
const SHOP_FREEZE_BAN = 1; //冻结
|
||||
|
||||
/**
|
||||
* 产品审核
|
||||
*/
|
||||
const PRODUCT_AUDIT_FALSE = 0; //关闭
|
||||
const PRODUCT_AUDIT_TRUE = 1; //开启
|
||||
|
||||
/**
|
||||
* 店铺推荐
|
||||
*/
|
||||
const SHOP_RECOMMEND_FALSE = 0; //不推荐
|
||||
const SHOP_RECOMMEND_TRUE = 1; //推荐
|
||||
|
||||
/**
|
||||
* 商家默认logo、背景图、PC端店铺封面、PC端店铺头图
|
||||
*/
|
||||
const DEFAULT_LOGO = '/static/common/image/default/shop_default_logo.png';
|
||||
const DEFAULT_BG = '/static/common/image/default/shop_default_bg.jpg';
|
||||
const DEFAULT_COVER = '/static/common/image/default/shop_default_cover.png';
|
||||
const DEFAULT_BANNER = '/static/common/image/default/shop_default_banner.jpg';
|
||||
|
||||
/**
|
||||
* 背景图、PC端店铺封面、PC端店铺头图的示例图片
|
||||
*/
|
||||
const DOME_BG = '/static/common/image/default/shop_demo_background.png';
|
||||
const DOME_COVER = '/static/common/image/default/shop_demo_cover.png';
|
||||
const DOME_BANNER = '/static/common/image/default/shop_demo_banner.png';
|
||||
|
||||
|
||||
/**
|
||||
* 发票开关
|
||||
* INVOICE_CLOSE-关闭
|
||||
* INVOICE_OPEN- 开启
|
||||
*/
|
||||
const INVOICE_CLOSE = 0;
|
||||
const INVOICE_OPEN = 1;
|
||||
|
||||
/**
|
||||
* 发票是否支持专票
|
||||
* SPEC_INVOICE_NOT - 不支持
|
||||
* SPEC_INVOICE_SUPPORT - 不支持
|
||||
*/
|
||||
const SPEC_INVOICE_UNABLE = 0;
|
||||
const SPEC_INVOICE_ABLE = 1;
|
||||
|
||||
|
||||
/**
|
||||
* 商家支持的配送方式
|
||||
* DELIVERY_EXPRESS = 快递发货
|
||||
* DELIVERY_VIRTUAL = 线下自提
|
||||
*/
|
||||
const DELIVERY_EXPRESS = 1;
|
||||
const DELIVERY_SELF = 2;
|
||||
|
||||
|
||||
/**
|
||||
* NOTE: 审核状态
|
||||
* @author: 张无忌
|
||||
* @param bool $form
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getAuditStatusDesc($form = true){
|
||||
$desc = [
|
||||
self::AUDIT_STATUS_STAY => '待审核',
|
||||
self::AUDIT_STATUS_OK => '审核通过',
|
||||
self::AUDIT_STATUS_REFUSE => '审核拒绝'
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: 商家类型
|
||||
* @author: 张无忌
|
||||
* @param bool $form
|
||||
* @return array|mixed|string
|
||||
*
|
||||
*/
|
||||
public static function getShopTypeDesc($form = true){
|
||||
$desc = [
|
||||
self::SHOP_TYPE_SELF => '官方自营',
|
||||
self::SHOP_TYPE_IN => '入驻商家',
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: 营业状态
|
||||
* @author: 张无忌
|
||||
* @param bool $form
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getShopIsRunDesc($form = true)
|
||||
{
|
||||
$desc = [
|
||||
self::SHOP_RUN_CLOSE => '暂停营业',
|
||||
self::SHOP_RUN_OPEN => '营业中',
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: 商家冻结状态
|
||||
* @author: 张无忌
|
||||
* @param bool $form
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getShopFreezeDesc($form = true) {
|
||||
$desc = [
|
||||
self::SHOP_FREEZE_NORMAL => '正常',
|
||||
self::SHOP_FREEZE_BAN => '冻结',
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* NOTE: 商家推荐状态
|
||||
* @author: 张无忌
|
||||
* @param bool $form
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getShopIsRecommendDesc($form = true) {
|
||||
$desc = [
|
||||
self::SHOP_RECOMMEND_TRUE => '推荐',
|
||||
self::SHOP_RECOMMEND_FALSE => '不推荐',
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 支持的配送方式
|
||||
* @param bool $form
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/11/1 11:19
|
||||
*/
|
||||
public static function getDeliveryTypeDesc($form = true)
|
||||
{
|
||||
$desc = [
|
||||
self::DELIVERY_EXPRESS => '快递发货',
|
||||
self::DELIVERY_SELF => '线下自提',
|
||||
];
|
||||
if(true === $form){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$form] ?? '';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
69
app/common/enum/ShopWithdrawEnum.php
Normal file
69
app/common/enum/ShopWithdrawEnum.php
Normal file
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
|
||||
class ShopWithdrawEnum
|
||||
{
|
||||
const TYPE_BANK = 0;
|
||||
const TYPE_ALIPAY = 10;
|
||||
|
||||
const TYPE_ARR = [
|
||||
self::TYPE_BANK,
|
||||
self::TYPE_ALIPAY,
|
||||
];
|
||||
|
||||
const TYPE_TEXT_ARR = [
|
||||
self::TYPE_BANK => '银行卡',
|
||||
self::TYPE_ALIPAY => '支付宝',
|
||||
];
|
||||
|
||||
const TYPE_TEXT_ARR2 = [
|
||||
[
|
||||
self::TYPE_BANK,
|
||||
'银行卡'
|
||||
],
|
||||
[
|
||||
self::TYPE_ALIPAY,
|
||||
'支付宝'
|
||||
],
|
||||
];
|
||||
|
||||
static function getTypeText($from = true){
|
||||
$desc = static::TYPE_TEXT_ARR;
|
||||
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
|
||||
static function type_text_arr3(array $types) : array
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach (static::TYPE_TEXT_ARR2 as $item) {
|
||||
if (in_array($item[0], $types)) {
|
||||
$result[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
45
app/common/enum/SmsEnum.php
Normal file
45
app/common/enum/SmsEnum.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class SmsEnum
|
||||
{
|
||||
/**
|
||||
* 短信发送状态
|
||||
*/
|
||||
const SEND_ING = 0;
|
||||
const SEND_SUCCESS = 1;
|
||||
const SEND_FAIL = 2;
|
||||
|
||||
public static function getSendStatusDesc($from)
|
||||
{
|
||||
$desc = [
|
||||
self::SEND_ING => '发送中',
|
||||
self::SEND_SUCCESS => '发送成功',
|
||||
self::SEND_FAIL => '发送失败',
|
||||
];
|
||||
if ($from === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
}
|
||||
87
app/common/enum/TeamEnum.php
Normal file
87
app/common/enum/TeamEnum.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class TeamEnum
|
||||
{
|
||||
/**
|
||||
* 团的状态
|
||||
*/
|
||||
const TEAM_STATUS_START = 1; //进行中
|
||||
const TEAM_STATUS_STOP = 0; //已停止
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
const TEAM_AUDIT_WAIT = 0; //等待审核
|
||||
const TEAM_AUDIT_SUCCESS = 1; //审核通过
|
||||
const TEAM_AUDIT_REFUSE = 2; //审核拒绝
|
||||
|
||||
/**
|
||||
* 拼团状态
|
||||
*/
|
||||
const TEAM_STATUS_CONDUCT = 0; //进行中
|
||||
const TEAM_STATUS_SUCCESS = 1; //拼团成功
|
||||
const TEAM_STATUS_FAIL = 2; //拼团失败
|
||||
|
||||
/**
|
||||
* @Notes: 获取团活动状态
|
||||
* @Author: 张无忌
|
||||
* @param $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getTeamStatusDesc($type)
|
||||
{
|
||||
$desc = [
|
||||
self::TEAM_STATUS_START => '进行中',
|
||||
self::TEAM_STATUS_STOP => '已停止',
|
||||
];
|
||||
|
||||
if ($type === true){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 审核状态
|
||||
* @Author: 张无忌
|
||||
* @param $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getTeamAuditDesc($type)
|
||||
{
|
||||
$desc = [
|
||||
self::TEAM_AUDIT_WAIT => '待审核',
|
||||
self::TEAM_AUDIT_SUCCESS => '审核通过',
|
||||
self::TEAM_AUDIT_REFUSE => '审核拒绝',
|
||||
];
|
||||
|
||||
if ($type === true){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
/**
|
||||
* @Notes: 拼团状态
|
||||
* @Author: 张无忌
|
||||
* @param $type
|
||||
* @return array|mixed|string
|
||||
*/
|
||||
public static function getStatusDesc($type)
|
||||
{
|
||||
$desc = [
|
||||
self::TEAM_STATUS_CONDUCT => '拼购中',
|
||||
self::TEAM_STATUS_SUCCESS => '拼团成功',
|
||||
self::TEAM_STATUS_FAIL => '拼团失败',
|
||||
];
|
||||
|
||||
if ($type === true){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$type] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
26
app/common/enum/TreatyEnum.php
Normal file
26
app/common/enum/TreatyEnum.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class TreatyEnum
|
||||
{
|
||||
const SHOP_ENTER_TYPE = 10; // 入驻协议
|
||||
}
|
||||
45
app/common/enum/VerificationEnum.php
Normal file
45
app/common/enum/VerificationEnum.php
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
/**
|
||||
* 自提核销
|
||||
* Class VerificationEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class VerificationEnum
|
||||
{
|
||||
//操作人类型
|
||||
const TYPE_SYSTEM = 0;//系统
|
||||
const TYPE_SHOP = 1;//管理员
|
||||
|
||||
//操作人类型
|
||||
public static function getVerificationScene($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_SYSTEM => '系统',
|
||||
self::TYPE_SHOP => '商家',
|
||||
];
|
||||
if ($status === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status] ?? '未知';
|
||||
}
|
||||
}
|
||||
141
app/common/enum/WechatErrorEnum.php
Normal file
141
app/common/enum/WechatErrorEnum.php
Normal file
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\common\enum;
|
||||
/**
|
||||
* 微信错误信息枚举类
|
||||
* Class WechatErrorEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class WechatErrorEnum
|
||||
{
|
||||
//公共错误码
|
||||
const COMMONCODE = [
|
||||
40001 => '无效accesstoken',
|
||||
40014 => '无效accesstoken',
|
||||
41001 => 'accesstoken不存在',
|
||||
42001 => 'accesstoken过期',
|
||||
45009 => '天级别频率限制,2种解决途径2选1: 1.到小程序mp-开发管理 - 接口设置 - 调用额度重置;2.调用限频重置API',
|
||||
47001 => '非 json 请求',
|
||||
61007 => '小程序尚未将对应的权限集授权给第三方平台',
|
||||
61004 => '第三方平台出口 IP 未设置',
|
||||
40066 => 'api的 url 不存在(一般情况下填错了)',
|
||||
48001 => '小程序未获得该接口权限',
|
||||
87014 => '存在违规内容',
|
||||
300000 => '瞬时请求频率过高,请降低频率重试',
|
||||
990001 => 'OPENID非法',
|
||||
990002 => 'OPENID非法',
|
||||
990004 => 'OPENID缺失',
|
||||
990005 => 'page_size超过上限',
|
||||
990007 => '参数缺失',
|
||||
990008 => '参数过长',
|
||||
990009 => '开始时间比结束时间大',
|
||||
990010 => '系统繁忙,请稍后重试',
|
||||
];
|
||||
//小程序直播错误码
|
||||
const LIVECODE = [
|
||||
-1 =>'系统错误',
|
||||
1 => '未创建直播间',
|
||||
1003 => '商品id不存在',
|
||||
47001 => '入参格式不符合规范',
|
||||
200002 => '入参错误',
|
||||
300001 => '禁止创建/更新商品 或 禁止编辑&更新房间',
|
||||
300002 => '名称长度不符合规则',
|
||||
300003 => '价格输入不合规(如:现价比原价大、传入价格非数字等)',
|
||||
300004 => '商品名称存在违规违法内容',
|
||||
300005 => '商品图片存在违规违法内容',
|
||||
300006 => '图片上传失败(如:mediaID过期)',
|
||||
300007 => '线上小程序版本不存在该链接',
|
||||
300008 => '添加商品失败',
|
||||
300009 => '商品审核撤回失败',
|
||||
300010 => '商品审核状态不对(如:商品审核中)',
|
||||
300011 => '操作非法(API不允许操作非 API 创建的商品)',
|
||||
300012 => '没有提审额度(每天500次提审额度)',
|
||||
300013 => '提审失败',
|
||||
300014 => '审核中,无法删除',
|
||||
300018 => '商品图片尺寸过大',
|
||||
300021 => '商品添加成功,审核失败',
|
||||
300022 => '此房间号不存在',
|
||||
300023 => '房间状态 拦截(当前房间状态不允许此操作)',
|
||||
300024 => '商品不存在',
|
||||
300025 => '商品审核未通过',
|
||||
300026 => '房间商品数量已经满额',
|
||||
300027 => '导入商品失败',
|
||||
300028 => '房间名称违规',
|
||||
300029 => '主播昵称违规',
|
||||
300030 => '主播昵称违规',
|
||||
300031 => '直播间封面图不合规',
|
||||
300032 => '直播间分享图违规',
|
||||
300033 => '添加商品超过直播间上限',
|
||||
300034 => '主播微信昵称长度不符合要求',
|
||||
300035 => '主播微信号不存在',
|
||||
300036 => '主播微信号未实名认证',
|
||||
300037 => '购物直播频道封面图不合规',
|
||||
300038 => '未在小程序管理后台配置客服',
|
||||
300039 => '主播副号微信号不合法',
|
||||
300040 => '名称含有非限定字符(含有特殊字符)',
|
||||
300041 => '创建者微信号不合法',
|
||||
300042 => '推流中禁止编辑房间',
|
||||
300043 => '每天只允许一场直播开启关注',
|
||||
300044 => '商品没有讲解视频',
|
||||
300045 => '讲解视频未生成',
|
||||
300046 => '讲解视频生成失败',
|
||||
300047 => '已有商品正在推送,请稍后再试',
|
||||
300048 => '拉取商品列表失败',
|
||||
300049 => '商品推送过程中不允许上下架',
|
||||
300050 => '排序商品列表为空',
|
||||
300051 => '解析 JSON 出错',
|
||||
300052 => '已下架的商品无法推送',
|
||||
300053 => '直播间未添加此商品',
|
||||
500001 => '副号不合规',
|
||||
500002 => '副号未实名',
|
||||
500003 => '已经设置过副号了,不能重复设置',
|
||||
500004 => '不能设置重复的副号',
|
||||
500005 => '副号不能和主号重复',
|
||||
600001 => '用户已被添加为小助手',
|
||||
600002 => '找不到用户',
|
||||
9410000 => '直播间列表为空',
|
||||
9410001 => '获取房间失败',
|
||||
9410002 => '获取商品失败',
|
||||
9410003 => '获取回放失败',
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* @notes 获取微信的错误信息
|
||||
* @param bool $from
|
||||
* @return array|mixed|string
|
||||
* @throws \ReflectionException
|
||||
* @author cjhao
|
||||
* @date 2022/6/9 16:42
|
||||
*/
|
||||
public static function wechatErrorMessage($from = true)
|
||||
{
|
||||
//通过反射拿当前的常量
|
||||
$constantsList = (new \ReflectionClass(__CLASS__))->getConstants();
|
||||
$errorList = [];
|
||||
foreach ($constantsList as $constant) {
|
||||
$errorList = $errorList + $constant;
|
||||
}
|
||||
if (true === $from) {
|
||||
return $errorList;
|
||||
}
|
||||
return $errorList[$from] ?? '';
|
||||
}
|
||||
|
||||
}
|
||||
59
app/common/enum/WithdrawEnum.php
Normal file
59
app/common/enum/WithdrawEnum.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class WithdrawEnum
|
||||
{
|
||||
//提现类型
|
||||
const TYPE_BALANCE = 1; // 提现到钱包余额
|
||||
const TYPE_WECHAT_CHANGE = 2; // 提现到微信零钱
|
||||
const TYPE_WECHAT_CODE = 3; // 提现到微信收款码
|
||||
const TYPE_ALI_CODE = 4; // 提现到支付宝收款码
|
||||
const TYPE_BANK = 5; // 提现到银行卡
|
||||
|
||||
//提现状态
|
||||
const STATUS_WAIT = 1; // 待提现
|
||||
const STATUS_ING = 2; // 提现中
|
||||
const STATUS_SUCCESS = 3; // 提现成功
|
||||
const STATUS_FAIL = 4; //提现失败
|
||||
|
||||
//提现到微信零钱 是否待收款
|
||||
static function wechatChangeIsWaitReceive($data)
|
||||
{
|
||||
return intval($data['status'] == self::STATUS_ING && $data['type'] == self::TYPE_WECHAT_CHANGE);
|
||||
}
|
||||
|
||||
//提现状态
|
||||
public static function getStatusDesc($status = true, $data = [])
|
||||
{
|
||||
$desc = [
|
||||
self::STATUS_WAIT => '待提现',
|
||||
self::STATUS_ING => '提现中',
|
||||
self::STATUS_SUCCESS => '提现成功',
|
||||
self::STATUS_FAIL => '提现失败'
|
||||
];
|
||||
if (isset($data['type']) && $data['type'] == static::TYPE_WECHAT_CHANGE) {
|
||||
$desc[self::STATUS_ING] = '待收款';
|
||||
}
|
||||
if ($status === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status] ?? '';
|
||||
}
|
||||
|
||||
//提现类型
|
||||
public static function getTypeDesc($status = true)
|
||||
{
|
||||
$desc = [
|
||||
self::TYPE_BALANCE => '钱包余额',
|
||||
self::TYPE_WECHAT_CHANGE => '微信零钱',
|
||||
self::TYPE_BANK => '银行卡',
|
||||
self::TYPE_WECHAT_CODE => '微信收款码',
|
||||
self::TYPE_ALI_CODE => '支付宝收款码',
|
||||
];
|
||||
if ($status === true) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$status] ?? '';
|
||||
}
|
||||
}
|
||||
32
app/common/enum/WithdrawalEnum.php
Normal file
32
app/common/enum/WithdrawalEnum.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\common\enum;
|
||||
|
||||
|
||||
class WithdrawalEnum
|
||||
{
|
||||
const APPLY_STATUS = 0; //申请中
|
||||
const HANDLE_STATUS = 1; //提现中
|
||||
const SUCCESS_STATUS = 2; //提现成功
|
||||
const ERROR_STATUS = 3; //提现失败
|
||||
|
||||
/**
|
||||
* @Notes: 获取提现状态文案
|
||||
* @Author: 张无忌
|
||||
* @param bool $from
|
||||
* @return array|mixed
|
||||
*/
|
||||
public static function getStatusDesc($from = true){
|
||||
$desc = [
|
||||
self::APPLY_STATUS => '待提现',
|
||||
self::HANDLE_STATUS => '提现中',
|
||||
self::SUCCESS_STATUS => '提现成功',
|
||||
self::ERROR_STATUS => '提现失败',
|
||||
];
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user