初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

32
server/config/app.php Executable file
View File

@@ -0,0 +1,32 @@
<?php
// +----------------------------------------------------------------------
// | 应用设置
// +----------------------------------------------------------------------
return [
// 应用地址
'app_host' => env('app.host', ''),
// 应用的命名空间
'app_namespace' => '',
// 是否启用路由
'with_route' => true,
// 默认应用
'default_app' => 'index',
// 默认时区
'default_timezone' => 'Asia/Shanghai',
// 应用映射(自动多应用模式有效)
'app_map' => [],
// 域名绑定(自动多应用模式有效)
'domain_bind' => [],
// 禁止URL访问的应用列表自动多应用模式有效
'deny_app_list' => [],
// 异常页面的模板文件
'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
// 错误显示信息,非调试模式有效
'error_message' => '页面错误!请稍后再试~',
// 显示错误信息
'show_error_msg' => false,
];

37
server/config/cache.php Executable file
View File

@@ -0,0 +1,37 @@
<?php
// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
return [
// 默认缓存驱动
'default' => env('cache.driver', 'file'),
// 缓存连接方式配置
'stores' => [
'file' => [
// 驱动方式
'type' => 'File',
// 缓存保存目录
'path' => '',
// 缓存前缀
'prefix' => '',
// 缓存有效期 0表示永久缓存
'expire' => 0,
// 缓存标签前缀
'tag_prefix' => 'tag:',
// 序列化机制 例如 ['serialize', 'unserialize']
'serialize' => [],
],
// redis缓存
'redis' => [
// 驱动方式
'type' => 'redis',
// 服务器地址
'host' => env('cache.host','like-redis'),
//端口
'port' => env('cache.port','6379'),
],
],
];

25
server/config/console.php Executable file
View File

@@ -0,0 +1,25 @@
<?php
// +----------------------------------------------------------------------
// | 控制台配置
// +----------------------------------------------------------------------
return [
// 指令定义
'commands' => [
// 定时任务
'crontab' => 'app\common\command\Crontab',
// 修改超级管理员密码
'password' => 'app\common\command\Password',
// 关闭超时未付款订单
'order_close' => 'app\common\command\OrderClose',
// 关闭超过预约时间的订单
'appoint_order_close' => 'app\common\command\AppointOrderClose',
// 订单退款
'order_refund' => 'app\common\command\OrderRefund',
// 订单退款查询
'order_refund_query' => 'app\common\command\OrderRefundQuery',
'settle_order' => 'app\common\command\SettleOrder',
'map_key_reset' => 'app\common\command\MapKeyReset',
'order_abnormal_notice' => 'app\common\command\OrderAbnormalNotice',
'order_comment' => 'app\common\command\OrderComment'
],
];

20
server/config/cookie.php Executable file
View File

@@ -0,0 +1,20 @@
<?php
// +----------------------------------------------------------------------
// | Cookie设置
// +----------------------------------------------------------------------
return [
// cookie 保存时间
'expire' => 0,
// cookie 保存路径
'path' => '/',
// cookie 有效域名
'domain' => '',
// cookie 启用安全传输
'secure' => false,
// httponly设置
'httponly' => false,
// 是否使用 setcookie
'setcookie' => true,
// samesite 设置,支持 'strict' 'lax'
'samesite' => '',
];

63
server/config/database.php Executable file
View File

