改进 Alert 组件
This commit is contained in:
parent
429b25afee
commit
f544759fba
@ -113,6 +113,11 @@ private function getBirthdayFromIdCard(): string
|
||||
return $year . '-' . $month . '-' . $day;
|
||||
}
|
||||
|
||||
public function isAdult(): bool
|
||||
{
|
||||
return $this->birthday_at->diffInYears(now()) >= 18;
|
||||
}
|
||||
|
||||
public function user_group(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UserGroup::class);
|
||||
|
@ -5,17 +5,9 @@
|
||||
@php($user = auth('web')->user())
|
||||
|
||||
@if ($user->real_name_verified_at)
|
||||
<div class="alert alert-success d-flex align-items-center alert-dismissible fade show" role="alert">
|
||||
<svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Success:">
|
||||
<use xlink:href="#check-circle-fill"/>
|
||||
</svg>
|
||||
<div>
|
||||
<div>
|
||||
<x-alert-success>
|
||||
您已经完成实人认证。
|
||||
</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</x-alert-success>
|
||||
@else
|
||||
@if ($user->balance < 1)
|
||||
您的余额不足 1 元,无法完成实人认证。
|
||||
|
Loading…
Reference in New Issue
Block a user