first commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{!! '<?php' !!}
|
||||
|
||||
namespace App\Http\Controllers\Admin\{{ $controllerPath }};
|
||||
|
||||
use App\Http\Controllers\Admin\Controller;
|
||||
use App\Models\{{ $modelPath }}\{{ $modelName }};
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class {{ $controllerName }} extends Controller
|
||||
{
|
||||
|
||||
// 权限标识
|
||||
protected string $authName = '{{ $authName }}';
|
||||
|
||||
// 模型
|
||||
protected string $model = '{{ $modelName }}';
|
||||
|
||||
// 查询字段
|
||||
protected array $searchField = [
|
||||
@foreach($searchField as $key => $value)
|
||||
'{{ $key }}' => '{!! $value !!}',
|
||||
@endforeach
|
||||
];
|
||||
|
||||
// 快速查询字段
|
||||
protected array $quickSearchField = [@foreach($quickSearchField as $value) '{!! $value !!}', @endforeach];
|
||||
|
||||
// 验证
|
||||
protected array $rule = [
|
||||
@foreach($rules as $key => $value)
|
||||
'{{ $key }}' => '{!! $value !!}',
|
||||
@endforeach
|
||||
];
|
||||
|
||||
// 错误提醒
|
||||
protected array $message = [
|
||||
@foreach($message as $key => $value)
|
||||
'{{ $key }}' => '{!! $value !!}',
|
||||
@endforeach
|
||||
];
|
||||
|
||||
/**
|
||||
* 若需重写新增、查看、编辑、删除等方法,请复制 @see \app\Http\Controllers\Admin\Controller 中对应的方法至此进行重写
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>验证码邮件</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.header img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.logo {
|
||||
max-width: 150px;
|
||||
}
|
||||
.code-container {
|
||||
background-color: #f5f5f5;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
margin: 20px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.verification-code {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
color: #2d3748;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 30px;
|
||||
font-size: 12px;
|
||||
color: #718096;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<img src="https://file.xinadmin.cn/file/favicons.ico" alt="Logo" class="logo">
|
||||
<h1>您的验证码</h1>
|
||||
</div>
|
||||
|
||||
<p>您好!</p>
|
||||
|
||||
<p>您正在尝试进行身份验证,请使用以下验证码完成操作:</p>
|
||||
|
||||
<div class="code-container">
|
||||
<div class="verification-code">{{ $code }}</div>
|
||||
</div>
|
||||
|
||||
<p>此验证码将在 {{ $expireMinutes }} 分钟后失效,请尽快使用。</p>
|
||||
|
||||
<p>如果您没有请求此验证码,请忽略此邮件。</p>
|
||||
|
||||
<div class="footer">
|
||||
<p>© {{ date('Y') }} {{ config('app.name') }}. 版权所有.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,13 @@
|
||||
{!! '<?php' !!}
|
||||
|
||||
namespace App\Models\Dict;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
|
||||
class {{ $modelName }} extends BaseModel
|
||||
{
|
||||
protected $table = '{{ $tableName }}';
|
||||
|
||||
protected $fillable = [];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import React from "react";
|
||||
import XinTable from '@/components/XinTable'
|
||||
import {ProFormColumnsAndProColumns, TableProps} from '@/components/XinTable/typings';
|
||||
import * as verify from '@/utils/format';
|
||||
|
||||
/**
|
||||
* Api 接口
|
||||
*/
|
||||
const api = '/{{$api}}'
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
interface Data {
|
||||
[key: string] : any
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格渲染
|
||||
*/
|
||||
const {{$name}}: React.FC = () => {
|
||||
|
||||
{!! 'const columns: ProFormColumnsAndProColumns<Data>[] =' !!}
|
||||
{!! $columns !!}
|
||||
|
||||
{!! 'const tableConfig: TableProps<Data> =' !!}
|
||||
{!! $table_config !!}
|
||||
|
||||
{!! 'return <XinTable<Data> {...tableConfig}/>' !!}
|
||||
|
||||
}
|
||||
|
||||
export default {{$name}}
|
||||
Reference in New Issue
Block a user