@@ -0,0 +1,63 @@
<?php
return [
// 默认使用的数据库连接配置
'default' => env('database.driver', 'mysql'),
// 自定义时间查询规则
'time_query_rule' => [],
// 自动写入时间戳字段
// true为自动识别类型 false关闭
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
'auto_timestamp' => true,
// 时间字段取出后的默认时间格式
'datetime_format' => 'Y-m-d H:i:s',
// 时间字段配置 配置格式create_time,update_time
'datetime_field' => '',
// 数据库连接配置信息
'connections' => [
'mysql' => [
// 数据库类型
'type' => env('database.type', 'mysql'),
// 服务器地址
'hostname' => env('database.hostname', 'likeshop-mysql'),
// 数据库名
'database' => env('database.database', 'localhost_likeadmin'),
// 用户名
'username' => env('database.username', 'root'),
// 密码
'password' => env('database.password', 'root'),
// 端口
'hostport' => env('database.hostport', '3306'),
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => env('database.charset', 'utf8mb4'),
// 数据库表前缀
'prefix' => env('database.prefix', 'ls_'),
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
'rw_separate' => false,
// 读写分离后 主服务器数量
'master_num' => 1,
// 指定从服务器序号
'slave_no' => '',
// 是否严格检查字段是否存在
'fields_strict' => true,
// 是否需要断线重连
'break_reconnect' => false,
// 监听SQL
'trigger_sql' => env('app_debug', true),
// 开启字段缓存
'fields_cache' => false,
],
// 更多的数据库配置信息
],
];

24
server/config/filesystem.php Executable file
View File

@@ -0,0 +1,24 @@
<?php
return [
// 默认磁盘
'default' => env('filesystem.driver', 'local'),
// 磁盘列表
'disks' => [
'local' => [
'type' => 'local',
'root' => app()->getRuntimePath() . 'storage',
],
'public' => [
// 磁盘类型
'type' => 'local',
// 磁盘路径
'root' => app()->getRootPath() . 'public/storage',
// 磁盘路径对应的外部URL路径
'url' => '/storage',
// 可见性
'visibility' => 'public',
],
// 更多的磁盘配置信息
],
];

27
server/config/lang.php Executable file
View File

@@ -0,0 +1,27 @@
<?php
// +----------------------------------------------------------------------
// | 多语言设置
// +----------------------------------------------------------------------
return [
// 默认语言
'default_lang' => env('lang.default_lang', 'zh-cn'),
// 允许的语言列表
'allow_lang_list' => [],
// 多语言自动侦测变量名
'detect_var' => 'lang',
// 是否使用Cookie记录
'use_cookie' => true,
// 多语言cookie变量
'cookie_var' => 'think_lang',
// 多语言header变量
'header_var' => 'think-lang',
// 扩展语言包
'extend_list' => [],
// Accept-Language转义为对应语言包名称
'accept_language' => [
'zh-hans-cn' => 'zh-cn',
],
// 是否支持语言分组
'allow_group' => false,
];

45
server/config/log.php Executable file
View File

@@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | 日志设置
// +----------------------------------------------------------------------
return [
// 默认日志记录通道
'default' => env('log.channel', 'file'),
// 日志记录级别
'level' => [],
// 日志类型记录的通道 ['error'=>'email',...]
'type_channel' => [],
// 关闭全局日志写入
'close' => false,
// 全局日志处理 支持闭包
'processor' => null,
// 日志通道列表
'channels' => [
'file' => [
// 日志记录方式
'type' => 'File',
// 日志保存目录
'path' => '',
// 单文件日志写入
'single' => false,
// 独立日志级别
'apart_level' => [],
// 最大日志文件数量
'max_files' => 0,
// 使用JSON格式记录
'json' => false,
// 日志处理
'processor' => null,
// 关闭通道日志写入
'close' => false,
// 日志输出格式化
'format' => '[%s][%s] %s',
// 是否实时写入
'realtime_write' => false,
],
// 其它日志通道配置
],
];

8
server/config/middleware.php Executable file
View File

@@ -0,0 +1,8 @@
<?php
// 中间件配置
return [
// 别名或分组
'alias' => [],
// 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
'priority' => [],
];

138
server/config/project.php Executable file
View File

