FastMovieAI AI短剧创作平台 二开基线
- 源码: xhadmincn/FastMovieAI (Apache 2.0) - 二开: Docker部署, Swoole改Select, route.php修复, 补update/VERSION - vendor/示例资源已gitignore
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
use support\Request;
|
||||
|
||||
return [
|
||||
'debug' => true,
|
||||
'controller_suffix' => 'Controller',
|
||||
'controller_reuse' => false
|
||||
];
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
return [
|
||||
];
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
return new Webman\Container;
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// '' => app\exception\Handler::class,
|
||||
];
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'default' => [
|
||||
'handlers' => [
|
||||
[
|
||||
'class' => Monolog\Handler\RotatingFileHandler::class,
|
||||
'constructor' => [
|
||||
runtime_path() . '/logs/article.log',
|
||||
7,
|
||||
\Monolog\Level::Debug,
|
||||
],
|
||||
'formatter' => [
|
||||
'class' => Monolog\Formatter\LineFormatter::class,
|
||||
'constructor' => [null, 'Y-m-d H:i:s', true],
|
||||
],
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'' => [
|
||||
app\middleware\Template::class,
|
||||
app\middleware\Platform::class
|
||||
],
|
||||
'control' => [
|
||||
plugin\control\expose\middleware\ControlAuth::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,70 @@
|
||||
<?php
|
||||
|
||||
use Webman\Route;
|
||||
|
||||
Route::get('/control', [plugin\control\app\control\controller\IndexController::class, 'index']);
|
||||
Route::get('/control/', [plugin\control\app\control\controller\IndexController::class, 'index']);
|
||||
|
||||
$controllersClass = glob(base_path('plugin/control') . '/app/control/controller/*Controller.php');
|
||||
$len = count($controllersClass);
|
||||
$routes = [];
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$value = $controllersClass[$i];
|
||||
$controllerName = str_replace('Controller', '', basename($value, '.php'));
|
||||
$classStr = str_replace('.php', '', substr($value, strlen(base_path()) + 1));
|
||||
$classStr = str_replace('/', '\\', $classStr);
|
||||
$reflection = new \ReflectionClass('\\' . $classStr);
|
||||
|
||||
// 忽略抽象类、接口
|
||||
if ($reflection->isAbstract() || $reflection->isInterface()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$actions = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
$actionsLen = count($actions);
|
||||
for ($n = 0; $n < $actionsLen; $n++) {
|
||||
$name = $actions[$n]->name;
|
||||
if (!str_starts_with($name, '__')) {
|
||||
$routes["/{$controllerName}/{$name}"] = [$classStr, $name];
|
||||
}
|
||||
}
|
||||
}
|
||||
$controllersVersionClass = glob(base_path('plugin/control') . '/app/control/controller/**/*Controller.php');
|
||||
if (!empty($controllersVersionClass)) {
|
||||
$len = count($controllersVersionClass);
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
$value = $controllersVersionClass[$i];
|
||||
$version = basename(dirname($value));
|
||||
$controllerName = str_replace('Controller', '', basename($value, '.php'));
|
||||
$classStr = str_replace('.php', '', substr($value, strlen(base_path()) + 1));
|
||||
$classStr = str_replace('/', '\\', $classStr);
|
||||
$reflection = new \ReflectionClass('\\' . $classStr);
|
||||
|
||||
// 忽略抽象类、接口
|
||||
if ($reflection->isAbstract() || $reflection->isInterface()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$actions = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
$actionsLen = count($actions);
|
||||
for ($n = 0; $n < $actionsLen; $n++) {
|
||||
$name = $actions[$n]->name;
|
||||
|
||||
if (!str_starts_with($name, '__')) {
|
||||
$routes["/{$version}/{$controllerName}/{$name}"] = [$classStr, $name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Route::group('/control', function () use ($routes) {
|
||||
foreach ($routes as $key => $value) {
|
||||
if (in_array($value[1], ['indexUpdateField', 'indexUpdateState'])) {
|
||||
Route::post($key, $value);
|
||||
} else if (strpos($value[1], 'GetTable')) {
|
||||
Route::get($key, $value);
|
||||
} else {
|
||||
Route::any($key, $value);
|
||||
}
|
||||
}
|
||||
});
|
||||
Route::any('/app/control/WechatOfficialAccount/message/{channels_uid}', [plugin\control\app\controller\WechatOfficialAccountController::class, 'message']);
|
||||
@@ -0,0 +1,272 @@
|
||||
<?php
|
||||
|
||||
use app\expose\build\builder\ComponentBuilder;
|
||||
use app\expose\enum\SmsChannels;
|
||||
use plugin\user\utils\enum\VcodeScene;
|
||||
|
||||
$Component = new ComponentBuilder;
|
||||
$vcode_templates=[];
|
||||
$options=VcodeScene::getOptions();
|
||||
foreach ($options as $key => $value) {
|
||||
$prompt=$Component->add("text", ["default" => "短信模板ID,变量:"], ["type" => "info", "size" => "small"]);
|
||||
foreach ($value['variable'] as $k => $v) {
|
||||
$prompt->add("tag", ["default" => $v.':'.$k], ["type" => "info", "size" => "small"]);
|
||||
}
|
||||
$vcode_templates[]=[
|
||||
'title' => $value['label'].'短信模板ID',
|
||||
'field' => 'vcode_template_'.$value['value'],
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
"prompt" => [
|
||||
$prompt->builder()
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
return [
|
||||
[
|
||||
'title' => '服务商',
|
||||
'field' => 'channels',
|
||||
'value' => [SmsChannels::ALIYUN['value'], SmsChannels::TENCENT['value'], SmsChannels::SMSBAO['value']],
|
||||
'component' => 'drag-sort',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '短信服务商优先级,当发送失败时,会自动切换到下一个服务商'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'options' => SmsChannels::getOptions(),
|
||||
]
|
||||
],
|
||||
'group' => [
|
||||
[
|
||||
|
||||
'title' => SmsChannels::ALIYUN['label'],
|
||||
'name' => SmsChannels::ALIYUN['value'],
|
||||
'children' => [
|
||||
[
|
||||
'title' => '开关',
|
||||
'field' => 'enable',
|
||||
'value' => false,
|
||||
'component' => 'switch',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '是否启用阿里云短信服务'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'AccessKey ID',
|
||||
'field' => 'access_key_id',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '阿里云-AccessKey管理-AccessKey ID,'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '阿里云AccessKey'], ['target' => '_blank', 'href' => 'https://ram.console.aliyun.com/manage/ak', 'type' => 'info', 'underline' => 'never', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'AccessKey Secret',
|
||||
'field' => 'access_secret',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '阿里云-AccessKey管理-AccessKey Secret'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '短信签名',
|
||||
'field' => 'sign_name',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '阿里云-短信服务-国内消息-签名管理,'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '阿里云短信签名'], ['target' => '_blank', 'href' => 'https://dysms.console.aliyun.com/domestic/text', 'type' => 'info', 'underline' => 'never', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
...$vcode_templates
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => SmsChannels::TENCENT['label'],
|
||||
"name" => SmsChannels::TENCENT['value'],
|
||||
"children" => [
|
||||
[
|
||||
'title' => '开关',
|
||||
'field' => 'enable',
|
||||
'value' => false,
|
||||
'component' => 'switch',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '是否启用腾讯云短信服务'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => "SecretId",
|
||||
"field" => "secret_id",
|
||||
"value" => "",
|
||||
"component" => "input",
|
||||
"extra" => [
|
||||
"required" => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
"prompt" => [
|
||||
$Component->add("text", ["default" => "腾讯云-访问管理-访问密钥-AccessKey ID,"], ["type" => "info", "size" => "small"])
|
||||
->add("link", ["default" => "腾讯云SecretId"], ["target" => "_blank", "href" => "https://console.cloud.tencent.com/cam/capi", "type" => "info", 'underline' => 'never', "size" => "small"])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => "SecretKey",
|
||||
"field" => "secret_key",
|
||||
"value" => "",
|
||||
"component" => "input",
|
||||
"extra" => [
|
||||
"required" => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
"prompt" => [
|
||||
$Component->add("text", ["default" => "腾讯云-访问管理-访问密钥-AccessKey Secret,"], ["type" => "info", "size" => "small"])
|
||||
->add("link", ["default" => "腾讯云SecretKey"], ["target" => "_blank", "href" => "https://console.cloud.tencent.com/cam/capi", "type" => "info", 'underline' => 'never', "size" => "small"])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => "应用 ID",
|
||||
"field" => "appid",
|
||||
"value" => "",
|
||||
"component" => "input",
|
||||
"extra" => [
|
||||
"required" => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
"prompt" => [
|
||||
$Component->add("text", ["default" => "腾讯云-短信-应用管理-应用 ID,"], ["type" => "info", "size" => "small"])
|
||||
->add("link", ["default" => "腾讯云应用 ID"], ["target" => "_blank", "href" => "https://console.cloud.tencent.com/smsv2/app-manage", "type" => "info", 'underline' => 'never', "size" => "small"])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => "短信签名",
|
||||
"field" => "sign_name",
|
||||
"value" => "",
|
||||
"component" => "input",
|
||||
"extra" => [
|
||||
"required" => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
"prompt" => [
|
||||
$Component->add("text", ["default" => "腾讯云-短信-国内短信-签名管理,"], ["type" => "info", "size" => "small"])
|
||||
->add("link", ["default" => "腾讯云短信签名"], ["target" => "_blank", "href" => "https://console.cloud.tencent.com/smsv2/csms-sign", "type" => "info", 'underline' => 'never', "size" => "small"])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
...$vcode_templates
|
||||
]
|
||||
],
|
||||
[
|
||||
"title" => SmsChannels::SMSBAO['label'],
|
||||
"name" => SmsChannels::SMSBAO['value'],
|
||||
"children" => [
|
||||
[
|
||||
'title' => '开关',
|
||||
'field' => 'enable',
|
||||
'value' => false,
|
||||
'component' => 'switch',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '是否启用短信宝短信服务'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'UserName',
|
||||
'field' => 'key',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '短信宝-用户名'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'API Key或密码',
|
||||
'field' => 'secret',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '短信宝-API Key或密码'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '短信签名',
|
||||
'field' => 'sign_name',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['enable', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '短信宝-短信签名'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
]
|
||||
]
|
||||
],
|
||||
...$vcode_templates
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
|
||||
use app\expose\build\builder\ComponentBuilder;
|
||||
use app\expose\build\builder\SoltBuilder;
|
||||
|
||||
$Component = new ComponentBuilder;
|
||||
return [
|
||||
[
|
||||
'title' => 'Settings_basic_web_name',
|
||||
'field' => 'web_name',
|
||||
'value' => 'FastMovie',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '应用名称并非网页标题'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入应用名称'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '网站标题',
|
||||
'field' => 'web_title',
|
||||
'value' => 'FastMovie',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '网页标题,显示于浏览器tab标题'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入网站标题'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'LOGO展示方式',
|
||||
'field' => 'logo_use',
|
||||
'value' => 'svg',
|
||||
'component' => 'radio',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '应用名称将会显示在页面标题中'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'options' => [
|
||||
['label' => '默认', 'value' => 'svg'],
|
||||
['label' => '图片', 'value' => 'image']
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'LOGO(浅色)',
|
||||
'field' => 'web_logo_light',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'where' => [
|
||||
['logo_use', '=', 'image']
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '浅色LOGO,用于深色背景'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'accept' => 'image/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'LOGO(深色)',
|
||||
'field' => 'web_logo_dark',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'where' => [
|
||||
['logo_use', '=', 'image']
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '深色LOGO,用于浅色背景'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'accept' => 'image/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'ICP备案号',
|
||||
'field' => 'web_icp',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入ICP备案号'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '公安备案号',
|
||||
'field' => 'web_mps',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '用于跳转至公安备案系统携带的备案号'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入公安备案号'
|
||||
],
|
||||
'children' => SoltBuilder::solt('prepend')->add('el-image', ['style' => 'display:flex;', 'src' => '/static/beian.gov.png', 'width' => '15px', 'height' => '15px'])
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '公安备案号文本',
|
||||
'field' => 'web_mps_text',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '展示在网站底部公安备案号'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入公安备案号文本'
|
||||
],
|
||||
'children' => SoltBuilder::solt('prepend')->add('el-image', ['style' => 'display:flex;', 'src' => '/static/beian.gov.png', 'width' => '15px', 'height' => '15px'])
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '客服链接',
|
||||
'field' => 'wechat_url',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入客服链接链接'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '使用教程链接',
|
||||
'field' => 'guide_url',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入使用教程链接'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '客服二维码',
|
||||
'field' => 'wechat_qrcode_url',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'accept' => 'image/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '微信群二维码',
|
||||
'field' => 'wechat_group_qrcode_url',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'accept' => 'image/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '登录背景图',
|
||||
'field' => 'login_background_image_url',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'props' => [
|
||||
'accept' => 'image/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '项目背景视频',
|
||||
'field' => 'project_background_video_url',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '项目背景视频,用于展示在网站首页,建议使用webm格式'], ['type' => 'success', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'accept' => 'video/*',
|
||||
'multiple' => 1
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use app\expose\build\builder\ComponentBuilder;
|
||||
|
||||
$Component = new ComponentBuilder;
|
||||
return [
|
||||
[
|
||||
'title' => '状态',
|
||||
'field' => 'state',
|
||||
'value' => 0,
|
||||
'component' => 'radio',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '是否开启内置Control'], ['type' => 'info', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'options' => [
|
||||
['label' => '关闭', 'value' => 0],
|
||||
['label' => '开启', 'value' => 1]
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,138 @@
|
||||
<?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' => 'AppID',
|
||||
'field' => 'app_id',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序AppID(小程序ID),'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '微信公众平台'], ['href' => 'https://mp.weixin.qq.com/', 'underline' => 'never', 'target' => '_blank', 'type' => 'primary', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入AppID'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'AppSecret',
|
||||
'field' => 'app_secret',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序AppSecret(小程序密钥) ,'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '微信公众平台'], ['href' => 'https://mp.weixin.qq.com/', 'underline' => 'never', 'target' => '_blank', 'type' => 'primary', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入AppSecret'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '小程序代码上传密钥',
|
||||
'field' => 'code_upload_key',
|
||||
'value' => '',
|
||||
'component' => 'bundle',
|
||||
'extra' => [
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序代码上传密钥 ,'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '微信公众平台'], ['href' => 'https://mp.weixin.qq.com/', 'underline' => 'never', 'target' => '_blank', 'type' => 'primary', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'view' => 'file'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'request合法域名',
|
||||
'field' => 'request_domain',
|
||||
'value' => '{DOMAIN}',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序request合法域名,请将此URL填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信小程序-开发-开发管理-服务器域名-配置服务器域名-request合法域名'], ['type' => 'warning', 'size' => 'small'])->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入request合法域名'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'uploadFile合法域名',
|
||||
'field' => 'upload_file_domain',
|
||||
'value' => '{DOMAIN}',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序uploadFile合法域名,请将此URL填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信小程序-开发-开发管理-服务器域名-配置服务器域名-uploadFile合法域名'], ['type' => 'warning', 'size' => 'small'])->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入uploadFile合法域名'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'downloadFile合法域名',
|
||||
'field' => 'download_file_domain',
|
||||
'value' => '{DOMAIN}',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信小程序downloadFile合法域名,请将此URL填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信小程序-开发-开发管理-服务器域名-配置服务器域名-downloadFile合法域名,'], ['type' => 'warning', 'size' => 'small'])
|
||||
->add('text', ['default' => '注:如若该域名与本站系统-上传配置-中储存域名不一致时,以上传配置中使用的域名为准'], ['type' => 'danger', 'size' => 'small'])->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入downloadFile合法域名'
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
use app\expose\build\builder\ComponentBuilder;
|
||||
use app\expose\utils\Str;
|
||||
|
||||
$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' => 'AppID',
|
||||
'field' => 'app_id',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信公众号开发者ID(AppID),'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '微信公众平台'], ['href' => 'https://mp.weixin.qq.com/', 'underline' => 'never', 'target' => '_blank', 'type' => 'primary', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入AppID'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => 'AppSecret',
|
||||
'field' => 'app_secret',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信公众号开发者密码(AppSecret),'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '微信公众平台'], ['href' => 'https://mp.weixin.qq.com/', 'underline' => 'never', 'target' => '_blank', 'type' => 'primary', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入AppSecret'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '接收公众号消息通知状态',
|
||||
'field' => 'message_state',
|
||||
'value' => false,
|
||||
'component' => 'switch',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '是否开启接收公众号消息通知'], ['type' => 'info', 'size' => 'small'])->builder()
|
||||
],
|
||||
'props' => [
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '服务器地址',
|
||||
'field' => 'url',
|
||||
'value' => '{DOMAIN}/app/control/WechatOfficialAccount/message/{CHANNELS_UID}',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true],
|
||||
['message_state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信公众号服务器地址(URL),请将此URL填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信公众号-设置与开发-基本配置-服务器配置-服务器地址(URL)'], ['type' => 'warning', 'size' => 'small'])->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入服务器地址'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '令牌',
|
||||
'field' => 'token',
|
||||
'value' => Str::random(32),
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true],
|
||||
['message_state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信公众号令牌(Token),请将此Token填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信公众号-设置与开发-基本配置-服务器配置-令牌(Token)'], ['type' => 'warning', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入令牌'
|
||||
]
|
||||
]
|
||||
],
|
||||
[
|
||||
'title' => '消息加解密密钥',
|
||||
'field' => 'aes_key',
|
||||
'value' => Str::random(43),
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'where' => [
|
||||
['state', '=', true],
|
||||
['message_state', '=', true]
|
||||
],
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '微信公众号消息加解密密钥(AESKey),请将此AESKey填入:'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('text', ['default' => '微信公众号-设置与开发-基本配置-服务器配置-消息加解密方式(AESKey)'], ['type' => 'warning', 'size' => 'small'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'placeholder' => '请输入消息加解密密钥'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use app\expose\build\builder\ComponentBuilder;
|
||||
|
||||
$Component = new ComponentBuilder;
|
||||
return [
|
||||
[
|
||||
'title' => '壹定开放平台密钥',
|
||||
'field' => 'token',
|
||||
'value' => '',
|
||||
'component' => 'input',
|
||||
'extra' => [
|
||||
'required' => true,
|
||||
'prompt' => [
|
||||
$Component->add('text', ['default' => '壹定开放平台密钥,用于获取壹定开放平台数据。获取方式:在壹定开放平台->API服务->'], ['type' => 'info', 'size' => 'small'])
|
||||
->add('link', ['default' => '密钥'], ['href'=>'https://api.yidevs.com/?icode=V7hN2xiudv5qeISzYiklLFFTMElweG44dmwzTEp4K3Mwa3ZGelE9PQ%3D%3D','type' => 'primary', 'size' => 'small', 'target' => '_blank', 'underline' => 'never'])
|
||||
->builder()
|
||||
],
|
||||
'props' => [
|
||||
'type' => 'text',
|
||||
'placeholder' => '请输入壹定开放平台密钥'
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
@@ -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/control/resource/translations',
|
||||
];
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
use support\view\Raw;
|
||||
use support\view\Twig;
|
||||
use support\view\Blade;
|
||||
// use support\view\ThinkPHP;
|
||||
use support\ThinkPHP;
|
||||
|
||||
return [
|
||||
'handler' => ThinkPHP::class,
|
||||
];
|
||||
Reference in New Issue
Block a user