FastMovieAI 二开基线 v1.0 (完整源码)

This commit is contained in:
李建琦
2026-08-26 18:41:02 +08:00
parent fad7690c0c
commit d54584f70d
888 changed files with 105571 additions and 1 deletions
@@ -0,0 +1,9 @@
<?php
use support\Request;
return [
'debug' => true,
'controller_suffix' => 'Controller',
'controller_reuse' => false
];
@@ -0,0 +1,6 @@
<?php
return [
'files' => [
base_path() . '/plugin/notification/app/functions.php',
]
];
@@ -0,0 +1,2 @@
<?php
return new Webman\Container;
@@ -0,0 +1,5 @@
<?php
return [
];
@@ -0,0 +1,5 @@
<?php
return [
'' => app\exception\Handler::class,
];
@@ -0,0 +1,15 @@
<?php
return [
'' => [
app\expose\middleware\Platform::class
],
'admin' => [
app\expose\middleware\AdminAuth::class
],
'api' => [
plugin\control\expose\middleware\DomainMapping::class,
plugin\user\expose\middleware\UserAuth::class,
plugin\user\expose\middleware\Twofa::class,
],
];
@@ -0,0 +1,5 @@
<?php
return [
];
@@ -0,0 +1,43 @@
<?php
use app\expose\build\builder\ComponentBuilder;
$Component = new ComponentBuilder;
return [
[
'title' => '开关',
'field' => 'state',
'value' => false,
'component' => 'switch',
'extra' => [
'required' => true,
'prompt' => [
$Component->add('text', ['default' => '是否开启站内推送'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => []
]
],
[
'title' => 'wss地址',
'field' => 'wss_url',
'value' => 'wss://{HOST}',
'component' => 'input',
'extra' => [
'required' => true,
'where' => [
['state', '=', true]
],
'col'=>[
'span'=>12
],
'prompt' => [
$Component->add('text', ['default' => '只需要填写wss://+域名,不需要填写路径'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => [
'placeholder' => 'wss://+域名'
]
]
],
];
@@ -0,0 +1,24 @@
<?php
use app\expose\build\builder\ComponentBuilder;
use plugin\notification\utils\enum\Scene;
$data=[];
$Component = new ComponentBuilder;
$options=Scene::getOptions();
foreach ($options as $key => $value) {
$temp=[
'title' => $value['label'].'模板或模板ID',
'field' => $value['value'],
'value' => '',
'component' => 'input',
'extra' => [
'prompt' => [
$Component->add('text', ['default' => $value['label'].'场景使用的短信推送模板或模板ID,为空则关闭该场景通知'], ['type' => 'info', 'size' => 'small'])
->builder()
]
]
];
$data[]=$temp;
}
return $data;
@@ -0,0 +1,94 @@
<?php
use app\expose\build\builder\ComponentBuilder;
use plugin\notification\utils\enum\Method;
$Component = new ComponentBuilder;
return [
[
'title' => '开关',
'field' => 'state',
'value' => false,
'component' => 'switch',
'extra' => [
'required' => true,
'prompt' => [
$Component->add('text', ['default' => '是否开启通知'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => []
]
],
[
'title' => '同一用户每日通知次数',
'field' => 'user_limit',
'value' => 0,
'component' => 'input-number',
'extra' => [
'required' => true,
'where' => [
['state', '=', true]
],
'col'=>[
'xs' => 24,
'sm' => 12,
'md' => 6
],
'prompt' => [
$Component->add('text', ['default' => '同一用户所有场景每日通知次数,0:不限制'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => [
'min' => 0,
'controls'=>false,
'placeholder' => '次数'
]
]
],
[
'title' => '同一用户同一场景每日通知次数',
'field' => 'user_scene_limit',
'value' => 1,
'component' => 'input-number',
'extra' => [
'required' => true,
'where' => [
['state', '=', true]
],
'col'=>[
'xs' => 24,
'sm' => 12,
'md' => 6
],
'prompt' => [
$Component->add('text', ['default' => '同一用户同一场景每日通知次数,0:不限制'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => [
'min' => 0,
'controls'=>false,
'placeholder' => '次数'
]
]
],
[
'title' => '通知方式',
'field' => 'method',
'value' => Method::WECHAT_AND_SMS['value'],
'component' => 'radio',
'extra' => [
'required' => true,
'where' => [
['state', '=', true]
],
'prompt' => [
$Component->add('text', ['default' => '通知方式'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'options'=>Method::getOptions(),
'subProps' => [
'border'=>true
]
]
]
];
@@ -0,0 +1,50 @@
<?php
use app\expose\build\builder\ComponentBuilder;
use app\expose\enum\Action;
use plugin\notification\utils\enum\Scene;
$data=[];
$Component = new ComponentBuilder;
$options=Scene::getOptions();
foreach ($options as $key => $value) {
$temp=[
'title' => $value['label'].'模板ID',
'field' => $value['value'],
'value' => '',
'component' => 'input',
'extra' => [
'prompt' => [
$Component->add('text', ['default' => $value['label'].'场景使用的微信公众号推送模板ID,为空则关闭该场景通知'], ['type' => 'info', 'size' => 'small'])
->builder()
],
'props' => [],
'children'=>[
'append'=>[
'component'=>'el-button',
'extra'=>[
'model'=>Action::COMFIRM['value'],
'path'=>'/app/notification/admin/WechatTemplate/getTemplateId',
'props'=>[
'type'=>'warning',
'message'=>'点击确定立即获取模板ID',
]
],
'children'=>[
'default'=>'一键获取模板ID'
]
]
]
]
];
if(isset($value['params'])){
foreach ($value['params'] as $k => $v) {
if(!isset($temp['extra']['children']['append']['extra']['params'])){
$temp['extra']['children']['append']['extra']['params']=[];
}
$temp['extra']['children']['append']['extra']['params'][$k]=$v;
}
}
$data[]=$temp;
}
return $data;
@@ -0,0 +1,6 @@
<?php
return [
'enable' => true,
'middleware' => [
],
];
@@ -0,0 +1,25 @@
<?php
/**
* This file is part of webman.
*
* Licensed under The MIT License
* For full copyright and license information, please see the MIT-LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @author walkor<walkor@workerman.net>
* @copyright walkor<walkor@workerman.net>
* @link http://www.workerman.net/
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Multilingual configuration
*/
return [
// Default language
'locale' => 'zh_CN',
// Fallback language
'fallback_locale' => ['zh_CN', 'en'],
// Folder where language files are stored
'path' => base_path() . '/plugin/notification/resource/translations',
];