@@ -0,0 +1,138 @@
<?php
return [
// 系统版本号
'version' => '1.3.9',
// 官网
'website' => [
'name' => env('project.web_name', 'likeshop上门按摩'), // 网站名称
'url' => env('project.web_url', 'www.likeshop.cn/'), // 网站地址
'login_image' => 'resource/image/adminapi/default/web_login_image.png',//登录页图片
'web_logo' => 'resource/image/adminapi/default/web_logo.png', // 网站logo
'web_favicon' => 'resource/image/adminapi/default/web_favicon.ico', // 网站图标
'shop_name' => 'likeshop上门按摩', // 商城名称
'shop_logo' => 'resource/image/adminapi/default/shop_logo.png', // 商城图标
],
// 唯一标识,密码盐、路径加密等
'unique_identification' => env('project.unique_identification', 'likeadmin'),
// 后台管理员token登录令牌配置
'admin_token' => [
'expire_duration' => 3600 * 8,//管理后台token过期时长(单位秒)
'be_expire_duration' => 3600,//管理后台token临时过期前时长自动续期
],
// 商城用户token登录令牌配置
'user_token' => [
'expire_duration' => 3600 * 24 * 7,//用户token过期时长(单位秒)
'be_expire_duration' => 3600,//用户token临时过期前时长自动续期
],
// 技师用户token登录令牌配置
'coach_user_token' => [
'expire_duration' => 3600 * 24 * 7,//用户token过期时长(单位秒)
'be_expire_duration' => 3600,//用户token临时过期前时长自动续期
],
// 列表页
'lists' => [
'page_size_max' => 25000,//列表页查询数量限制(列表页每页数量、导出每页数量)
'page_size' => 25, //默认每页数量
],
// 各种默认图片
'default_image' => [
'admin_avatar' => 'resource/image/adminapi/default/avatar.png',
'admin_ad' => 'resource/image/adminapi/default/ad.png',//广告
'admin_goods_category' => 'resource/image/adminapi/default/goods_category.png',//服务分类
'admin_goods_lists' => 'resource/image/adminapi/default/goods_lists.png',//服务列表
'admin_index_decorate' => 'resource/image/adminapi/default/index_decorate.png',//首页装修
'admin_order' => 'resource/image/adminapi/default/order.png',//订单列表
'admin_staff' => 'resource/image/adminapi/default/staff.png',//师傅列表
'admin_news_notice' => 'resource/image/adminapi/default/news_notice.png',//信息通知
'admin_set_payment' => 'resource/image/adminapi/default/set_payment.png',//支付配置
'user_avatar' => 'resource/image/api/default/avatar.png',//默认用户头像
'default_coach_avatar' => 'resource/image/coachapi/default/avatar.png',//默认技师头像
'default_shop_avatar' => 'resource/image/shopapi/default/avatar.png',//默认商家头像
],
// 文件上传限制 (图片)
'file_image' => [
'jpg', 'png', 'gif', 'jpeg', 'webp'
],
// 文件上传限制 (视频)
'file_video' => [
'wmv', 'avi', 'mpg', 'mpeg', '3gp', 'mov', 'mp4', 'flv', 'f4v', 'rmvb', 'mkv'
],
// 登录设置
'login' => [
// 登录方式1-账号密码登录2-手机短信验证码登录
'login_way' => ['1', '2'],
// 注册强制绑定手机 0-关闭 1-开启
'coerce_mobile' => 1,
// 第三方授权登录 0-关闭 1-开启
'third_auth' => 1,
// 微信授权登录 0-关闭 1-开启
'wechat_auth' => 1,
// qq授权登录 0-关闭 1-开启
'qq_auth' => 0,
// 登录政策协议 0-关闭 1-开启
'login_agreement' => 1,
],
// 后台装修
'decorate' => [
// 底部导航栏样式设置
'tabbar_style' => ['default_color' => '#999999', 'selected_color' => '#4173ff'],
],
// 产品code
'product_code' => 'ae14b739e75b1e7b8983b8e5eca3236a',
'check_domain' => 'https://server.likeshop.cn',
'order_setting' => [
//取消订单付款订单
'order_cancel_order' => 1,
//倒计时取消时间
'order_cancel_time' => 60,
//订单完成后多少天内评论
'over_time_comment' => 1,
//评论内容
'over_time_comment_content' => '此用户未填写评论内容',
],
'settle_setting' => [
//佣金结算方式
'commission_settle' => 1,
//结算周期
'commission_settle_cycle' => 1,
//按周期(按周期时候的月或者周)
'commission_settle_cycle_type' => 1,
//天
'commission_settle_cycle_day' => 1,
],
'server_setting' => [
//可提前预约天数
'advance_appoint' => 7,
//技师默认接单数量
'coach_order_limit' => 1,
//服务范围
'coach_server_scope' => 100,
//商家技师数量
'shop_coach_limit' => 1,
//商家订单数量
'shop_order_limit' => 1,
],
//提现设置
'withdraw' =>[
'way_list' => [1,2,3],
'min_money' => 10,
'max_money' => 100,
'service_charge' => 5,
'withdraw_cycle_type' => 1,
'withdraw_cycle_date' => 1,
]
];

