FastMovieAI 二开基线 v1.0 (完整源码)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace app\expose\build\config;
|
||||
|
||||
use app\expose\utils\DataModel;
|
||||
|
||||
class Action extends DataModel
|
||||
{
|
||||
protected $data = [];
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = array_merge($this->data, $data);
|
||||
}
|
||||
/**
|
||||
* 添加一个操作
|
||||
*
|
||||
* @param string $model 查看 \app\expose\enum\Action::class, 例如 \app\expose\enum\Action::LOCK['value']
|
||||
* @param array $props ['icon' => 'Lock','label' => '锁屏']
|
||||
* @return Action
|
||||
*/
|
||||
public function add($model, $props = []): Action
|
||||
{
|
||||
$this->data[] = [
|
||||
'model' => $model,
|
||||
'props' => $props
|
||||
];
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace app\expose\build\config;
|
||||
|
||||
use app\expose\utils\DataModel;
|
||||
|
||||
class Apis extends DataModel
|
||||
{
|
||||
protected $data = [
|
||||
'userinfo' => 'User/getUserInfo',
|
||||
];
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = array_merge($this->data, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace app\expose\build\config;
|
||||
|
||||
use app\expose\utils\DataModel;
|
||||
|
||||
class Login extends DataModel
|
||||
{
|
||||
protected $data = [
|
||||
# 是否启用登录
|
||||
'enable' => true,
|
||||
# 登录标题
|
||||
'title' => '账号密码登录',
|
||||
# 登录请求地址
|
||||
'url' => 'Login/login',
|
||||
# 检测登录状态地址
|
||||
'check' => 'Login/check',
|
||||
# 登录页背景,auto:自动,off:关闭,url:自定义,url[]:多张图片
|
||||
'bg_image' => 'auto',
|
||||
# 登录页展示图片
|
||||
'image' => '',
|
||||
# 开启图形验证码,在短信登录时默认开启
|
||||
'captcha' => true,
|
||||
# 跳转链接文案
|
||||
'link_text' => '',
|
||||
# 用户协议链接
|
||||
'user_agreement' => '/article/user_agreement.html',
|
||||
# 用户协议自定义配置
|
||||
/* 'user_agreement_config'=>[
|
||||
'title'=>'《用户协议》',
|
||||
'label'=>'点击"登录"即代表你已阅读并同意'
|
||||
] */
|
||||
];
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = array_merge($this->data, $data);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace app\expose\build\config;
|
||||
|
||||
use app\expose\utils\DataModel;
|
||||
|
||||
class Web extends DataModel
|
||||
{
|
||||
protected $data = [
|
||||
# 应用名称
|
||||
'web_name' => 'Loong',
|
||||
# LOGO展示方式
|
||||
'logo_use' => 'svg',
|
||||
# 应用浅色LOGO
|
||||
'web_logo_light' => '',
|
||||
# 应用深色LOGO
|
||||
'web_logo_dark' => '',
|
||||
# ICP备案
|
||||
'web_icp' => '',
|
||||
# 公安备案号
|
||||
'web_mps' => '',
|
||||
# 公安备案文案
|
||||
'web_mps_text' => '',
|
||||
# 网站标题
|
||||
'web_title' => '',
|
||||
# 版本名称
|
||||
'version_name' => 'v1.0.0',
|
||||
# 版本号
|
||||
'version' => 10000,
|
||||
# 版权信息
|
||||
'copyright' => 'copyright © 2020 RenLoong All Rights Reserved',
|
||||
# 微信客服链接
|
||||
'wechat_url' => '',
|
||||
# 客服二维码
|
||||
'wechat_qrcode_url' => '',
|
||||
# 页面布局,control: 控制台布局,admin: 后台布局
|
||||
'layout' => 'control',
|
||||
];
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$request = request();
|
||||
$this->data['layout'] = $request->app;
|
||||
$this->data = array_merge($this->data, $data);
|
||||
}
|
||||
public function useLogin(array $data = [])
|
||||
{
|
||||
$this->data['login'] = new Login($data);
|
||||
return $this;
|
||||
}
|
||||
public function useVcode(array $data = [])
|
||||
{
|
||||
$this->data['vcode'] = new Login($data);
|
||||
return $this;
|
||||
}
|
||||
public function useRegister(array $data = [])
|
||||
{
|
||||
$this->data['register'] = new Login($data);
|
||||
return $this;
|
||||
}
|
||||
public function useQrcodeLogin(array $data = [])
|
||||
{
|
||||
$this->data['qrcode_login'] = new Login($data);
|
||||
return $this;
|
||||
}
|
||||
public function useApis(array $data = [])
|
||||
{
|
||||
$apis = new Apis($data);
|
||||
if (!isset($this->data['apis'])) {
|
||||
$this->data['apis'] = [];
|
||||
}
|
||||
$this->data['apis'] = array_merge($this->data['apis'], $apis->toArray());
|
||||
return $this;
|
||||
}
|
||||
public function useToolbar(array $data = [])
|
||||
{
|
||||
if (!isset($this->data['toolbar'])) {
|
||||
$this->data['toolbar'] = [];
|
||||
}
|
||||
$this->data['toolbar'] = array_merge($this->data['toolbar'], $data);
|
||||
return $this;
|
||||
}
|
||||
public function useUserDropdownMenu(array $data = [])
|
||||
{
|
||||
if (!isset($this->data['user_dropdown_menu'])) {
|
||||
$this->data['user_dropdown_menu'] = [];
|
||||
}
|
||||
$this->data['user_dropdown_menu'] = array_merge($this->data['user_dropdown_menu'], $data);
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user