Commit 5ab76182 by yink

feat: 新增员工管理功能并优化日志处理

- 新增员工管理功能,包括员工列表、员工分配、员工返佣比例等
- 优化日志处理逻辑,重构Log类,提高日志记录的效率和可读性
- 修复部分日志方法调用错误,统一使用Log::add方法
- 更新.gitignore,排除storage目录
- 清理无用的视图缓存文件
parent 523cc838
......@@ -17,4 +17,5 @@ yarn-error.log
/.fleet
/.idea
/.vscode
*.log
\ No newline at end of file
*.log
/storage
\ No newline at end of file
......@@ -90,7 +90,7 @@ public function download()
# 对账单下载
$bill->download(strval($date));
//Log::addByName('billDownloadUrl', $date);
//Log::add('billDownloadUrl', $date);
// 检查 $bill->result 是否为数组
if (is_array($bill->result)) {
......@@ -121,7 +121,7 @@ public function download()
}
if($billDownloadUrl == ''){
Log::addByName('billDownloadUrl', $responseData);
Log::add('billDownloadUrl', $responseData);
return Tools::JsonResponse(['url' => $billDownloadUrl], "下载失败,请查看日志", 501);
}
......
......@@ -41,6 +41,14 @@ protected function grid()
$grid->column('phone');
$grid->column('account', '登录账号');
$grid->column('buycode', '直购码');
$grid->column('buycodeBtn', '绑定用户列表')->display(function() {
if (!$this->buycode) {
return '无直购码';
}
return '<a href="/user?buycode='.$this->buycode.'" class="btn btn-primary" target="_blank">查看绑定用户</a>';
});
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
$grid->disableViewButton();
......
<?php
namespace App\Admin\Controllers;
use App\Models\StoreAdminUsers;
use App\Models\Merchant;
use App\Models\Good;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Illuminate\Support\Facades\Hash;
use Dcat\Admin\Http\Controllers\AdminController;
use Illuminate\Support\Facades\DB;
use App\Models\Adapay;
class StoreAdminEmployeeController extends AdminController
{
/**
* Make a grid builder.
*
* @return Grid
*/
protected function grid()
{
return Grid::make(StoreAdminUsers::with(['merchant', 'store']), function (Grid $grid) {
$grid->model()->where('role_id', 3); //3: 员工
$grid->model()->orderBy('created_at', 'DESC');
$grid->column('id')->sortable();
$grid->column('name', '姓名');
$grid->column('username', '登录账号');
$grid->column('merchant.name', '所属商家');
$grid->column('store.title', '所属门店');
$grid->column('employee_commission', '员工返佣比例');
$grid->column('member_id', '汇付用户ID');
// $grid->column('created_at');
// $grid->column('updated_at')->sortable();
$grid->disableViewButton();
$grid->filter(function (Grid\Filter $filter) {
// 更改为 panel 布局
$filter->panel();
$filter->like('name', '姓名')->width(3);
$filter->like('username', '登录账号')->width(3);
$filter->like('merchant.name', '所属商家')->width(3);
$filter->like('store.title', '所属门店')->width(3);
});
});
}
/**
* Make a show builder.
*
* @param mixed $id
*
* @return Show
*/
protected function detail($id)
{
// return Show::make($id, new Verifier(), function (Show $show) {
// $show->field('id');
// $show->field('merchant_id');
// $show->field('store_id');
// $show->field('created_at');
// $show->field('updated_at');
// });
}
/**
* Make a form builder.
*
* @return Form
*/
protected function form()
{
$form = Form::make(new StoreAdminUsers(), function (Form $form) {
$form->display('id');
//$form->ignore(['pwd']); // 忽略password字段
$form->text('name')->required();
$form->text('username','登录账号')
->required()
->help('字母数字组合,长度大于5个字符')
->rules(function (Form $form) {
/**
* 用户名唯一性验证规则
* 功能:验证用户名是否已存在
* 参数:$form 表单实例
* 返回值:string 验证规则字符串
* 注意事项:编辑时排除当前记录
*/
$rule = 'unique:store_admin_users,username';
if ($id = $form->model()->id) {
$rule .= ','.$id;
}
return $rule;
}, [
'unique' => '该登录账号已被使用,请更换'
]);
if ($form->isCreating()) {
$form->password('password', '密码')->saving(function ($password) {
return bcrypt($password);
})->help('字母数字组合,长度大于5个字符');
// } else {
// $form->text('password', '密码')->help('密码为空则不修改');
// $form->password = '';
}
if ($form->isEditing()) {
$form->text('pwd', '密码')->help('密码为空则不修改');
}
$form->text('employee_commission', '员工返佣比例')->help("在商家佣金中的比例,如:20")->required();
$form->hidden('role_id')->default(3); //员工
// 如果是创建模式,执行相关操作
$form->select('merchant_id', '商家名称')
->options(Merchant::whereNull('deleted_at')->get()->pluck('name', 'id'))
->load('store_id', '/get-store-list');
$form->select('store_id', '门店名称');
$form->disableCreatingCheck();
$form->disableEditingCheck();
$form->disableViewCheck();
$form->disableDeleteButton();
$form->disableViewButton();
});
//副表保存规格
$form->saved(
function (Form $form, $result) {
$store_admin_users_id = $form->getKey();
$pwd = $form->model()->pwd;
//更新信息
if ($pwd) {
$data = ['password' => bcrypt($pwd), 'pwd' => ''];
DB::table('store_admin_users')->where("id", $store_admin_users_id)->update($data);
}
}
);
// //对接汇付-创建个人对象【员工绑定银行卡再创建】
// if (!$form->member_id) {
// $result = (new Adapay())->createMember($form->display('id'), $user->phone);
// if (isset($result['status']) && $result['status'] == 'succeeded') {
// DB::table('users')->where('id', $user->id)->update(['member_id' => $result['member_id']]);
// }
// }
return $form;
}
}
......@@ -72,7 +72,25 @@ protected function form()
$form->display('id');
//$form->ignore(['pwd']); // 忽略password字段
$form->text('name')->required();
$form->text(column: 'username');
$form->text('username','登录账号')
->required()
->help('字母数字组合,长度大于5个字符')
->rules(function (Form $form) {
/**
* 用户名唯一性验证规则
* 功能:验证用户名是否已存在
* 参数:$form 表单实例
* 返回值:string 验证规则字符串
* 注意事项:编辑时排除当前记录
*/
$rule = 'unique:store_admin_users,username';
if ($id = $form->model()->id) {
$rule .= ','.$id;
}
return $rule;
}, [
'unique' => '该登录账号已被使用,请更换'
]);
if ($form->isCreating()) {
$form->password('password', '密码')->saving(function ($password) {
return bcrypt($password);
......
......@@ -13,6 +13,11 @@
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;
use Illuminate\Support\Facades\DB;
use App\Command\Log;
use App\Models\StoreEmployeeUserRec;
use App\Admin\Forms\EmployeeForm;
class UserController extends AdminController
{
......@@ -25,6 +30,11 @@ protected function grid()
{
return Grid::make(User::with(['shuser']), function (Grid $grid) {
$grid->addTableClass(['table-text-center']);
$grid->model()->when(request('buycode'), function ($query) {
$query->where('buycode', request('buycode'));
});
$grid->model()->orderBy('created_at', 'DESC');
$grid->column('id')->sortable();
$grid->column('avatar', '头像')->image('', 50, 50);
......@@ -33,6 +43,44 @@ protected function grid()
$grid->column('balance', '总金额');
$grid->column('shuser.name', '所属上级');
$grid->column('buycode', '直购码');
$grid->column('assigned_employees', '分配员工')
->display(function () {
/**
* 获取分配员工信息
* 功能:显示当前用户分配的员工姓名,未分配时返回"未分配"
* 返回值:string 员工姓名或"未分配"
* 注意事项:仅当用户有buycode时才显示分配状态
*/
$employeeRec = StoreEmployeeUserRec::where('user_id', $this->id)
->with('employee')
->first();
if (!$employeeRec) {
return $this->buycode != '' ? '未分配' : '';
}
return $employeeRec->employee->name ?? '未分配';
})->if(function () {
/**
* 判断是否显示分配按钮
* 功能:决定是否显示"点击分配"按钮
* 返回值:bool 是否显示分配按钮
* 注意事项:必须同时满足有buycode且筛选条件中有buycode
*/
return request('buycode') != '';
})->modal(function (Grid\Displayers\Modal $modal) {
// 标题
$modal->title('分配员工');
// 自定义图标
$modal->icon('feather icon-edit');
// 传递当前行字段值
return EmployeeForm::make()->payload([
'id' => $this->id,
'buycode' => request('buycode')
]);
});
//$grid->column('status', '状态')->switch('', true);
$grid->column('created_at', '注册时间')->display(function ($val) {
return date("Y-m-d H:i:s", strtotime($this->created_at));
......
<?php
namespace App\Admin\Forms;
use App\Command\Log;
use App\Models\StoreAdminUsers as StoreEmployee;
use App\Models\StoreEmployeeUserRec;
use App\Models\User;
use Dcat\Admin\Widgets\Form;
use Dcat\Admin\Contracts\LazyRenderable;
use Dcat\Admin\Traits\LazyWidget;
use Illuminate\Support\Facades\DB;
class EmployeeForm extends Form implements LazyRenderable
{
use LazyWidget;
/**
* 处理表单请求
* 功能:保存用户与员工的关联关系
* 参数:$input 表单提交数据
* 返回值:mixed 操作结果
* 异常:数据库操作异常
*/
public function handle(array $input)
{
$userId = $this->payload['id'];
$employeeId = $input['employee_id'];
DB::beginTransaction();
try {
// 删除原有关联
StoreEmployeeUserRec::where('user_id', $userId)->delete();
// 创建新关联
$result = StoreEmployeeUserRec::create([
'user_id' => $userId,
'employee_id' => $employeeId,
'created_at' => now()
]);
if (!$result) {
throw new \Exception('创建关联记录失败');
}
DB::commit();
Log::Add('debug', "用户{$userId}分配员工{$employeeId}成功");
return $this->response()
->success('分配成功')
->refresh();
} catch (\Exception $e) {
DB::rollBack();
Log::Add('error', "员工分配失败: ".$e->getMessage());
return $this->response()
->error('分配失败: '.$e->getMessage());
}
}
/**
* 构建表单
* 功能:创建员工选择表单
* 参数:无
* 返回值:void
* 注意事项:根据buycode筛选员工
*/
public function form()
{
/**
* 构建表单
* 功能:创建员工选择表单
* 参数:无
* 返回值:void
* 注意事项:根据buycode筛选员工
*/
$buycode = $this->payload['buycode'] ?? null;
$this->select('employee_id', '选择员工')
->options(function () use ($buycode) {
$query = StoreEmployee::where('role_id', 3);
if ($buycode) {
$query->whereHas('merchant', function($q) use ($buycode) {
$q->where('buycode', $buycode);
});
}
return $query->get()->pluck('name', 'id');
})
->required()
->rules('required');
}
/**
* 表单默认数据
* 返回值:array 空数组
*/
public function default()
{
return [];
}
}
......@@ -74,6 +74,7 @@
$router->resource('buycode-check', 'UserBuycodeCheckController'); //直购码审核
$router->resource('verifier', 'StoreAdminUsersController'); //核销员列表
$router->resource('employee', 'StoreAdminEmployeeController'); //员工列表
$router->resource('comment', 'CommentController'); //评论列表
......
......@@ -3,6 +3,7 @@
namespace App\Handlers;
use Illuminate\Support\Facades\Cache;
use App\Command\Log;
//小程序accesstoken
class MpAaccessToken
......@@ -47,7 +48,7 @@ public function getAccessToken($force = false)
Cache::set('access_token_expire_time', $data);
return $data['access_token'];
} else {
Log::Add('debug', '获取access_token失败: ' . json_encode($res));
Log::add('debug', '获取access_token失败: ' . json_encode($res));
throw new \Exception('获取access_token失败');
}
}
......
......@@ -59,7 +59,6 @@ public function manualDivide(Request $request)
return $this->JsonResponse('', '参数 amount、payment_id 不能为空', 201);
}
//参数介绍member_id:汇付会员id,amount:分账金额,fee_flag:是否内扣手续费
$div_members = ['member_id' => $member_id, 'amount' => sprintf("%.2f", $amount), 'fee_flag' => 'Y'];
$confirm_amt = sprintf("%.2f", $amount); // 确保金额格式化为两位小数
......@@ -75,7 +74,7 @@ public function manualDivide(Request $request)
// $payment_params['div_members'] = $div_members;
// $payment_params['confirm_amt'] = $confirm_amt;
//Log::addByName('manualDivide手动分账' , $payment_params);
//Log::add('manualDivide手动分账' , $payment_params);
# 发起支付确认创建
$payment_confirm->create($payment_params);
......@@ -88,12 +87,12 @@ public function manualDivide(Request $request)
if ($payment_confirm->isError()) {
//失败处理
Log::addByName('manualDivide手动分账', json_encode($logData, JSON_UNESCAPED_UNICODE));
Log::add('manualDivide手动分账', json_encode($logData, JSON_UNESCAPED_UNICODE));
return $this->JsonResponse($logData, '支付确认失败', 201);
} else {
//成功处理
$result = $payment_confirm->result;
Log::addByName('manualDivide手动分账', json_encode($logData, JSON_UNESCAPED_UNICODE));
Log::add('manualDivide手动分账', json_encode($logData, JSON_UNESCAPED_UNICODE));
if ($result['status'] == 'succeeded') {
//写入支付确认信息
......@@ -148,11 +147,16 @@ public function updateOrderStatusToDiv(Request $request)
$orderObj->save();
} else {
//分账失败,记录日志
Log::addByName('updateOrderStatusToDiv分账失败', json_encode($order, JSON_UNESCAPED_UNICODE));
Log::add('updateOrderStatusToDiv分账失败', json_encode($order, JSON_UNESCAPED_UNICODE));
}
}
}
return $this->JsonResponse([]);
}
}
......@@ -18,6 +18,7 @@ class OrderDivideRecord extends Model
2 => '间推佣金',//需求调整,不再分账,改成积分,支付时抵扣
3 => '用户取货佣金',
4 => '手动调账分账',
5 => '员工佣金',
];
/**
......@@ -103,7 +104,7 @@ public static function divide($order_id, $payconfirm_no = '')
* @param string $commission 佣金比例
* @param int $um_id 用户或商户ID
* @param int $buyer_id 买家ID
* @param int $sh_type 分账类型
* @param int $sh_type 分账类型 推送类型 1:直推 2:间推 3:公司 4:手动分账 5:员工
* @param int $isExistAccount 是否实名
* @param string $payconfirm_no 支付确认编号
*/
......
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class StoreEmployeeUserRec extends Model
{
/**
* 禁用时间戳
* 功能:禁用模型的自动时间戳更新
* 返回值:bool 是否禁用时间戳
* 注意事项:此表不包含updated_at字段
*/
public $timestamps = false;
/**
* 可批量赋值的属性
* 功能:定义允许通过create方法批量赋值的字段
* 返回值:array 可批量赋值的字段数组
* 注意事项:必须包含所有需要通过create方法赋值的字段
*/
protected $fillable = [
'user_id',
'employee_id',
'created_at'
];
protected $table = 'store_employee_user_rec';
//分享人信息
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
//分享人信息
public function employee()
{
return $this->belongsTo(StoreAdminUsers::class, 'employee_id');
}
}
......@@ -29,6 +29,8 @@ public function shuser()
return $this->belongsTo(User::class, 'spuid');
}
//获取指定天数注册数
public static function getNumDayData($dayNum)
{
......
......@@ -81,7 +81,7 @@ public static function pointChangeRecord($user_id, $point_amount, $change_type
}
DB::commit();
Log::addByName('pay', [
Log::add('pay', [
'user_id' => $user_id,
'point_amount' => $point_amount,
'change_type' => $change_type,
......@@ -90,7 +90,7 @@ public static function pointChangeRecord($user_id, $point_amount, $change_type
return true;
} catch (\Exception $e) {
DB::rollBack();
Log::addByName('pay', [
Log::add('pay', [
'user_id' => $user_id,
'point_amount' => $point_amount,
'error' => $e->getMessage()
......@@ -133,7 +133,7 @@ public static function pointUnfreeze($orderObj)
->get();
if ($records->isEmpty()) {
Log::addByName('point_unfreeze', [
Log::add('point_unfreeze', [
'order_id' => $orderObj->id,
'msg' => '没有找到可解冻的积分记录'
]);
......@@ -152,7 +152,7 @@ public static function pointUnfreeze($orderObj)
]);
DB::commit();
Log::addByName('point_unfreeze', [
Log::add('point_unfreeze', [
'order_id' => $orderObj->id,
'point_amount' => $records[0]->point_amount,
'freeze_end_date' => $freezeEndDate
......@@ -160,7 +160,7 @@ public static function pointUnfreeze($orderObj)
return true;
} catch (\Exception $e) {
DB::rollBack();
Log::addByName('point_unfreeze_error', [
Log::add('point_unfreeze_error', [
'order_id' => $orderObj->id,
'error' => $e->getMessage()
]);
......
<?php
return [
'labels' => [
'StoreAdminEmployee' => '员工列表',
'StoreAdminUsers' => '员工列表',
],
'fields' => [
'merchant_id' => '商户ID',
'store_id' => '门店ID',
'username' => '账号',
],
'options' => [],
];
......@@ -7,6 +7,7 @@
'fields' => [
'merchant_id' => '商户ID',
'store_id' => '门店ID',
'username' => '账号',
],
'options' => [],
];
......@@ -201,7 +201,6 @@
Route::get('merchant-order-collect', 'OrderController@orderCollect'); //商户端首页统计
/*------------------------------汇付天下------------------------------------*/
Route::post('hf-settle-account-delete', 'HfSettleAccountController@deleteAccount'); //汇付 删除结算账户
......
a:5:{s:6:"_token";s:40:"lDy1gvxe9uvq34XAskYEPOP3pXUIsMNLmOm9YdYG";s:52:"login_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d";i:1;s:5:"admin";a:1:{s:4:"prev";a:0:{}}s:6:"_flash";a:2:{s:3:"new";a:0:{}s:3:"old";a:0:{}}s:9:"_previous";a:1:{s:3:"url";s:27:"http://amy-test.yyinhong.cn";}}
\ No newline at end of file
a:5:{s:6:"_token";s:40:"N3jxHMzck3Bru39ffKlCcGPkQSdDUJMX9MJ6T01J";s:9:"_previous";a:1:{s:3:"url";s:27:"http://amy-test.yyinhong.cn";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}s:5:"admin";a:1:{s:4:"prev";a:0:{}}s:52:"login_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d";i:1;}
\ No newline at end of file
a:5:{s:6:"_token";s:40:"5PeCgE1JlPkfJG7oUMgSdHxDSJ7NgLGQK4vouWGB";s:52:"login_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d";i:1;s:5:"admin";a:1:{s:4:"prev";a:1:{s:3:"url";s:51:"http://aimeiyue.demo.cn/orderInfo?s=%2F%2ForderInfo";}}s:6:"_flash";a:2:{s:3:"new";a:0:{}s:3:"old";a:1:{i:0;s:14:"admin.prev.url";}}s:9:"_previous";a:1:{s:3:"url";s:51:"http://aimeiyue.demo.cn/orderInfo?s=%2F%2ForderInfo";}}
\ No newline at end of file
a:5:{s:6:"_token";s:40:"BBehqmaH1fAEZWehLVzaWcM9KbQ2Tr0SxJKCdmMv";s:52:"login_admin_59ba36addc2b2f9401580f014c7f58ea4e30989d";i:1;s:5:"admin";a:1:{s:4:"prev";a:1:{s:3:"url";s:59:"http://aimeiyue.demo.cn/orderInfo?page=10&s=%2F%2ForderInfo";}}s:6:"_flash";a:2:{s:3:"new";a:0:{}s:3:"old";a:1:{i:0;s:14:"admin.prev.url";}}s:9:"_previous";a:1:{s:3:"url";s:23:"http://aimeiyue.demo.cn";}}
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="card-header d-flex justify-content-between align-items-start pb-0">
<div>
<?php if($icon): ?>
<div class="avatar bg-rgba-<?php echo e($style, false); ?> p-50 m-0">
<div class="avatar-content">
<i class="<?php echo e($icon, false); ?> text-<?php echo e($style, false); ?> font-medium-5"></i>
</div>
</div>
<?php endif; ?>
<?php if($title): ?>
<h4 class="card-title mb-1"><?php echo $title; ?></h4>
<?php endif; ?>
<div class="metric-header"><?php echo $header; ?></div>
</div>
<?php if(! empty($subTitle)): ?>
<span class="btn btn-sm bg-light shadow-0 p-0">
<?php echo e($subTitle, false); ?>
</span>
<?php endif; ?>
<?php if(! empty($dropdown)): ?>
<div class="dropdown chart-dropdown">
<button class="btn btn-sm btn-light shadow-0 dropdown-toggle p-0 waves-effect" data-toggle="dropdown">
<?php echo e(current($dropdown), false); ?>
</button>
<div class="dropdown-menu dropdown-menu-right">
<?php $__currentLoopData = $dropdown; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><a href="javascript:void(0)" class="select-option" data-option="<?php echo e($key, false); ?>"><?php echo e($value, false); ?></a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<?php if(! empty($datepicker)): ?>
<div class="col-md-9 datepicker">
<div class="row">
<div class="col-lg-5 pl-0">
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text bg-white"><i class="feather icon-calendar"></i></span>
</span>
<input autocomplete="off" type="text" name="started" value="<?php echo e($datepicker['start'], false); ?>" class="form-control field_started" required="1" id="asdsss">
</div>
</div>
<div class="col-lg-5 pl-0">
<div class="input-group">
<span class="input-group-prepend">
<span class="input-group-text bg-white"><i class="feather icon-calendar"></i></span>
</span>
<input autocomplete="off" type="text" name="ended" value="<?php echo e($datepicker['end'], false); ?>" class="form-control field_ended" required="1" id="_35455a066a22a942">
</div>
</div>
<div class="col-lg-2 pl-0 pr-0">
<button class="btn btn-primary btn-outline-info" data-started="<?php echo e($datepicker['start'], false); ?>" data-ended="<?php echo e($datepicker['end'], false); ?>">
<span class="d-none d-sm-inline">查询</span>
</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div class="metric-content"><?php echo $content; ?></div>
</div><?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\resources\views/widgets/metrics/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<?php if($title || $tools): ?>
<div class="card-header <?php echo e($divider ? 'with-border' : '', false); ?>">
<span class="card-box-title"><?php echo $title; ?></span>
<div class="box-tools pull-right">
<?php $__currentLoopData = $tools; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tool): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $tool; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<div class="card-body" style="<?php echo $padding; ?>">
<?php echo $content; ?>
</div>
<?php if($footer): ?>
<div class="card-footer">
<?php echo $footer; ?>
</div>
<?php endif; ?>
</div><?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\vendor\dcat\laravel-admin\src/../resources/views/widgets/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
<style>
.row {
margin: 0;
}
.col-md-12,
.col-md-3 {
padding: 0;
}
@media screen and (min-width: 1000px) and (max-width: 1150px) {
.col-lg-3,
.col-lg-9 {
flex: 0 0 50%;
max-width: 50%;
}
}
@media screen and (min-width: 1151px) and (max-width: 1300px) {
.col-lg-3 {
flex: 0 0 40%;
max-width: 40%;
}
.col-lg-9 {
flex: 0 0 60%;
max-width: 60%;
}
}
@media screen and (min-width: 1301px) and (max-width: 1700px) {
.col-lg-3 {
flex: 0 0 35%;
max-width: 35%;
}
.col-lg-9 {
flex: 0 0 65%;
max-width: 65%;
}
}
.login-page {
height: auto;
}
.login-main {
position: relative;
display: flex;
min-height: 100vh;
flex-direction: row;
align-items: stretch;
margin: 0;
}
.login-main .login-page {
background-color: #fff;
}
.login-main .card {
box-shadow: none;
}
.login-main .auth-brand {
margin: 4rem 0 4rem;
font-size: 26px;
width: 325px;
}
@media (max-width: 576px) {
.login-main .auth-brand {
width: 90%;
margin-left: 24px
}
}
.login-main .login-logo {
font-size: 2.1rem;
font-weight: 300;
margin-bottom: 0.9rem;
text-align: left;
margin-left: 20px;
}
.login-main .login-box-msg {
margin: 0;
padding: 0 0 20px;
font-size: 0.9rem;
font-weight: 400;
text-align: left;
}
.login-main .btn {
width: 100%;
}
.login-page-right {
padding: 6rem 3rem;
flex: 1;
position: relative;
color: #fff;
background-color: rgba(0, 0, 0, 0.3);
text-align: center !important;
background: url(/vendor/dcat-admin/images/bg.jpg) center;
background-size: cover;
}
.login-description {
position: absolute;
margin: 0 auto;
padding: 0 1.75rem;
bottom: 3rem;
left: 0;
right: 0;
}
.content-front {
position: absolute;
left: 0;
right: 0;
height: 100vh;
background: rgba(0,0,0,.1);
margin-top: -6rem;
}
body.dark-mode .content-front {
background: rgba(0,0,0,.3);
}
body.dark-mode .auth-brand {
color: #cacbd6
}
</style>
<div class="row login-main">
<div class="col-lg-3 col-12 bg-white">
<div class="login-page">
<div class="auth-brand text-lg-left">
<?php echo config('admin.logo'); ?>
</div>
<div class="login-box">
<div class="login-logo mb-2">
<h4 class="mt-0"></h4>
<p class="login-box-msg mt-1 mb-1"><?php echo e(__('admin.welcome_back'), false); ?></p>
</div>
<div class="card">
<div class="card-body login-card-body">
<form id="login-form" method="POST" action="<?php echo e(admin_url('auth/login'), false); ?>">
<input type="hidden" name="_token" value="<?php echo e(csrf_token(), false); ?>"/>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
type="text"
class="form-control <?php echo e($errors->has('username') ? 'is-invalid' : '', false); ?>"
name="username"
placeholder="<?php echo e(trans('admin.username'), false); ?>"
value=""
required
autofocus
>
<div class="form-control-position">
<i class="feather icon-user"></i>
</div>
<label for="email"><?php echo e(trans('admin.username'), false); ?></label>
<div class="help-block with-errors"></div>
<?php if($errors->has('username')): ?>
<span class="invalid-feedback text-danger" role="alert">
<?php $__currentLoopData = $errors->get('username'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> <?php echo e($message, false); ?></span><br>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</span>
<?php endif; ?>
</fieldset>
<fieldset class="form-label-group form-group position-relative has-icon-left">
<input
minlength="5"
maxlength="20"
id="password"
type="password"
class="form-control <?php echo e($errors->has('password') ? 'is-invalid' : '', false); ?>"
name="password"
placeholder="<?php echo e(trans('admin.password'), false); ?>"
required
value=""
autocomplete="current-password"
>
<div class="form-control-position">
<i class="feather icon-lock"></i>
</div>
<label for="password"><?php echo e(trans('admin.password'), false); ?></label>
<div class="help-block with-errors"></div>
<?php if($errors->has('password')): ?>
<span class="invalid-feedback text-danger" role="alert">
<?php $__currentLoopData = $errors->get('password'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> <?php echo e($message, false); ?></span><br>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</span>
<?php endif; ?>
</fieldset>
<div class="form-group d-flex justify-content-between align-items-center">
<div class="text-left">
<fieldset class="checkbox">
<div class="vs-checkbox-con vs-checkbox-primary">
<input id="remember" name="remember" value="1" type="checkbox" <?php echo e(old('remember') ? 'checked' : '', false); ?>>
<span class="vs-checkbox">
<span class="vs-checkbox--check">
<i class="vs-icon feather icon-check"></i>
</span>
</span>
<span> <?php echo e(trans('admin.remember_me'), false); ?></span>
</div>
</fieldset>
</div>
</div>
<button type="submit" class="btn btn-primary float-right login-btn">
<?php echo e(__('admin.login'), false); ?>
&nbsp;
<i class="feather icon-arrow-right"></i>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-9 col-12 login-page-right">
<div class="content-front"></div>
<div class="login-description">
<p class="lead">
</p>
<p>
</p>
</div>
</div>
</div>
<script>
Dcat.ready(function () {
// ajax表单提交
$('#login-form').form({
validate: true,
});
});
</script>
<?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\resources\views/admin/login.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="box-header with-border">
<h3 class="box-title"><?php echo $title; ?></h3>
<div class="box-tools pull-right">
<?php $__currentLoopData = $tools; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tool): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo $tool; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<div class="box-body collapse show" style="<?php echo $padding; ?>">
<?php echo $content; ?>
</div>
</div><?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\vendor\dcat\laravel-admin\src/../resources/views/widgets/box.blade.php ENDPATH**/ ?>
\ No newline at end of file
<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale()), false); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title><?php if(! empty($header)): ?><?php echo e($header, false); ?> | <?php endif; ?> <?php echo e(Dcat\Admin\Admin::title(), false); ?></title>
<?php if(! config('admin.disable_no_referrer_meta')): ?>
<meta name="referrer" content="no-referrer"/>
<?php endif; ?>
<?php if(! empty($favicon = Dcat\Admin\Admin::favicon())): ?>
<link rel="shortcut icon" href="<?php echo e($favicon, false); ?>">
<?php endif; ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['HEAD']); ?>
<?php echo Dcat\Admin\Admin::asset()->headerJsToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
</head>
<body class="dcat-admin-body full-page <?php echo e($configData['body_class'], false); ?>">
<script>
var Dcat = CreateDcat(<?php echo Dcat\Admin\Admin::jsVariables(); ?>);
</script>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_BEFORE']); ?>
<div class="app-content content">
<div class="wrapper" id="<?php echo e($pjaxContainerId, false); ?>">
<?php echo $__env->yieldContent('app'); ?>
</div>
</div>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['BODY_INNER_AFTER']); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<script>Dcat.boot();</script>
</body>
</html><?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\vendor\dcat\laravel-admin\src/../resources/views/layouts/full-page.blade.php ENDPATH**/ ?>
\ No newline at end of file
<?php $__env->startSection('content'); ?>
<section class="content">
<?php echo $__env->make('admin::partials.alerts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $__env->make('admin::partials.exception', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php echo $content; ?>
<?php echo $__env->make('admin::partials.toastr', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('app'); ?>
<?php echo Dcat\Admin\Admin::asset()->styleToHtml(); ?>
<div class="content-body" id="app">
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_BEFORE']); ?>
<?php echo $__env->yieldContent('content'); ?>
<?php echo admin_section(Dcat\Admin\Admin::SECTION['APP_INNER_AFTER']); ?>
</div>
<?php echo Dcat\Admin\Admin::asset()->scriptToHtml(); ?>
<div class="extra-html"><?php echo Dcat\Admin\Admin::html(); ?></div>
<?php $__env->stopSection(); ?>
<?php if(!request()->pjax()): ?>
<?php echo $__env->make('admin::layouts.full-page', ['header' => $header], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php else: ?>
<title><?php echo e(Dcat\Admin\Admin::title(), false); ?> <?php if($header): ?> | <?php echo e($header, false); ?><?php endif; ?></title>
<script>Dcat.wait();</script>
<?php echo Dcat\Admin\Admin::asset()->cssToHtml(); ?>
<?php echo Dcat\Admin\Admin::asset()->jsToHtml(); ?>
<?php echo $__env->yieldContent('app'); ?>
<?php endif; ?>
<?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\vendor\dcat\laravel-admin\src/../resources/views/layouts/full-content.blade.php ENDPATH**/ ?>
\ No newline at end of file
<div <?php echo $attributes; ?>>
<div class="card-header d-flex justify-content-between align-items-start pb-0">
<div>
<?php if($icon): ?>
<div class="avatar bg-rgba-<?php echo e($style, false); ?> p-50 m-0">
<div class="avatar-content">
<i class="<?php echo e($icon, false); ?> text-<?php echo e($style, false); ?> font-medium-5"></i>
</div>
</div>
<?php endif; ?>
<?php if($title): ?>
<h4 class="card-title mb-1"><?php echo $title; ?></h4>
<?php endif; ?>
<div class="metric-header"><?php echo $header; ?></div>
</div>
<?php if(! empty($subTitle)): ?>
<span class="btn btn-sm bg-light shadow-0 p-0">
<?php echo e($subTitle, false); ?>
</span>
<?php endif; ?>
<?php if(! empty($dropdown)): ?>
<div class="dropdown chart-dropdown">
<button class="btn btn-sm btn-light shadow-0 dropdown-toggle p-0 waves-effect" data-toggle="dropdown">
<?php echo e(current($dropdown), false); ?>
</button>
<div class="dropdown-menu dropdown-menu-right">
<?php $__currentLoopData = $dropdown; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li class="dropdown-item"><a href="javascript:void(0)" class="select-option" data-option="<?php echo e($key, false); ?>"><?php echo e($value, false); ?></a></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="metric-content"><?php echo $content; ?></div>
</div><?php /**PATH C:\Work\PHP\aimeiyue.com\aimeiyue.com\vendor\dcat\laravel-admin\src/../resources/views/widgets/metrics/card.blade.php ENDPATH**/ ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment