add send email

This commit is contained in:
hujiabin 2022-08-08 14:05:32 +08:00
parent b645f18064
commit ee7196558f
12 changed files with 1030 additions and 1253 deletions

View File

@ -122,9 +122,10 @@ class InitAdmin extends Command
["name"=>"mint","url"=>"/mint","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
]; break;
case 'CEBG' : $menu = [
["name"=>"apply","url"=>"/apply","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"audit","url"=>"/audit","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"execute","url"=>"/execute","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"申请","url"=>"/apply","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"初审","url"=>"/audit","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"终审","url"=>"/final-audit","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"执行","url"=>"/execute","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
]; break;
}
return $menu;
@ -144,8 +145,12 @@ class InitAdmin extends Command
["name"=>"查看申请","controller"=>"ApplyController","action"=>"show","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"提交申请","controller"=>"ApplyController","action"=>"create","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"撤销申请","controller"=>"ApplyController","action"=>"destroy","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"通过申请","controller"=>"ApplyController","action"=>"pass","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"不通过申请","controller"=>"ApplyController","action"=>"noPass","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"通过初审","controller"=>"ApplyController","action"=>"pass","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"不通过初审","controller"=>"ApplyController","action"=>"noPass","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"通过终审","controller"=>"ApplyController","action"=>"passFinal","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"不通过终审","controller"=>"ApplyController","action"=>"noPassFinal","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"执行申请","controller"=>"ApplyController","action"=>"execute","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
["name"=>"驳回申请","controller"=>"ApplyController","action"=>"reject","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],
]; break;
case '用户管理' : $node = [
["name"=>"用户列表","controller"=>"UserController","action"=>"index","pid"=>$id,"created_at"=>date('Y-m-d H:i:s',time()),"updated_at"=>date('Y-m-d H:i:s',time())],

View File

@ -4,55 +4,59 @@ namespace App\Http\Controllers;
use App\Models\ApplyModel;
use App\Models\MintModel;
use App\Models\NodeGroup;
use App\Models\User;
use App\Models\UserNodeLine;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Http;
class ApplyController extends Controller
{
//
//查看申请记录
public function index($type,Request $request){
$size = $request->get('size', 10);
// $node_id = UserNodeLine::where('user_id',auth()->id())->pluck('node_group_id')->toArray();
//// dump($node_id);die;
//当用户是申请组
if ($type==1){
$data = ApplyModel::withTrashed()->where('creator_account',auth()->user()->account)->orderBy('id','desc')->paginate($size)->toArray();
$data = ApplyModel::with('mint')->where('creator_account',auth()->user()->account)->orderBy('id','desc')->paginate($size)->toArray();
if ($data['data'] ){
$data['data'] = $this->_changeExecuteState($data['data']);
}
return $this->success($data);
}
//当用户是审核组
//当用户是审核组
if ($type==2){
$data = ApplyModel::orderBy('id','desc')->paginate($size)->toArray();
$data = ApplyModel::with('mint')->orderBy('id','desc')->paginate($size)->toArray();
if ($data['data'] ){
$data['data'] = $this->_changeExecuteState($data['data']);
}
return $this->success($data);
}
//当用户是终于审核组
if ($type==3){
$data = ApplyModel::with('mint')->where('audit_state_one',1)->orderBy('id','desc')->paginate($size)->toArray();
if ($data['data'] ){
$data['data'] = $this->_changeExecuteState($data['data']);
}
return $this->success($data);
}
//当用户是执行组
if ($type==3){
$data = ApplyModel::with('mint')->where('state',1)->orderBy('id','desc')->paginate($size)->toArray();
if ($type==4){
$data = ApplyModel::with('mint')->where('audit_state_one',1)->where('audit_state_two',1)->orderBy('id','desc')->paginate($size)->toArray();
if ($data['data'] ){
$arr = $data['data'];
foreach ($arr as $key=>$item){
if ($arr[$key]['mint'] && ! $arr[$key]['mint']['suspend'] && ! $arr[$key]['mint']['done']){
$arr[$key]['execute_state'] = 1;
}
if ($arr[$key]['mint'] && $arr[$key]['mint']['done']){
$arr[$key]['execute_state'] = 2;
}
if ($arr[$key]['mint'] && $arr[$key]['mint']['suspend']){
$arr[$key]['execute_state'] = 3;
}
unset($arr[$key]['mint']);
}
// dump($arr);
$data['data'] = $arr;
$data['data'] = $this->_changeExecuteState($data['data']);
}
return $this->success($data);
}
}
//添加申请
public function create(Request $request){
$validator = Validator::make($request->all(),[
'item_id' => 'required',
@ -103,14 +107,22 @@ class ApplyController extends Controller
$data['unikey'] = date('ymd_his',time()).'_'.$unikey_id;
$data['create_time'] = time();
$res = ApplyModel::insert($data);
$res = ApplyModel::create($data);
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
Cache::increment('unikey_id');
$msg = [
'role'=>'初审员',
'what' => '申请',
'do' => '审核',
'state' => 1
];
$this->_sendEmail('初审组',$msg);
return $this->success([]);
}
//查看申请详情
public function show($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
@ -119,12 +131,13 @@ class ApplyController extends Controller
return $this->success($data);
}
//撤销道具申请
public function destroy($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$model = ApplyModel::find($id);
if (!$model || $model->state){
if (!$model || $model->audit_state_one || $model->audit_state_two){
return $this->error(ERROR_CODE_PARAM_INVALID,'无法撤销');
}
$res = $model->delete();
@ -134,42 +147,122 @@ class ApplyController extends Controller
return $this->success([]);
}
//初审通过申请
public function pass($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$model = ApplyModel::find($id);
if (!$model || $model->state){
if (!$model || $model->audit_state_one){
return $this->error(ERROR_CODE_PARAM_INVALID,'无需审核');
}
$model->audit_account = auth()->user()->account;
$model->audit_time = time();
$model->state = 1;
$model->audit_state_one = 1;
$res = $model->save();
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
$msg = [
'role'=>'终审员',
'what' => '审核',
'do' => '终审',
'state' => 1
];
$this->_sendEmail('终审组',$msg);
return $this->success([]);
}
//初审不通过申请
public function noPass($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$model = ApplyModel::find($id);
if (!$model || $model->state){
if (!$model || $model->audit_state_one){
return $this->error(ERROR_CODE_PARAM_INVALID,'无需审核');
}
$model->audit_account = auth()->user()->account;
$model->audit_time = time();
$model->state = 2;
$model->audit_state_one = 2;
$res = $model->save();
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
$msg = [
'role'=>'申请员',
'what' => '初审',
'do' => '',
'state' => 2
];
$user = User::where('account',$model->creator_account)->first();
// dump($model);die;
if ($user->email){
$this->_notPassSendEmail($user->email,$msg);
}
return $this->success([]);
}
//终审通过申请
public function passFinal($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$model = ApplyModel::find($id);
if (!$model || $model->audit_state_two){
return $this->error(ERROR_CODE_PARAM_INVALID,'无需审核');
}
$model->audit_final_account = auth()->user()->account;
$model->audit_final_time = time();
$model->audit_state_two = 1;
$res = $model->save();
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
$msg = [
'role'=>'执行员',
'what' => '执行',
'do' => '执行',
'state' => 1
];
$this->_sendEmail('执行组',$msg);
return $this->success([]);
}
//终审不通过申请
public function noPassFinal($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$model = ApplyModel::find($id);
if (!$model || ! $model->audit_state_one || $model->audit_state_two ){
return $this->error(ERROR_CODE_PARAM_INVALID,'无需审核');
}
$model->audit_final_account = auth()->user()->account;
$model->audit_final_time = time();
$model->audit_state_two = 2;
$res = $model->save();
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
$msg = [
'role'=>'申请员',
'what' => '终审',
'do' => '',
'state' => 2
];
$user = User::where('account',$model->creator_account)->first();
if ($user->email){
$this->_notPassSendEmail($user->email,$msg);
}
return $this->success([]);
}
//执行道具申请
public function execute($id){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
@ -199,10 +292,93 @@ class ApplyController extends Controller
}
$data->execute_account = auth()->user()->account;
$data->execute_time = time();
$data->execute_state = 1;
$res = $data->save();
if(! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
};
return $this->success([]);
}
//驳回道具申请
public function reject($id,Request $request){
if (! is_numeric($id)){
return $this->error(ERROR_CODE_PARAM_INVALID,'参数格式不对');
}
$validator = Validator::make($request->all(),[
'reject_reason' => 'required',
], [
'reject_reason.required' => '驳回原因不能为空',
]);
if ($validator->fails()){
return $this->error(ERROR_CODE_PARAM_INVALID,$validator->errors()->first());
}
$reject_reason = $request->get('reject_reason');
$data = ApplyModel::find($id);
if (!$data){
return $this->error(ERROR_CODE_NO,'数据不存在');
}
if ($data->execute_state != 0){
return $this->error(ERROR_CODE_NO,'无法驳回');
}
$data->execute_state = -1;
$data->reject_reason = $reject_reason;
$data->save();
$msg = [
'role'=>'申请员',
'what' => '申请',
'do' => '',
'state' => 3
];
$user = User::where('account',$data->creator_account)->first();
if ($user->email){
$this->_notPassSendEmail($user->email,$msg);
}
return $this->success();
}
//查看申请记录的执行状态
private function _changeExecuteState($arr){
foreach ($arr as $key=>$item){
if (! $arr[$key]['mint'] && $arr[$key]['execute_state'] != -1){
$arr[$key]['execute_state'] = 0;
}
if ($arr[$key]['mint'] && ! $arr[$key]['mint']['suspend'] && ! $arr[$key]['mint']['done']){
$arr[$key]['execute_state'] = 1;
}
if ($arr[$key]['mint'] && $arr[$key]['mint']['done']){
$arr[$key]['execute_state'] = 2;
}
if ($arr[$key]['mint'] && $arr[$key]['mint']['suspend']){
$arr[$key]['execute_state'] = 3;
}
unset($arr[$key]['mint']);
}
return $arr;
}
private function _sendEmail($nodeGroup,$msg){
$data = NodeGroup::with('user')->where('name',$nodeGroup)->first();
if ($data){
$data = $data->toArray();
if ($data['user']){
foreach ($data['user'] as $val){
Mail::send('email',compact('msg'),function(Message $message) use ($val){
$message->to($val['email']);
$message -> subject('Nft申请通知');
});
}
}
Log::error($nodeGroup.'内不存在有权限的用户');
}
Log::error('无法识别出'.$nodeGroup);
}
private function _notPassSendEmail($email,$msg){
Mail::send('email',compact('msg'),function(Message $message) use ($email){
$message->to($email);
$message -> subject('Nft申请通知');
});
}
}

View File

@ -4,18 +4,30 @@ namespace App\Http\Controllers;
use App\Exports\MintExport;
use App\Models\NftModel;
use App\Models\NodeGroup;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Maatwebsite\Excel\Facades\Excel;
use Illuminate\Support\Carbon;
class IndexController extends Controller
{
//
// 首页-dashboard
public function index(){
// $data = DB::table('t_mint')->get()->toArray();
// dump($data);
// echo uniqid().md5(strtotime(now('')));
return $this->success([],'访问主页');
$nft_sum = NftModel::count();
$start_time = strtotime(Carbon::now()->startOfMonth());
$end_time = strtotime(Carbon::now()->endOfMonth());
$nft_month_num = NftModel::whereBetween('createtime',[$start_time,$end_time])->count();
$data = [
'nft_sum' => $nft_sum,
'nft_month_num' => $nft_month_num
];
return $this->success($data);
}
/**
@ -36,4 +48,38 @@ class IndexController extends Controller
$name = ucwords($name);
return 'App\Exports\\'.$name.'Export';
}
public function sendEmail(){
// Mail::raw('测试',function (Message $message){
// $message->to('hujiabin@kingsome.cn','CEBG');
// $message->subject('James');
// });
// return view('email',['role'=>$role]);
$msg = [
'role'=>'初审员',
'what' => '申请',
'do' => '审核'
];
$data = NodeGroup::with('user')->where('name','初审组')->first();
if ($data){
$data = $data->toArray();
if ($data['user']){
foreach ($data['user'] as $val){
Mail::send('email',compact('msg'),function(Message $message) use ($val){
$message->to($val['email']);
$message -> subject('Nft申请通知');
});
}
}
Log::warning('初审组内不存在有权限的用户');
}
Log::warning('无法识别出初审组');
// dump($user);
// dump($data->toArray());
}
}

View File

@ -131,6 +131,24 @@ class UserController extends Controller
return $this->success([],'修改成功');
}
//修改昵称
public function updateEmail($id,Request $request){
$validator = Validator::make($request->all(),[
'email' => 'required',
], [
'nickname.required' => '用户邮箱不能为空',
]);
if ($validator->fails()){
return $this->error(ERROR_CODE_PARAM_INVALID,$validator->errors()->first());
}
$res = User::where('id',$id)->update($request->input());
if (! $res){
return $this->error(ERROR_CODE_NO,'系统繁忙,稍后再试');
}
return $this->success([],'修改成功');
}
public function myMenu() {
$user = User::with([
'menu' => function ($query) {

View File

@ -11,6 +11,9 @@ class ApplyModel extends Model
use HasFactory,SoftDeletes;
public $table = 'applys';
public $timestamps = false;
protected $fillable = [
'unikey','item_id','creator_account','reason','send_account','create_time'
];
public function getCreateTimeAttribute($value)
{

View File

@ -9,4 +9,8 @@ class NodeGroup extends Model
{
use HasFactory;
public $table = 'node_group';
public function user () {
return $this->belongsToMany(User::class, 'user_node_line', 'node_group_id','user_id');
}
}

View File

@ -19,6 +19,7 @@ class CreateUsersTable extends Migration
$table->id();
$table->string('nickname',32)->default('')->comment("昵称");
$table->string('account',64)->comment("小狐狸钱包账号");
$table->string('email',64)->default('')->comment("邮箱");
$table->timestamps();
$table->softDeletes();
});

View File

@ -21,11 +21,16 @@ class CreateApplysTable extends Migration
$table->string('creator_account',64)->comment('申请人账号');
$table->text('reason')->comment('申请原因');
$table->string('send_account',64)->comment('颁发给账号');
$table->tinyInteger('state')->default(0)->comment('0待审核1通过2未通过');
$table->string('audit_account',64)->default('')->comment('审核人账号');
$table->tinyInteger('audit_state_one')->default(0)->comment('初审状态0待审核1通过2未通过');
$table->tinyInteger('audit_state_two')->default(0)->comment('终审状态0待审核1通过2未通过');
$table->tinyInteger('execute_state')->default(0)->comment('执行状态0未执行1已执行-1被驳回');
$table->text('reject_reason')->nullable()->comment('驳回原因');
$table->string('audit_account',64)->default('')->comment('初审核人账号');
$table->string('audit_final_account',64)->default('')->comment('终审核人账号');
$table->string('execute_account',64)->default('')->comment('执行人账号');
$table->integer('create_time')->default(0)->comment('申请时间');
$table->integer('audit_time')->default(0)->comment('审核时间');
$table->integer('audit_time')->default(0)->comment('初审时间');
$table->integer('audit_final_time')->default(0)->comment('终审时间');
$table->integer('execute_time')->default(0)->comment('执行时间');
$table->softDeletes();
});

BIN
public/img/audit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -0,0 +1,239 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div>
<includetail>
<div style="font:Verdana normal 14px;color:#000;">
<div style="position:relative;">
<div class="eml-w eml-w-sys-layout">
{{--页眉--}}
<div style="font-size: 0px;">
{{--分割线--}}
<div class="eml-w-sys-line">
<div class="eml-w-sys-line-left"></div>
<div class="eml-w-sys-line-right"></div>
</div>
{{-- LOGO --}}
<div class="eml-w-sys-logo">
<img src="https://rescdn.qqmail.com/node/wwqy/qymng/style/images/sass/independent/welcome_eml_logo.png" style="width: 34px; height: 24px;" onerror="">
</div>
</div>
{{--以下写正文--}}
<div class="eml-w-sys-content">
{{--以下写正文--}}
<div class="dragArea gen-group-list">
{{-- 普通的文本 --}}
<div class="gen-item">
<div class="eml-w-item-block" style="padding: 0px;">
<div class="eml-w-phase-normal-16" style="font-weight: bold">你好!</div>
</div>
</div>
{{-- 普通的文本【自定义样式】 --}}
<div class="gen-item">
{{-- padding:行间距 --}}
<div class="eml-w-item-block" style="padding: 0px;">
<div class="eml-w-phase-normal-16" style="color: red;text-align: center;font-weight:bold;font-size: 20px"> {{$msg['role']}} </div>
</div>
</div>
{{-- 一级标题 --}}
<div class="gen-item">
<div class="eml-w-item-block" style="padding: 0px;">
<div class="eml-w-title-level1" >{{$msg['what']}}通知:</div>
</div>
</div>
{{-- 二级标题,以及正文--}}
<div class="gen-item" draggable="false">
<div class="eml-w-item-block" style="padding: 0px 0px 0px 1px;">
{{-- 二级标题--}}
@if($msg['state']==1)
<div class="eml-w-title-level3">投放系统收到新{{$msg['what']}}通知,需要您来{{$msg['do']}}...</div>
@endif
@if($msg['state']==2)
<div class="eml-w-title-level3">投放系统收到的新申请,在{{$msg['what']}}中未被通过...</div>
@endif
@if($msg['state']==3)
<div class="eml-w-title-level3">投放系统收到的新申请已被驳回,驳回原因可以查看申请详细记录</div>
@endif
</div>
</div>
{{--显示图片--}}
<div class="gen-item" draggable="false">
<div class="eml-w-item-block" style="padding: 0px;">
<div class="eml-w-picture-wrap">
<img src="/img/audit.png"
class="eml-w-picture-full-img" style="max-width: 100%;" draggable="false" >
</div>
</div>
</div>
</div>
</div>
{{-- 署名 --}}
<div class="eml-w-sys-footer">CEBG投放系统</div>
</div>
</div>
</div>
</includetail>
</div>
</body>
</html>
<style>
.eml-w .eml-w-phase-normal-16 {
color: #2b2b2b;
font-size: 16px;
line-height: 1.75
}
.eml-w .eml-w-phase-bold-16 {
font-size: 16px;
color: #2b2b2b;
font-weight: 500;
line-height: 1.75
}
.eml-w-title-level1 {
font-size: 20px;
font-weight: 500;
padding: 15px 0
}
.eml-w-title-level3 {
font-size: 16px;
font-weight: 500;
padding-bottom: 10px
}
.eml-w-title-level3.center {
text-align: center
}
.eml-w-phase-small-normal {
font-size: 14px;
color: #2b2b2b;
line-height: 1.75
}
.eml-w-picture-wrap {
padding: 10px 0;
width: 100%;
overflow: hidden
}
.eml-w-picture-full-img {
display: block;
width: auto;
max-width: 100%;
margin: 0 auto
}
.eml-w-sys-layout {
background: #fff;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, .2);
border-radius: 4px;
margin: 50px auto;
max-width: 700px;
overflow: hidden
}
.eml-w-sys-line-left {
display: inline-block;
width: 88%;
background: #2984ef;
height: 3px
}
.eml-w-sys-line-right {
display: inline-block;
width: 11.5%;
height: 3px;
background: #8bd5ff;
margin-left: 1px
}
.eml-w-sys-logo {
text-align: right
}
.eml-w-sys-logo img {
display: inline-block;
margin: 30px 50px 0 0
}
.eml-w-sys-content {
position: relative;
padding: 20px 50px 0;
min-height: 216px;
word-break: break-all
}
.eml-w-sys-footer {
font-weight: 500;
font-size: 12px;
color: #bebebe;
letter-spacing: .5px;
padding: 0 0 30px 50px;
margin-top: 60px
}
.eml-w {
font-family: Helvetica Neue, Arial, PingFang SC, Hiragino Sans GB, STHeiti, Microsoft YaHei, sans-serif;
-webkit-font-smoothing: antialiased;
color: #2b2b2b;
font-size: 14px;
line-height: 1.75
}
.eml-w a {
text-decoration: none
}
.eml-w a, .eml-w a:active {
color: #186fd5
}
.eml-w h1, .eml-w h2, .eml-w h3, .eml-w h4, .eml-w h5, .eml-w h6, .eml-w li, .eml-w p, .eml-w ul {
margin: 0;
padding: 0
}
.eml-w-item-block {
margin-bottom: 10px
}
@media (max-width: 420px) {
.eml-w-sys-layout {
border-radius: none !important;
box-shadow: none !important;
margin: 0 !important
}
.eml-w-sys-layout .eml-w-sys-line {
display: none
}
.eml-w-sys-layout .eml-w-sys-logo img {
margin-right: 30px !important
}
.eml-w-sys-layout .eml-w-sys-content {
padding: 0 35px !important
}
.eml-w-sys-layout .eml-w-sys-footer {
padding-left: 30px !important
}
}
</style>

View File

@ -16,10 +16,13 @@ use Illuminate\Support\Facades\Route;
//Route::post('login',[\App\Http\Controllers\LoginController::class,'login']);
Route::get('get-nonce',[\App\Http\Controllers\MeteMaskLoginController::class,'getNonce']);
Route::post('metamask-login',[\App\Http\Controllers\MeteMaskLoginController::class,'mateMaskLogin']);
//Route::get('home',[\App\Http\Controllers\IndexController::class,'index']);
Route::get('email',[\App\Http\Controllers\IndexController::class,'sendEmail']);
Route::middleware('auth:api')->group(function () {
Route::get('logout',[\App\Http\Controllers\MeteMaskLoginController::class,'logout']);
Route::get('home',[\App\Http\Controllers\IndexController::class,'index']);
Route::get('my-menu',[\App\Http\Controllers\UserController::class,'myMenu']);
Route::get('update-nickname',[\App\Http\Controllers\UserController::class,'update']);
@ -36,11 +39,15 @@ Route::middleware('auth:api')->group(function () {
Route::delete('apply/{id}',[\App\Http\Controllers\ApplyController::class,'destroy']);
Route::get('apply/pass/{id}',[\App\Http\Controllers\ApplyController::class,'pass']);
Route::get('apply/no-pass/{id}',[\App\Http\Controllers\ApplyController::class,'noPass']);
Route::get('apply/pass-final/{id}',[\App\Http\Controllers\ApplyController::class,'passFinal']);
Route::get('apply/no-pass-final/{id}',[\App\Http\Controllers\ApplyController::class,'noPassFinal']);
Route::get('apply/execute/{id}',[\App\Http\Controllers\ApplyController::class,'execute']);
Route::post('apply/reject/{id}',[\App\Http\Controllers\ApplyController::class,'reject']);
Route::Resource('user',\App\Http\Controllers\UserController::class);
Route::get('show-menu/{id}',[\App\Http\Controllers\UserController::class,'showMenu']);
Route::put('update-email/{id}',[\App\Http\Controllers\UserController::class,'updateEmail']);
Route::post('allot-node-group/{id}',[\App\Http\Controllers\UserController::class,'allotNodeGroup']);
Route::post('allot-menu/{id}',[\App\Http\Controllers\UserController::class,'allotMenu']);

File diff suppressed because it is too large Load Diff