45
server/config/route.php Executable file
View File

@@ -0,0 +1,45 @@
<?php
// +----------------------------------------------------------------------
// | 路由设置
// +----------------------------------------------------------------------
return [
// pathinfo分隔符
'pathinfo_depr' => '/',
// URL伪静态后缀
'url_html_suffix' => 'html',
// URL普通方式参数 用于自动生成
'url_common_param' => true,
// 是否开启路由延迟解析
'url_lazy_route' => false,
// 是否强制使用路由
'url_route_must' => false,
// 合并路由规则
'route_rule_merge' => false,
// 路由是否完全匹配
'route_complete_match' => false,
// 访问控制器层名称
'controller_layer' => 'controller',
// 空控制器名
'empty_controller' => 'Error',
// 是否使用控制器后缀
'controller_suffix' => true,
// 默认的路由变量规则
'default_route_pattern' => '[\w\.]+',
// 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
'request_cache_key' => false,
// 请求缓存有效期
'request_cache_expire' => null,
// 全局请求缓存排除规则
'request_cache_except' => [],
// 默认控制器名
'default_controller' => 'Index',
// 默认操作名
'default_action' => 'index',
// 操作方法后缀
'action_suffix' => '',
// 默认JSONP格式返回的处理方法
'default_jsonp_handler' => 'jsonpReturn',
// 默认JSONP处理方法
'var_jsonp_handler' => 'callback',
];

19
server/config/session.php Executable file
View File

@@ -0,0 +1,19 @@
<?php
// +----------------------------------------------------------------------
// | 会话设置
// +----------------------------------------------------------------------
return [
// session name
'name' => 'PHPSESSID',
// SESSION_ID的提交变量,解决flash上传跨域
'var_session_id' => '',
// 驱动方式 支持file cache
'type' => 'file',
// 存储连接标识 当type使用cache的时候有效
'store' => null,
// 过期时间
'expire' => 1440,
// 前缀
'prefix' => '',
];

10
server/config/trace.php Executable file
View File

@@ -0,0 +1,10 @@
<?php
// +----------------------------------------------------------------------
// | Trace设置 开启调试模式后有效
// +----------------------------------------------------------------------
return [
// 内置Html和Console两种方式 支持扩展
'type' => 'Html',
// 读取的日志通道名
'channel' => '',
];

25
server/config/view.php Executable file
View File

@@ -0,0 +1,25 @@
<?php
// +----------------------------------------------------------------------
// | 模板设置
// +----------------------------------------------------------------------
return [
// 模板引擎类型使用Think
'type' => 'Think',
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
'auto_rule' => 1,
// 模板目录名
'view_dir_name' => 'view',
// 模板后缀
'view_suffix' => 'html',
// 模板文件名分隔符
'view_depr' => DIRECTORY_SEPARATOR,
// 模板引擎普通标签开始标记
'tpl_begin' => '{',
// 模板引擎普通标签结束标记
'tpl_end' => '}',
// 标签库标签开始标记
'taglib_begin' => '{',
// 标签库标签结束标记
'taglib_end' => '}',
];