FastMovieAI AI短剧创作平台 二开基线

- 源码: xhadmincn/FastMovieAI (Apache 2.0)
- 二开: Docker部署, Swoole改Select, route.php修复, 补update/VERSION
- vendor/示例资源已gitignore
This commit is contained in:
李建琦
2026-08-26 18:37:36 +08:00
commit eae151fd57
888 changed files with 105571 additions and 0 deletions
@@ -0,0 +1,53 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Action extends Enum
{
const DEFAULT = [
'label' => '页面跳转',
'value' => ''
];
const REDIRECT = [
'label' => '重定向',
'value' => 'redirect'
];
const LINK= [
'label' => '链接跳转',
'value' => 'link'
];
const COMFIRM = [
'label' => '确认操作',
'value' => 'comfirm'
];
const DIALOG = [
'label' => '弹窗操作',
'value' => 'dialog'
];
const REQUEST = [
'label' => '请求操作',
'value' => 'request'
];
const LOCK = [
'label' => '锁屏',
'value' => 'Lock'
];
const SEARCH = [
'label' => '搜索',
'value' => 'Search'
];
const NOTIFICATION = [
'label' => '通知',
'value' => 'Notification'
];
const FULL_SCREEN = [
'label' => '全屏',
'value' => 'FullScreen'
];
const OUT_LOGIN = [
'label' => '退出登录',
'value' => 'OutLogin'
];
}
@@ -0,0 +1,17 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class AlipayRsaModel extends Enum
{
const PUBLIC_CERT = [
'label' => '公钥证书',
'value' => 'public_cert',
];
const PUBLIC_KEY = [
'label' => '公钥',
'value' => 'public_key',
];
}
@@ -0,0 +1,114 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class EventName extends Enum
{
const USER_REGISTER = [
'label' => '注册',
'value' => 'USER.REGISTER',
'props' => [
'type' => 'primary'
]
];
const USER_LOGIN = [
'label' => '登录',
'value' => 'USER.LOGIN',
'props' => [
'type' => 'success'
]
];
const USER_LOGOUT = [
'label' => '退出',
'value' => 'USER.LOGOUT',
'props' => [
'type' => 'warning'
]
];
const USER_UPDATE = [
'label' => '更新用户信息',
'value' => 'USER.UPDATE',
'props' => [
'type' => 'info'
]
];
const ORDERS_CREATE = [
'label' => '创建订单',
'value' => 'ORDERS.CREATE',
'props' => [
'type' => 'info'
]
];
const ORDERS_PAY = [
'label' => '支付订单',
'value' => 'ORDERS.PAY',
'props' => [
'type' => 'danger'
]
];
const ORDERS_PAY_SUCCESS = [
'label' => '支付成功',
'value' => 'ORDERS.PAY_SUCCESS',
'props' => [
'type' => 'success'
]
];
const ORDERS_CANCEL = [
'label' => '取消订单',
'value' => 'ORDERS.CANCEL',
'props' => [
'type' => 'info'
]
];
const ORDERS_REFUND = [
'label' => '退款订单',
'value' => 'ORDERS.REFUND',
'props' => [
'type' => 'warning'
]
];
const ORDERS_FINISH = [
'label' => '完成订单',
'value' => 'ORDERS.FINISH',
'props' => [
'type' => 'success'
]
];
const WECHAT_OFFICIAL_ACCOUNT_SCAN = [
'label' => '微信公众号扫码',
'value' => 'WECHAT_OFFICIAL_ACCOUNT.SCAN',
'props' => [
'type' => 'primary'
]
];
const WECHAT_OFFICIAL_ACCOUNT_SUBSCRLBE=[
'label' => '微信公众号关注',
'value' => 'WECHAT_OFFICIAL_ACCOUNT.SUBSCRLBE',
'props' => [
'type' => 'primary'
]
];
const WECHAT_OFFICIAL_ACCOUNT_UNSUBSCRLBE=[
'label' => '微信公众号取关',
'value' => 'WECHAT_OFFICIAL_ACCOUNT.UNSUBSCRLBE',
'props' => [
'type' => 'primary'
]
];
const NOTIFICATION_LIMIT= [
'label' => '有限通知',
'value' => 'NOTIFICATION.LIMIT',
'props' => [
'type' => 'info'
]
];
const NOTIFICATION_UNLIMIT= [
'label' => '无限通知',
'value' => 'NOTIFICATION.UNLIMIT',
'props' => [
'type' => 'info'
]
];
}
@@ -0,0 +1,30 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Examine extends Enum
{
const WAIT = [
'label' => '待审核',
'value' => 0,
'props'=>[
'type'=>'primary'
]
];
const PASS = [
'label' => '通过',
'value' => 1,
'props'=>[
'type'=>'success'
]
];
const REJECT = [
'label' => '驳回',
'value' => 2,
'props'=>[
'type'=>'danger'
]
];
}
@@ -0,0 +1,41 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Filesystem extends Enum
{
const PUBLIC = [
'label' => '本地存储(外部)',
'value' => 'public'
];
const LOCAL = [
'label' => '本地存储(内部)',
'value' => 'local'
];
const OSS = [
'label' => '阿里云存储',
'value' => 'oss'
];
const COS = [
'label' => '腾讯云存储',
'value' => 'cos'
];
const QINIU = [
'label' => '七牛存储',
'value' => 'qiniu'
];
const FTP = [
'label' => 'FTP存储',
'value' => 'ftp'
];
const S3 = [
'label' => 'S3存储',
'value' => 's3'
];
const MINIO = [
'label' => 'Minio存储',
'value' => 'minio'
];
}
@@ -0,0 +1,29 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Methods extends Enum
{
const GET = [
'label' => 'GET',
'value' => 'GET'
];
const POST = [
'label' => 'POST',
'value' => 'POST'
];
const PUT = [
'label' => 'PUT',
'value' => 'PUT'
];
const DELETE = [
'label' => 'DELETE',
'value' => 'DELETE'
];
const OPTIONS = [
'label' => 'OPTIONS',
'value' => 'OPTIONS'
];
}
@@ -0,0 +1,73 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class PaymentChannels extends Enum
{
const WXPAY = [
'label' => '微信支付',
'value' => 'wxpay',
'icon' => '/static/image/wxpay.png',
'props' => [
'type' => 'success'
]
];
const ALIPAY = [
'label' => '支付宝支付',
'value' => 'alipay',
'icon' => '/static/image/alipay.png',
'props' => [
'type' => 'primary'
]
];
const BALANCE = [
'label' => '余额支付',
'value' => 'balance',
'icon' => '/static/image/balance.png',
'props' => [
'type' => 'info'
]
];
const INTEGRAL = [
'label' => '积分支付',
'value' => 'integral',
'icon' => '/static/image/integral.png',
'props' => [
'type' => 'warning'
]
];
const CASH = [
'label' => '现金支付',
'value' => 'cash',
'icon' => '/static/image/cash.png',
'props' => [
'type' => 'danger'
]
];
const COUPON = [
'label' => '优惠券支付',
'value' => 'coupon',
'icon' => '/static/image/coupon.png',
'props' => [
'type' => 'info'
]
];
const FREE = [
'label' => '免费',
'value' => 'free',
'icon' => '/static/image/free.png',
'props' => [
'type' => 'success'
]
];
const ADMIN = [
'label' => '管理员操作',
'value' => 'admin',
'icon' => '/static/image/admin.png',
'props' => [
'type' => 'warning'
]
];
}
@@ -0,0 +1,25 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Permission extends Enum
{
const CREATE = [
'label' => '创建',
'value' => 'Create'
];
const DELETE = [
'label' => '删除',
'value' => 'Delete'
];
const UPDATE = [
'label' => '更新',
'value' => 'Update'
];
const UPDATE_STATE = [
'label' => '更新状态',
'value' => 'UpdateState'
];
}
@@ -0,0 +1,29 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Platform extends Enum
{
const PC = [
'label' => 'PC',
'value' => 'pc'
];
const H5 = [
'label' => 'H5',
'value' => 'h5'
];
const WECHAT_MINIAPP = [
'label' => '微信小程序',
'value' => 'wechat_miniapp'
];
const WECHAT_OFFICIAL_ACCOUNT = [
'label' => '微信公众号',
'value' => 'wechat_official_account'
];
const APP = [
'label' => 'APP',
'value' => 'app'
];
}
@@ -0,0 +1,86 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
/**
* JSON响应Code静态常量
* Class ResponseCode
* @package app\expose\enum
*/
class ResponseCode extends Enum
{
/**
* 成功
*/
const SUCCESS = 200;
/**
* 等待
*/
const WAIT = 202;
/**
* 有事件通知
*/
const SUCCESS_EVENT_PUSH = 201;
/**
* 失败
*/
const FAIL = 404;
/**
* 需要登录
*/
const NEED_LOGIN = 12000;
/**
* 需要两步验证
*/
const NEED_TWOFA = 12001;
/**
* 验证码错误
*/
const CAPTCHA = 300;
/**
* 站点信息错误
*/
const SITE_ERROR = 400;
/**
* 需要支付
*/
const NEED_PAY = 9100;
/**
* 支付成功
*/
const PAY_SUCCESS = 9000;
/**
* 支付失败
*/
const PAY_FAIL = 9010;
/**
* 重定向
*/
const REDIRECT = 302;
/**
* 确认重定向
*/
const REDIRECT_CONFIRM = 303;
/**
* 打开新窗口
*/
const OPEN_NEW_WINDOW = 304;
/**
* 确认打开新窗口
*/
const OPEN_NEW_WINDOW_CONFIRM = 305;
/**
* 无权限
*/
const NO_PERMISSION = 403;
/**
* 需要绑定电话
*/
const NEED_BIND_MOBILE = 12002;
/**
* 锁定
*/
const LOCK = 423;
}
@@ -0,0 +1,17 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class ResponseEvent extends Enum
{
/**
* 通知客户端更新网站配置
*/
const UPDATE_WEBCONFIG = "UPDATE::WEBCONFIG";
/**
* 通知客户端更新用户信息
*/
const UPDATE_USERINFO = "UPDATE::USERINFO";
}
@@ -0,0 +1,21 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class SmsChannels extends Enum
{
const ALIYUN = [
'label' => '阿里云短信',
'value' => 'aliyun'
];
const TENCENT = [
'label' => '腾讯云短信',
'value' => 'tencent'
];
const SMSBAO = [
'label' => '短信宝',
'value' => 'smsbao'
];
}
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class State extends Enum
{
const YES = [
'label' => '正常',
'value' => 1
];
const NO = [
'label' => '禁用',
'value' => 0
];
}
@@ -0,0 +1,18 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
/**
* 表单提交事件
* 默认提交表单后重置表单
* @package app\expose\enum
*/
class SubmitEvent extends Enum
{
/**
* 提交表单后静默处理
*/
const SILENT = "SILENT";
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class Week extends Enum
{
const SUNDAY = [
'label' => '周日',
'value' => 0,
'props' => [
'type' => 'info'
]
];
const MONDAY = [
'label' => '周一',
'value' => 1,
'props' => [
'type' => 'success'
]
];
const TUESDAY = [
'label' => '周二',
'value' => 2,
'props' => [
'type' => 'success'
]
];
const WEDNESDAY = [
'label' => '周三',
'value' => 3,
'props' => [
'type' => 'success'
]
];
const THURSDAY = [
'label' => '周四',
'value' => 4,
'props' => [
'type' => 'success'
]
];
const FRIDAY = [
'label' => '周五',
'value' => 5,
'props' => [
'type' => 'success'
]
];
const SATURDAY = [
'label' => '周六',
'value' => 6,
'props' => [
'type' => 'info'
]
];
}
@@ -0,0 +1,17 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class WxpayMchType extends Enum
{
const NORMAL = [
'label' => '普通商户',
'value' => 'normal'
];
const SERVICE = [
'label' => '子商户 (服务商模式)',
'value' => 'service'
];
}
@@ -0,0 +1,17 @@
<?php
namespace app\expose\enum;
use app\expose\enum\builder\Enum;
class WxpayVersion extends Enum
{
const V3 = [
'label' => 'V3',
'value' => 'v3'
];
const V2 = [
'label' => 'V2',
'value' => 'v2'
];
}
@@ -0,0 +1,100 @@
<?php
namespace app\expose\enum\builder;
class Enum
{
/**
* 获取枚举选项
* @param callable|null $filter 过滤函数
* @return array 选项数组
*/
public static function getOptions(?callable $filter = null)
{
$class = new \ReflectionClass(static::class);
$options = [];
foreach ($class->getConstants() as $key => $value) {
if ($filter) {
if ($filter($value)) {
if (is_array($value)) {
$options[] = $value;
} else {
$options[] = [
'label' => $key,
'value' => $value
];
}
}
} else {
if (is_array($value)) {
$options[] = $value;
} else {
$options[] = [
'label' => $key,
'value' => $value
];
}
}
}
return $options;
}
/**
* 获取枚举文本
* @param mixed $value 值
* @return string 文本
*/
public static function getText($value)
{
$options = static::getOptions();
foreach ($options as $option) {
if ($option['value'] == $value) {
return $option['label'];
}
}
return '';
}
/**
* 获取枚举选项
* @param mixed $value 值
* @return array|null 选项
*/
public static function get($value, $key = null)
{
$options = static::getOptions();
foreach ($options as $option) {
if ($option['value'] == $value) {
return array_key_exists($key, $option) ? $option[$key] : $option;
}
}
return null;
}
/**
* 获取枚举值
* @param callable|null $filter 过滤函数
* @return array 值数组
*/
public static function getValues(?callable $filter = null)
{
$options = static::getOptions($filter);
$values = [];
foreach ($options as $option) {
$values[] = $option['value'];
}
return $values;
}
/**
* 判断是否存在
* @param mixed $value 值
* @return bool 是否存在
*/
public static function has($value)
{
$options = static::getOptions();
foreach ($options as $option) {
if ($option['value'] == $value) {
return true;
}
}
return false;
}
}