feat. add ico ,change logo,管理員可刷新序號邏輯
This commit is contained in:
parent
149d603a4c
commit
1858c5d70b
@ -5,6 +5,7 @@
|
|||||||
use App\Models\Promocode;
|
use App\Models\Promocode;
|
||||||
use Auth;
|
use Auth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
class PromoCodeController extends Controller
|
class PromoCodeController extends Controller
|
||||||
{
|
{
|
||||||
@ -22,28 +23,58 @@ public function index()
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$user_id = Auth::guard('member')->user()->id;
|
$user_id = Auth::guard('member')->user()->id;
|
||||||
$count = Promocode::where('used_count', $user_id)->count();
|
$count = Promocode::where('used_count', $user_id)->count();
|
||||||
|
|
||||||
if (! $count) {
|
if (!$count) {
|
||||||
|
|
||||||
$row = Promocode::where('used_count', 0)->first();
|
$row = Promocode::where('used_count', 0)->first();
|
||||||
$row->used_count = $user_id;
|
$row->used_count = $user_id;
|
||||||
$row->save();
|
$row->save();
|
||||||
return response()->json(['status' => 'success', 'msg' => '已成功取得', 'promocode' => $row->code]);
|
return response()->json(['status' => 'success', 'msg' => '已成功取得', 'promocode' => $row->code]);
|
||||||
} else {
|
} else {
|
||||||
$code = Promocode::where('used_count', $user_id)->first();
|
$code = Promocode::where('used_count', $user_id)->latest()
|
||||||
|
->first();
|
||||||
|
;
|
||||||
return response()->json(['status' => 'success', 'msg' => '你已取得過優惠碼', 'promocode' => $code->code]);
|
return response()->json(['status' => 'success', 'msg' => '你已取得過優惠碼', 'promocode' => $code->code]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Summary of morePromocode
|
||||||
|
* @throws \Exception
|
||||||
|
* @return mixed|\Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function morePromocode()
|
||||||
|
{
|
||||||
|
$user = Auth::guard('member')->user();
|
||||||
|
|
||||||
|
try {
|
||||||
|
if ($user->level != 9) {
|
||||||
|
throw new Exception("Error Processing Request", 401);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$row = Promocode::where('used_count', 0)->first();
|
||||||
|
$row->used_count = $user->id;
|
||||||
|
$row->save();
|
||||||
|
return response()->json(['status' => 'success', 'msg' => '已成功取得', 'promocode' => $row->code]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (Exception $th) {
|
||||||
|
//throw $th;
|
||||||
|
return response()->json(['status' => 'error', 'msg' => $th->getMessage(), 'code' => $th->getCode()]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public function getLevelNameAttribute()
|
|||||||
|
|
||||||
public function getPromoCode()
|
public function getPromoCode()
|
||||||
{
|
{
|
||||||
return $this->hasOne(Promocode::class, 'used_count', 'id');
|
return $this->hasMany(Promocode::class, 'used_count', 'id');
|
||||||
}
|
}
|
||||||
protected function casts(): array
|
protected function casts(): array
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
public/assets/img/favicon/cafeg.ico
Normal file
BIN
public/assets/img/favicon/cafeg.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/assets/img/logo/cafeg-logo-1.png
Normal file
BIN
public/assets/img/logo/cafeg-logo-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@ -15,9 +15,10 @@
|
|||||||
<meta name="csrf-token" content="6fa8KEfKxuHo22PqMwHmCoxMDArqCNYyqRXJNZSE">
|
<meta name="csrf-token" content="6fa8KEfKxuHo22PqMwHmCoxMDArqCNYyqRXJNZSE">
|
||||||
<!-- Canonical SEO -->
|
<!-- Canonical SEO -->
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/cafeg.ico') }}" />
|
||||||
|
|
||||||
|
|
||||||
<!-- ? PROD Only: Google Tag Manager (Default ThemeSelection: GTM-5DDHKGP, PixInvent: GTM-5J3LMKC) -->
|
<!-- ? PROD Only: Google Tag Manager (Default ThemeSelection: GTM-5DDHKGP, PixInvent: GTM-5J3LMKC) -->
|
||||||
<script>
|
<script>
|
||||||
@ -39,8 +40,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<!-- End Google Tag Manager -->
|
<!-- End Google Tag Manager -->
|
||||||
|
|
||||||
<!-- Favicon -->
|
|
||||||
<link rel="icon" type="image/x-icon" href="{{asset('assets')}}/img/favicon/favicon.ico" />
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
@ -323,4 +323,4 @@ function validateField(field) {
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
<!-- Canonical SEO -->
|
<!-- Canonical SEO -->
|
||||||
<link rel="canonical" href="https://1.envato.market/materialize_admin">
|
<link rel="canonical" href="https://1.envato.market/materialize_admin">
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
||||||
|
|
||||||
|
|
||||||
@ -74,7 +75,7 @@
|
|||||||
// Core stylesheets
|
// Core stylesheets
|
||||||
'core.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-kL5gEEKA.css',
|
'core.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-kL5gEEKA.css',
|
||||||
'core-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-dark-DFvmi5J3.css',
|
'core-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-dark-DFvmi5J3.css',
|
||||||
|
|
||||||
// Themes
|
// Themes
|
||||||
'theme-default.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-Bt2z4DrM.css',
|
'theme-default.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-Bt2z4DrM.css',
|
||||||
'theme-default-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-dark-CHvAJUy2.css',
|
'theme-default-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-dark-CHvAJUy2.css',
|
||||||
@ -95,7 +96,7 @@
|
|||||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5J3LMKC" height="0" width="0" style="display: none; visibility: hidden"></iframe></noscript>
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5J3LMKC" height="0" width="0" style="display: none; visibility: hidden"></iframe></noscript>
|
||||||
|
|
||||||
<!-- Layout Content -->
|
<!-- Layout Content -->
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div class="position-relative">
|
<div class="position-relative">
|
||||||
<div class="authentication-wrapper authentication-basic container-p-y p-4 p-sm-0">
|
<div class="authentication-wrapper authentication-basic container-p-y p-4 p-sm-0">
|
||||||
@ -107,13 +108,13 @@
|
|||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
<span class="app-brand-logo demo"><span>
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo-h.png')}}" width="120px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{asset('assets/img/logo/cafeg-logo-h.png')}}" width="120px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -178,7 +179,7 @@ class="form-control"
|
|||||||
placeholder="密碼"
|
placeholder="密碼"
|
||||||
aria-label="密碼"
|
aria-label="密碼"
|
||||||
value="{{$data->password ?? ''}}"
|
value="{{$data->password ?? ''}}"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<label for="basic-default-password">密碼</label>
|
<label for="basic-default-password">密碼</label>
|
||||||
<div class="invalid-feedback">請輸入有效密碼</div>
|
<div class="invalid-feedback">請輸入有效密碼</div>
|
||||||
@ -208,7 +209,7 @@ class="form-control"
|
|||||||
placeholder="確認密碼"
|
placeholder="確認密碼"
|
||||||
aria-label="確認密碼"
|
aria-label="確認密碼"
|
||||||
value="{{$data->password ?? ''}}"
|
value="{{$data->password ?? ''}}"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<label for="formValidationConfirmPass">確認密碼</label>
|
<label for="formValidationConfirmPass">確認密碼</label>
|
||||||
<div class="invalid-feedback">密碼與確認密碼不相符</div>
|
<div class="invalid-feedback">密碼與確認密碼不相符</div>
|
||||||
@ -249,7 +250,7 @@ class="form-control phone-number-mask"
|
|||||||
<!-- 按鈕 -->
|
<!-- 按鈕 -->
|
||||||
<div
|
<div
|
||||||
class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-4"
|
class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-4"
|
||||||
|
|
||||||
>
|
>
|
||||||
<button type="submit" class="btn btn-primary">送出</button>
|
<button type="submit" class="btn btn-primary">送出</button>
|
||||||
<button
|
<button
|
||||||
@ -279,13 +280,13 @@ class="btn btn-outline-secondary"
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex justify-content-center gap-2">
|
<div class="d-flex justify-content-center gap-2">
|
||||||
|
|
||||||
<a href="{{route('admin.login.line')}}" class="btn btn-icon rounded-circle btn-text-line">
|
<a href="{{route('admin.login.line')}}" class="btn btn-icon rounded-circle btn-text-line">
|
||||||
<i class="tf-icons ri-line-fill"></i>
|
<i class="tf-icons ri-line-fill"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a href="javascript:;" class="btn btn-icon rounded-circle btn-text-google-plus">
|
<a href="javascript:;" class="btn btn-icon rounded-circle btn-text-google-plus">
|
||||||
<i class="tf-icons ri-google-fill"></i>
|
<i class="tf-icons ri-google-fill"></i>
|
||||||
@ -301,11 +302,11 @@ class="btn btn-outline-secondary"
|
|||||||
|
|
||||||
<!--/ Layout Content -->
|
<!--/ Layout Content -->
|
||||||
|
|
||||||
|
|
||||||
{{-- <div class="buy-now">
|
{{-- <div class="buy-now">
|
||||||
<a href="#" target="" class="btn btn-danger btn-buy-now">Buy Now</a>
|
<a href="#" target="" class="btn btn-danger btn-buy-now">Buy Now</a>
|
||||||
</div> --}}
|
</div> --}}
|
||||||
|
|
||||||
|
|
||||||
<!-- Include Scripts -->
|
<!-- Include Scripts -->
|
||||||
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
||||||
|
|||||||
@ -13,7 +13,8 @@
|
|||||||
<meta name="csrf-token" content="6fa8KEfKxuHo22PqMwHmCoxMDArqCNYyqRXJNZSE">
|
<meta name="csrf-token" content="6fa8KEfKxuHo22PqMwHmCoxMDArqCNYyqRXJNZSE">
|
||||||
<!-- Canonical SEO -->
|
<!-- Canonical SEO -->
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/cafeg.ico') }}" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Include Styles -->
|
<!-- Include Styles -->
|
||||||
@ -104,14 +105,13 @@
|
|||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
{{-- <span class="app-brand-logo demo"><span>
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
||||||
|
|
||||||
</span>
|
</span> --}}
|
||||||
</span>
|
</span>
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo-h.png')}}" width="120px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<img src="{{asset('assets/img/logo/cafeg-logo-1.png')}}" width="45%" height="45%" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -145,12 +145,12 @@
|
|||||||
記住 我
|
記住 我
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<a href="forgot-password-basic.html" class="float-end mb-1 mt-2">
|
{{-- <a href="forgot-password-basic.html" class="float-end mb-1 mt-2">
|
||||||
<span>忘記密碼?</span>
|
<span>忘記密碼?</span>
|
||||||
</a>
|
</a> --}}
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<button class="btn btn-primary d-grid w-100" type="submit">Sign in</button>
|
<button class="btn btn-primary d-grid w-100" type="submit">登 入</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,29 @@
|
|||||||
@section('header')
|
@section('header')
|
||||||
@endsection
|
@endsection
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<style>
|
||||||
|
.table th,
|
||||||
|
.table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止文字換行 */
|
||||||
|
text-align: center;
|
||||||
|
/* 內容置中 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隱藏超出內容 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出用省略號顯示 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.table th {
|
||||||
|
width: auto;
|
||||||
|
/* 可根據內容自適應,但不要超出 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
width: 100%;
|
||||||
|
/* 撐滿父容器 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@ -165,12 +188,39 @@ class="rounded-circle">
|
|||||||
<i class="ri-user-line ri-22px text-info me-2"></i>
|
<i class="ri-user-line ri-22px text-info me-2"></i>
|
||||||
@elseif($item->level == 2)
|
@elseif($item->level == 2)
|
||||||
<i class="ri-user-line ri-22px text-sucess me-2"></i>
|
<i class="ri-user-line ri-22px text-sucess me-2"></i>
|
||||||
|
@elseif($item->level == 9)
|
||||||
|
<i class="ri-user-line ri-22px text-black me-2"></i>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{{ $item->Level_Name }}
|
{{ $item->Level_Name }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td> <span class="text-danger" style="font-size:20px">{{ $item->getPromoCode->code }} </span>
|
<td>
|
||||||
|
@if (count($item->getPromoCode) == 1)
|
||||||
|
<span class="text-danger" style="font-size:20px">
|
||||||
|
|
||||||
|
{{ $item->getPromoCode[0]->code }}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
@if (count($item->getPromoCode) > 1)
|
||||||
|
<a class="text-danger" style="font-size:20px" data-bs-toggle="collapse" href="#multiCollapseExample-{{ $item->id }}" role="button"
|
||||||
|
aria-expanded="false" aria-controls="multiCollapseExample1">
|
||||||
|
{{ $item->getPromoCode[0]->code }} (多筆)
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
<div class="collapse multi-collapse" id="multiCollapseExample-{{ $item->id }}">
|
||||||
|
<div class="d-grid d-sm-flex p-4 border justify-content-center" >
|
||||||
|
<span class="text-danger " style="font-size:20px">
|
||||||
|
@foreach ($item->getPromoCode as $key => $val)
|
||||||
|
@if($key %8 ==0)
|
||||||
|
<br>
|
||||||
|
@endif
|
||||||
|
{{ $val->code }}
|
||||||
|
@endforeach
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -186,6 +236,12 @@ class="rounded-circle">
|
|||||||
</div>
|
</div>
|
||||||
<!-- / Layout page -->
|
<!-- / Layout page -->
|
||||||
</div>
|
</div>
|
||||||
|
<div class="alert alert-solid-primary d-flex align-items-center" role="alert">
|
||||||
|
<span class="alert-icon rounded">
|
||||||
|
<i class="ri-user-follow-line ri-22px"></i>
|
||||||
|
</span>
|
||||||
|
This is a primary solid alert — check it out!
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
|
|||||||
@ -167,13 +167,12 @@
|
|||||||
<td>{{ $item->phone }}</td>
|
<td>{{ $item->phone }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<span id="status-{{ $item->id }}"
|
<span id="status-{{ $item->id }}"
|
||||||
|
onclick="updateStatus({{ $item->id }}, {{ $item->can_login == 1 ? 0 : 1 }})"
|
||||||
onclick="updateStatus({{ $item->id }}, {{ $item->can_login == 1 ? 0 : 1 }})"
|
class="badge rounded-pill {{ $item->can_login == 1 ? 'bg-label-primary' : 'bg-label-danger' }}">
|
||||||
class="badge rounded-pill {{ $item->can_login == 1 ? 'bg-label-primary' : 'bg-label-danger' }}">
|
{{ $item->can_login_status }}
|
||||||
{{ $item->can_login_status}}
|
</span>
|
||||||
</span>
|
</a>
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -183,7 +182,15 @@ class="badge rounded-pill {{ $item->can_login == 1 ? 'bg-label-primary' : 'bg-la
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="padding-top: 5%;"></div>
|
||||||
|
<div class="alert alert-solid-info d-flex align-items-center" role="alert" s>
|
||||||
|
<span class="alert-icon rounded">
|
||||||
|
<i class="ri-information-line ri-22px"></i>
|
||||||
|
</span>
|
||||||
|
後台註冊後,得點登入狀態放行
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content-backdrop fade"></div>
|
<div class="content-backdrop fade"></div>
|
||||||
{{ $data->links() }}
|
{{ $data->links() }}
|
||||||
</div>
|
</div>
|
||||||
@ -195,41 +202,42 @@ class="badge rounded-pill {{ $item->can_login == 1 ? 'bg-label-primary' : 'bg-la
|
|||||||
@endsection
|
@endsection
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
<script>
|
<script>
|
||||||
function updateStatus(id, status) {
|
function updateStatus(id, status) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "patch",
|
type: "patch",
|
||||||
url: "{{ route('admin.canlogin.status') }}",
|
url: "{{ route('admin.canlogin.status') }}",
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
can_login: status,
|
can_login: status,
|
||||||
_token: "{{ csrf_token() }}" // 確保 CSRF token 被傳送
|
_token: "{{ csrf_token() }}" // 確保 CSRF token 被傳送
|
||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log('can_login status:', response.status);
|
console.log('can_login status:', response.status);
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
text: response.msg,
|
text: response.msg,
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
confirmButtonText: '确定'
|
confirmButtonText: '确定'
|
||||||
});
|
});
|
||||||
const statusElement = document.getElementById(`status-${id}`);
|
const statusElement = document.getElementById(`status-${id}`);
|
||||||
if (statusElement) {
|
if (statusElement) {
|
||||||
statusElement.textContent = response.can_login == 1 ? '允許' : '未允許';
|
statusElement.textContent = response.can_login == 1 ? '允許' : '未允許';
|
||||||
statusElement.className = `badge rounded-pill ${response.can_login == 1 ? 'bg-label-primary' : 'bg-label-danger'}`;
|
statusElement.className =
|
||||||
statusElement.setAttribute('onclick', `updateStatus(${id}, ${response.can_login == 1 ? 0 : 1})`);
|
`badge rounded-pill ${response.can_login == 1 ? 'bg-label-primary' : 'bg-label-danger'}`;
|
||||||
|
statusElement.setAttribute('onclick',
|
||||||
|
`updateStatus(${id}, ${response.can_login == 1 ? 0 : 1})`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(xhr) {
|
||||||
|
Swal.fire({
|
||||||
|
title: '錯誤',
|
||||||
|
text: '更新失敗,請稍後再試。',
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonText: '确定'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
error: function(xhr) {
|
|
||||||
Swal.fire({
|
|
||||||
title: '錯誤',
|
|
||||||
text: '更新失敗,請稍後再試。',
|
|
||||||
icon: 'error',
|
|
||||||
confirmButtonText: '确定'
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@ -78,9 +78,9 @@
|
|||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
<span class="app-brand-logo demo">
|
||||||
<img src="{{ asset('assets/img/logo/cafeg-logo.png') }}" width="50px" height="50px" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
|
<img style="margin-left: 5%" src="{{ asset('assets/img/logo/cafeg-logo-1.png') }}" width="45%" height="45%" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<!-- beautify ignore:start -->
|
<!-- beautify ignore:start -->
|
||||||
|
|
||||||
|
|
||||||
<html lang="en" class="dark-style layout-wide dark customizer-hide" dir="ltr" data-theme="theme-bordered" data-assets-path="../../assets/" data-template="vertical-menu-template-bordered" data-style="light">
|
<html lang="en" class="light-style layout-wide dark customizer-hide" dir="ltr" data-theme="theme-bordered" data-assets-path="../../assets/" data-template="vertical-menu-template-bordered" data-style="light">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
@ -92,10 +92,11 @@
|
|||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
<span class="app-brand-logo demo">
|
||||||
<img src="{{ asset('assets/img/logo/cafeg-logo.png') }}" width="50px" height="50px" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
|
<img style="margin-left: 5%" src="{{ asset('assets/img/logo/cafeg-logo-1.png') }}" width="45%" height="45%" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
<img src="{{ asset('assets/img/logo/cafeg-logo-h.png') }}" width="120px" height="50px" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
<img src="{{ asset('assets/img/logo/cafeg-logo-h.png') }}" width="120px" height="50px" alt="{{ asset('img/logo/cafeg-logo.png') }}"> </img>
|
||||||
|
|||||||
@ -1,94 +1,85 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" class="dark-style layout-menu-fixed customizer-hide" dir="ltr" data-theme="theme-default" data-assets-path="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/assets/" data-base-url="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo-4" data-framework="laravel" data-template="blank-menu-theme-default-dark" data-style="dark">
|
<html lang="en" class="light-style layout-wide customizer-hide" dir="ltr" data-theme="theme-default"
|
||||||
|
data-assets-path="../../assets/" data-template="vertical-menu-template" data-style="light">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
<meta name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
||||||
|
|
||||||
<title>卡菲姬登入</title>
|
<title>Login Basic - Pages | Materialize - Material Design HTML Admin Template</title>
|
||||||
<meta name="description" content="Materialize – is the most developer friendly & highly customizable Admin Dashboard Template." />
|
|
||||||
<meta name="keywords" content="cafeg 卡菲姬">
|
|
||||||
<!-- laravel CRUD token -->
|
<meta name="description"
|
||||||
<meta name="csrf-token" content="6fa8KEfKxuHo22PqMwHmCoxMDArqCNYyqRXJNZSE">
|
content="Materialize – is the most developer friendly & highly customizable Admin Dashboard Template." />
|
||||||
|
<meta name="keywords"
|
||||||
|
content="dashboard, material, material design, bootstrap 5 dashboard, bootstrap 5 design, bootstrap 5">
|
||||||
<!-- Canonical SEO -->
|
<!-- Canonical SEO -->
|
||||||
<link rel="canonical" href="https://1.envato.market/materialize_admin">
|
<link rel="canonical" href="https://1.envato.market/materialize_admin">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ? PROD Only: Google Tag Manager (Default ThemeSelection: GTM-5DDHKGP, PixInvent: GTM-5J3LMKC) -->
|
||||||
|
<script>
|
||||||
|
(function(w, d, s, l, i) {
|
||||||
|
w[l] = w[l] || [];
|
||||||
|
w[l].push({
|
||||||
|
'gtm.start': new Date().getTime(),
|
||||||
|
event: 'gtm.js'
|
||||||
|
});
|
||||||
|
var f = d.getElementsByTagName(s)[0],
|
||||||
|
j = d.createElement(s),
|
||||||
|
dl = l != 'dataLayer' ? '&l=' + l : '';
|
||||||
|
j.async = true;
|
||||||
|
j.src =
|
||||||
|
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
||||||
|
f.parentNode.insertBefore(j, f);
|
||||||
|
})(window, document, 'script', 'dataLayer', 'GTM-5J3LMKC');
|
||||||
|
</script>
|
||||||
|
<!-- End Google Tag Manager -->
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="../../assets/img/favicon/favicon.ico" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Include Styles -->
|
|
||||||
<!-- $isFront is used to append the front layout styles only on the front layout otherwise the variable will be blank -->
|
|
||||||
<!-- BEGIN: Theme CSS-->
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/fonts/remixicon/remixicon.css" />
|
rel="stylesheet">
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/fonts/flag-icons.css" />
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/libs/node-waves/node-waves.css" />
|
<!-- Icons -->
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/fonts/remixicon/remixicon.css" class="" />
|
<link rel="stylesheet" href="../../assets/vendor/fonts/remixicon/remixicon.css" />
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/fonts/flag-icons.css" class="" />
|
<link rel="stylesheet" href="../../assets/vendor/fonts/flag-icons.css" />
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/libs/node-waves/node-waves.css" class="" />
|
|
||||||
|
<!-- Menu waves for no-customizer fix -->
|
||||||
|
<link rel="stylesheet" href="../../assets/vendor/libs/node-waves/node-waves.css" />
|
||||||
|
|
||||||
<!-- Core CSS -->
|
<!-- Core CSS -->
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/css/core-dark.css" />
|
<link rel="stylesheet" href="../../assets/vendor/css/rtl/core.css" class="template-customizer-core-css" />
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/css/theme-default-dark.css" />
|
<link rel="stylesheet" href="../../assets/vendor/css/rtl/theme-default.css" class="template-customizer-theme-css" />
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/css/demo.css" />
|
<link rel="stylesheet" href="../../assets/css/demo.css" />
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/css/core-dark.css" class="template-customizer-core-css" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/css/theme-default-dark.css" class="template-customizer-theme-css" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/css/demo.css" class="" />
|
|
||||||
<!-- Vendor Styles -->
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" />
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/libs/typeahead-js/typeahead.css" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" class="" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/libs/typeahead-js/typeahead.css" class="" />
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/libs/@form-validation/form-validation.css" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/libs/@form-validation/form-validation.css" class="" />
|
|
||||||
<!-- Page Styles -->
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/css/pages/page-auth.css" />
|
|
||||||
<link rel="stylesheet" href="{{asset('assets')}}/vendor/css/pages/page-auth.css" class="" />
|
|
||||||
<!-- Include Scripts for customizer, helper, analytics, config -->
|
|
||||||
<!-- $isFront is used to append the front layout scriptsIncludes only on the front layout otherwise the variable will be blank -->
|
|
||||||
<!-- laravel style -->
|
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/js/helpers.js"></script>
|
|
||||||
<!-- beautify ignore:start -->
|
|
||||||
<!--! Template customizer & Theme config files MUST be included after core stylesheets and helpers.js in the <head> section -->
|
|
||||||
<!--? Template customizer: To hide customizer set displayCustomizer value false in config.js. -->
|
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/template-customizer.js" />
|
|
||||||
<!--? Config: Mandatory theme config file contain global vars & default theme options, Set your preferred theme option in this file. -->
|
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/js/config.js" /><script type="module" src="{{asset('assets')}}/js/config.js"></script>
|
|
||||||
|
|
||||||
<script type="module">
|
<!-- Vendors CSS -->
|
||||||
window.templateCustomizer = new TemplateCustomizer({
|
<link rel="stylesheet" href="../../assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" />
|
||||||
cssPath: '',
|
<link rel="stylesheet" href="../../assets/vendor/libs/typeahead-js/typeahead.css" />
|
||||||
themesPath: '',
|
<!-- Vendor -->
|
||||||
defaultStyle: "dark",
|
<link rel="stylesheet" href="../../assets/vendor/libs/@form-validation/form-validation.css" />
|
||||||
defaultShowDropdownOnHover: "1", // true/false (for horizontal layout only)
|
|
||||||
displayCustomizer: "1",
|
<!-- Page CSS -->
|
||||||
lang: 'de',
|
<!-- Page -->
|
||||||
pathResolver: function(path) {
|
<link rel="stylesheet" href="../../assets/vendor/css/pages/page-auth.css">
|
||||||
var resolvedPaths = {
|
|
||||||
// Core stylesheets
|
<!-- Helpers -->
|
||||||
'core.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-kL5gEEKA.css',
|
<script src="../../assets/vendor/js/helpers.js"></script>
|
||||||
'core-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/core-dark-DFvmi5J3.css',
|
<!--! Template customizer & Theme config files MUST be included after core stylesheets and helpers.js in the <head> section -->
|
||||||
|
<!--? Template customizer: To hide customizer set displayCustomizer value false in config.js. -->
|
||||||
|
<script src="../../assets/vendor/js/template-customizer.js"></script>
|
||||||
|
<!--? Config: Mandatory theme config file contain global vars & default theme options, Set your preferred theme option in this file. -->
|
||||||
|
<script src="../../assets/js/config.js"></script>
|
||||||
|
|
||||||
// Themes
|
|
||||||
'theme-default.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-Bt2z4DrM.css',
|
|
||||||
'theme-default-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-default-dark-CHvAJUy2.css',
|
|
||||||
'theme-bordered.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-bordered-DhjhTV9k.css',
|
|
||||||
'theme-bordered-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-bordered-dark-C25VfhpZ.css',
|
|
||||||
'theme-semi-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-semi-dark-D80v88qZ.css',
|
|
||||||
'theme-semi-dark-dark.scss': 'https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/build/assets/theme-semi-dark-dark-BZrM7P_B.css',
|
|
||||||
}
|
|
||||||
return resolvedPaths[path] || path;
|
|
||||||
},
|
|
||||||
'controls': ["rtl","style","headerType","contentLayout","layoutCollapsed","layoutNavbarOptions","themes"],
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5J3LMKC'); </script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5J3LMKC" height="0" width="0" style="display: none; visibility: hidden"></iframe></noscript>
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5J3LMKC" height="0" width="0" style="display: none; visibility: hidden"></iframe></noscript>
|
||||||
|
|
||||||
@ -104,15 +95,12 @@
|
|||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<div class="app-brand justify-content-center mt-5">
|
<div class="app-brand justify-content-center mt-5">
|
||||||
<a href="#" class="app-brand-link gap-2">
|
<a href="#" class="app-brand-link gap-2">
|
||||||
<span class="app-brand-logo demo"><span>
|
<span class="app-brand-logo demo">
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo.png')}}" width="50px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
<span class="app-brand-text demo text-heading fw-semibold">
|
||||||
|
<img style="margin-left: 5%" src="{{asset('assets/img/logo/cafeg-logo-1.png')}}" width="45%" height="45%" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
|
||||||
<span class="app-brand-text demo text-heading fw-semibold">
|
|
||||||
<img src="{{asset('assets/img/logo/cafeg-logo-h.png')}}" width="120px" height="50px" alt="{{asset('img/logo/cafeg-logo.png')}}"> </img>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /Logo -->
|
<!-- /Logo -->
|
||||||
@ -121,7 +109,7 @@
|
|||||||
<h4 class="mb-1">歡迎來到卡菲姬 👋</h4>
|
<h4 class="mb-1">歡迎來到卡菲姬 👋</h4>
|
||||||
<p class="mb-5">請登入後逕行兌換飲品,希望您會喜歡</p>
|
<p class="mb-5">請登入後逕行兌換飲品,希望您會喜歡</p>
|
||||||
|
|
||||||
<form id="formAuthentication" class="mb-5" action="{{route(name: 'member.login.post')}}" method="POST">
|
<form id="formAuthentication" class="mb-5" action="{{ route(name: 'member.login.post') }}" method="POST">
|
||||||
@csrf
|
@csrf
|
||||||
<div class="form-floating form-floating-outline mb-5">
|
<div class="form-floating form-floating-outline mb-5">
|
||||||
<input type="text" class="form-control" id="email" name="email" placeholder="請填寫您的電子郵件" autofocus>
|
<input type="text" class="form-control" id="email" name="email" placeholder="請填寫您的電子郵件" autofocus>
|
||||||
@ -156,7 +144,7 @@
|
|||||||
|
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<span>新的裝置?</span>
|
<span>新的裝置?</span>
|
||||||
<a href="{{route('member.register')}}">
|
<a href="{{ route('member.register') }}">
|
||||||
<span>創建新的帳號</span>
|
<span>創建新的帳號</span>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -167,12 +155,12 @@
|
|||||||
|
|
||||||
<div class="d-flex justify-content-center gap-2">
|
<div class="d-flex justify-content-center gap-2">
|
||||||
|
|
||||||
<a href="{{route('front.login.line')}}" class="btn btn-icon rounded-circle btn-text-line">
|
<a href="{{ route('front.login.line') }}" class="btn btn-icon rounded-circle btn-text-line">
|
||||||
<i class="tf-icons ri-line-fill"></i>
|
<i class="tf-icons ri-line-fill"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<a href="{{route('google.auth')}}" class="btn btn-icon rounded-circle btn-text-google-plus">
|
<a href="{{ route('google.auth') }}" class="btn btn-icon rounded-circle btn-text-google-plus">
|
||||||
<i class="tf-icons ri-google-fill"></i>
|
<i class="tf-icons ri-google-fill"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -195,36 +183,36 @@
|
|||||||
<!-- Include Scripts -->
|
<!-- Include Scripts -->
|
||||||
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
<!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
|
||||||
<!-- BEGIN: Vendor JS-->
|
<!-- BEGIN: Vendor JS-->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/jquery/jquery.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/jquery/jquery.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/js/helpers.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/popper/popper.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/popper/popper.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/bootstrap.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/js/bootstrap.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/node-waves/node-waves.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/node-waves/node-waves.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/perfect-scrollbar/perfect-scrollbar.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/perfect-scrollbar/perfect-scrollbar.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/hammer/hammer.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/hammer/hammer.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/typeahead-js/typeahead.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/typeahead-js/typeahead.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/menu.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/js/menu.js" />
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/jquery/jquery.js"></script>
|
<script type="module" src="{{ asset('assets') }}/vendor/libs/jquery/jquery.js"></script>
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/@form-validation/popular.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/@form-validation/popular.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/js/helpers.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/js/helpers.js" />
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/vendor/libs/@form-validation/bootstrap5.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/vendor/libs/@form-validation/bootstrap5.js" />
|
||||||
{{-- <link rel="modulepreload" href="{{asset('assets')}}/index.js" /> --}}
|
{{-- <link rel="modulepreload" href="{{asset('assets')}}/index.js" /> --}}
|
||||||
{{-- <link rel="modulepreload" href="{{asset('assets')}}/auto.js" /> --}}
|
{{-- <link rel="modulepreload" href="{{asset('assets')}}/auto.js" /> --}}
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/popular.js">
|
<script type="module" src="{{ asset('assets') }}/vendor/libs/@form-validation/popular.js">
|
||||||
</script><script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/bootstrap5.js"></script>
|
</script><script type="module" src="{{ asset('assets') }}/vendor/libs/@form-validation/bootstrap5.js"></script>
|
||||||
<script type="module" src="{{asset('assets')}}/vendor/libs/@form-validation/auto-focus.js"></script>
|
<script type="module" src="{{ asset('assets') }}/vendor/libs/@form-validation/auto-focus.js"></script>
|
||||||
<!-- END: Page Vendor JS-->
|
<!-- END: Page Vendor JS-->
|
||||||
<!-- BEGIN: Theme JS-->
|
<!-- BEGIN: Theme JS-->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/js/main.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/js/main.js" />
|
||||||
<script type="module" src="{{asset('assets')}}/js/main.js"></script>
|
<script type="module" src="{{ asset('assets') }}/js/main.js"></script>
|
||||||
<!-- END: Theme JS-->
|
<!-- END: Theme JS-->
|
||||||
<!-- Pricing Modal JS-->
|
<!-- Pricing Modal JS-->
|
||||||
<!-- END: Pricing Modal JS-->
|
<!-- END: Pricing Modal JS-->
|
||||||
<!-- BEGIN: Page JS-->
|
<!-- BEGIN: Page JS-->
|
||||||
<link rel="modulepreload" href="{{asset('assets')}}/js/pages-auth.js" />
|
<link rel="modulepreload" href="{{ asset('assets') }}/js/pages-auth.js" />
|
||||||
<script type="module" src="{{asset('assets')}}/js/pages-auth.js"></script>
|
<script type="module" src="{{ asset('assets') }}/js/pages-auth.js"></script>
|
||||||
<!-- END: Page JS-->
|
<!-- END: Page JS-->
|
||||||
<script src="{{asset('assets')}}/js/form-validation.js"></script>
|
<script src="{{ asset('assets') }}/js/form-validation.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
@ -254,8 +242,7 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script> @endif
|
||||||
@endif
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
<!-- Canonical SEO -->
|
<!-- Canonical SEO -->
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="../../demo/assets/img/favicon/favicon.ico" />
|
||||||
|
|
||||||
|
|
||||||
<!-- ? PROD Only: Google Tag Manager (Default ThemeSelection: GTM-5DDHKGP, PixInvent: GTM-5J3LMKC) -->
|
<!-- ? PROD Only: Google Tag Manager (Default ThemeSelection: GTM-5DDHKGP, PixInvent: GTM-5J3LMKC) -->
|
||||||
|
|||||||
@ -1,202 +1,287 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<style>
|
||||||
|
.table th,
|
||||||
|
.table td {
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 禁止文字換行 */
|
||||||
|
text-align: center;
|
||||||
|
/* 內容置中 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隱藏超出內容 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 超出用省略號顯示 */
|
||||||
|
}
|
||||||
|
|
||||||
<style>
|
.table th {
|
||||||
.table th,
|
width: auto;
|
||||||
.table td {
|
/* 可根據內容自適應,但不要超出 */
|
||||||
white-space: nowrap;
|
}
|
||||||
/* 禁止文字換行 */
|
|
||||||
text-align: center;
|
|
||||||
/* 內容置中 */
|
|
||||||
overflow: hidden;
|
|
||||||
/* 隱藏超出內容 */
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
/* 超出用省略號顯示 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.table th {
|
.table {
|
||||||
width: auto;
|
width: 100%;
|
||||||
/* 可根據內容自適應,但不要超出 */
|
/* 撐滿父容器 */
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
.table {
|
<!-- / Navbar -->
|
||||||
width: 100%;
|
|
||||||
/* 撐滿父容器 */
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
<!-- Content wrapper -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
|
||||||
<!-- / Navbar -->
|
<!-- Content -->
|
||||||
|
<div class="container-xxl flex-grow-1 container-p-y">
|
||||||
|
|
||||||
<!-- Content wrapper -->
|
<!-- Header -->
|
||||||
<div class="content-wrapper">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
<!-- Content -->
|
<div class="card mb-6">
|
||||||
<div class="container-xxl flex-grow-1 container-p-y">
|
<div class="user-profile-header-banner">
|
||||||
|
<img src="https://cafeg.ukyo.idv.tw/assets/img/pages/profile-banner.png"
|
||||||
<!-- Header -->
|
style="width:100%; height:200px;" alt="Banner image" class="rounded-top">
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="card mb-6">
|
|
||||||
<div class="user-profile-header-banner">
|
|
||||||
<img src="https://cafeg.ukyo.idv.tw/assets/img/pages/profile-banner.png" style="width:100%; height:200px;" alt="Banner image" class="rounded-top">
|
|
||||||
</div>
|
|
||||||
<div class="user-profile-header d-flex flex-column flex-sm-row text-sm-start text-center mb-5">
|
|
||||||
<div class="flex-shrink-0 mt-n2 mx-sm-0 mx-auto">
|
|
||||||
@if(Auth::guard('member')->user()->avatar)
|
|
||||||
<img src="{{Auth::guard('member')->user()->avatar}}" style="width:100px;hieght:100px;" alt="user image" class="d-block h-auto ms-0 ms-sm-5 rounded-4 user-profile-img">
|
|
||||||
@else
|
|
||||||
<img src="../../assets/img/avatars/1.png" style="width:100px;hieght:100px;" alt="user image" class="d-block h-auto ms-0 ms-sm-5 rounded-4 user-profile-img">
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-grow-1 mt-4 mt-sm-12">
|
<div class="user-profile-header d-flex flex-column flex-sm-row text-sm-start text-center mb-5">
|
||||||
<div class="d-flex align-items-md-end align-items-sm-start align-items-center justify-content-md-between justify-content-start mx-5 flex-md-row flex-column gap-6">
|
<div class="flex-shrink-0 mt-n2 mx-sm-0 mx-auto">
|
||||||
<div class="user-profile-info">
|
@if (Auth::guard('member')->user()->avatar)
|
||||||
<h4 class="mb-2">{{Auth::guard('member')->user()->name}}</h4>
|
<img src="{{ Auth::guard('member')->user()->avatar }}" style="width:100px;hieght:100px;"
|
||||||
<ul class="list-inline mb-0 d-flex align-items-center flex-wrap justify-content-sm-start justify-content-center gap-4">
|
alt="user image" class="d-block h-auto ms-0 ms-sm-5 rounded-4 user-profile-img">
|
||||||
<li class="list-inline-item">
|
@else
|
||||||
<i class='ri-User-line me-2 ri-24px'></i><span class="fw-medium">{{Auth::guard('member')->user()->Level_Name}}</span>
|
<img src="../../assets/img/avatars/1.png" style="width:100px;hieght:100px;"
|
||||||
</li>
|
alt="user image" class="d-block h-auto ms-0 ms-sm-5 rounded-4 user-profile-img">
|
||||||
<li class="list-inline-item">
|
@endif
|
||||||
<i class='ri-home-heart-fill me-2 ri-24px'></i><span class="fw-medium">客戶編號 : {{Auth::guard('member')->user()->id}}</span>
|
|
||||||
</li>
|
|
||||||
<li class="list-inline-item">
|
|
||||||
<i class="ri-calendar-line me-2 ri-24px"></i>
|
|
||||||
<span class="fw-medium">
|
|
||||||
加 入 : {{ \Carbon\Carbon::parse(Auth::guard('member')->user()->created_at)->format('Y 年 m 月') }}
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<a href="javascript:void(0)" class="btn btn-primary" id="submit-btn">
|
|
||||||
<i class="ri-qr-code-fill ri-16px me-2"></i>顯示兌換編碼
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card mb-12" id="promocode">
|
<div class="flex-grow-1 mt-4 mt-sm-12">
|
||||||
<h5 class="card-header">兌換編碼</h5>
|
<div
|
||||||
|
class="d-flex align-items-md-end align-items-sm-start align-items-center justify-content-md-between justify-content-start mx-5 flex-md-row flex-column gap-6">
|
||||||
|
<div class="user-profile-info">
|
||||||
|
<h4 class="mb-2">{{ Auth::guard('member')->user()->name }}</h4>
|
||||||
|
<ul
|
||||||
|
class="list-inline mb-0 d-flex align-items-center flex-wrap justify-content-sm-start justify-content-center gap-4">
|
||||||
|
<li class="list-inline-item">
|
||||||
|
<i class='ri-User-line me-2 ri-24px'></i><span
|
||||||
|
class="fw-medium">{{ Auth::guard('member')->user()->Level_Name }}</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-inline-item">
|
||||||
|
<i class='ri-home-heart-fill me-2 ri-24px'></i><span class="fw-medium">客戶編號
|
||||||
|
: {{ Auth::guard('member')->user()->id }}</span>
|
||||||
|
</li>
|
||||||
|
<li class="list-inline-item">
|
||||||
|
<i class="ri-calendar-line me-2 ri-24px"></i>
|
||||||
|
<span class="fw-medium">
|
||||||
|
加 入 :
|
||||||
|
{{ \Carbon\Carbon::parse(Auth::guard('member')->user()->created_at)->format('Y 年 m 月') }}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0)" class="btn btn-primary" id="submit-btn">
|
||||||
|
<i class="ri-qr-code-fill ri-16px me-2"></i>顯示兌換編碼
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-12">
|
||||||
|
{{-- <h6 class="text-muted">顯示兌換編碼</h6> --}}
|
||||||
|
<div class="card text-center mb-4" id="promocode">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="nav-align-top">
|
||||||
|
<ul class="nav nav-pills" role="tablist">
|
||||||
|
<li class="nav-item">
|
||||||
|
<button type="button"
|
||||||
|
class="nav-link d-flex flex-column gap-1 active" role="tab"
|
||||||
|
data-bs-toggle="tab"
|
||||||
|
data-bs-target="#navs-pills-within-card-active"
|
||||||
|
aria-controls="navs-pills-within-card-active"
|
||||||
|
aria-selected="true"><i class="tf-icons ri-home-smile-line"></i>
|
||||||
|
咖啡國王&皇后</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<button type="button" class="nav-link d-flex flex-column gap-1"
|
||||||
|
role="tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#navs-pills-within-card-link"
|
||||||
|
aria-controls="navs-pills-within-card-link"
|
||||||
|
aria-selected="false"><i class="tf-icons ri-links-line"></i>
|
||||||
|
茶飲大師</button>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="tab-content p-0">
|
||||||
|
<div class="tab-pane fade show active" id="navs-pills-within-card-active"
|
||||||
|
role="tabpanel">
|
||||||
|
<h4 class="card-title">咖啡國王/咖啡皇后 <p>飲品兌換卷</p>
|
||||||
|
</h4>
|
||||||
|
<div class="form-floating form-floating-outline">
|
||||||
|
@if (Auth::guard('member')->user()->level != 9)
|
||||||
|
<input type="text" class="form-control text-danger"
|
||||||
|
style="font-size:24px; font-weight: bold;"
|
||||||
|
id="floatingInput" aria-describedby="floatingInputHelp">
|
||||||
|
<label for="floatingInput">兌換碼</label>
|
||||||
|
{{-- <div id="floatingInputHelp" class="form-text">We'll never share your details with anyone else.</div> --}}
|
||||||
|
@else
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control text-danger"
|
||||||
|
style="font-size:24px; font-weight: bold;"
|
||||||
|
id="floatingInput2" aria-describedby="button-addon2">
|
||||||
|
<button class="btn btn-outline-primary" type="button"
|
||||||
|
id="button-addon2">重新獲取</button>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="navs-pills-within-card-link" role="tabpanel">
|
||||||
|
<h4 class="card-title">茶飲大師手搖機 飲品兌換卷</h4>
|
||||||
|
<p class="card-text">施工中 ....</p>
|
||||||
|
{{-- <a href="javascript:void(0)" class="btn btn-secondary">Go somewhere</a> --}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xl-4 col-lg-5 col-md-5">
|
||||||
|
<!-- About User -->
|
||||||
|
<div class="card mb-6">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="form-floating form-floating-outline">
|
<small class="card-text text-uppercase text-muted small">QRCode</small>
|
||||||
<input type="text" class="form-control text-danger" style="font-size:24px; font-weight: bold;" id="floatingInput" aria-describedby="floatingInputHelp">
|
<div class="d-flex justify-content-center" id="qrcode"></div> <!-- Flexbox居中 -->
|
||||||
<label for="floatingInput">兌換碼</label>
|
</div>
|
||||||
{{-- <div id="floatingInputHelp" class="form-text">We'll never share your details with anyone else.</div> --}}
|
</div>
|
||||||
|
<!--/ About User -->
|
||||||
|
</div>
|
||||||
|
<div class="col-xl-8 col-lg-7 col-md-7">
|
||||||
|
<!-- Activity Timeline -->
|
||||||
|
<div class="card card-action mb-6">
|
||||||
|
<div class="card-header align-items-center">
|
||||||
|
<h5 class="card-action-title mb-0"><i
|
||||||
|
class='ri-bar-chart-2-line ri-24px text-body me-4'></i>消費紀錄</h5>
|
||||||
|
</div>
|
||||||
|
<div class="card-body pt-5">
|
||||||
|
<!-- Order List Table -->
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive">
|
||||||
|
<table class="datatables-order table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th>訂單號</th>
|
||||||
|
<th>日期</th>
|
||||||
|
<th>品項</th>
|
||||||
|
<th>金額</th>
|
||||||
|
<th>狀態</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>000001</td>
|
||||||
|
<td>2025/01/01</td>
|
||||||
|
<td>大杯 冰拿鐵</td>
|
||||||
|
<td class="text-danger">60</td>
|
||||||
|
<td class="text-success">成功</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>000002</td>
|
||||||
|
<td>2025/01/01</td>
|
||||||
|
<td>大杯 冰拿鐵</td>
|
||||||
|
<td class="text-danger">60</td>
|
||||||
|
<td class="text-success">成功</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--/ Activity Timeline -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-xl-4 col-lg-5 col-md-5">
|
|
||||||
<!-- About User -->
|
|
||||||
<div class="card mb-6">
|
|
||||||
<div class="card-body">
|
|
||||||
<small class="card-text text-uppercase text-muted small">QRCode</small>
|
|
||||||
<div class="d-flex justify-content-center" id="qrcode"></div> <!-- Flexbox居中 -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--/ About User -->
|
|
||||||
</div>
|
|
||||||
<div class="col-xl-8 col-lg-7 col-md-7">
|
|
||||||
<!-- Activity Timeline -->
|
|
||||||
<div class="card card-action mb-6">
|
|
||||||
<div class="card-header align-items-center">
|
|
||||||
<h5 class="card-action-title mb-0"><i class='ri-bar-chart-2-line ri-24px text-body me-4'></i>消費紀錄</h5>
|
|
||||||
</div>
|
|
||||||
<div class="card-body pt-5">
|
|
||||||
<!-- Order List Table -->
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-datatable table-responsive">
|
|
||||||
<table class="datatables-order table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<th>訂單號</th>
|
|
||||||
<th>日期</th>
|
|
||||||
<th>品項</th>
|
|
||||||
<th>金額</th>
|
|
||||||
<th>狀態</th>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>000001</td>
|
|
||||||
<td>2025/01/01</td>
|
|
||||||
<td>大杯 冰拿鐵</td>
|
|
||||||
<td class="text-danger">60</td>
|
|
||||||
<td class="text-success">成功</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>000002</td>
|
|
||||||
<td>2025/01/01</td>
|
|
||||||
<td>大杯 冰拿鐵</td>
|
|
||||||
<td class="text-danger">60</td>
|
|
||||||
<td class="text-success">成功</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--/ Activity Timeline -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- / Header -->
|
||||||
|
|
||||||
|
<!-- Navbar pills -->
|
||||||
|
|
||||||
|
<!--/ User Profile Content -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- / Header -->
|
<!-- / Content -->
|
||||||
|
|
||||||
<!-- Navbar pills -->
|
|
||||||
|
|
||||||
<!--/ User Profile Content -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- / Content -->
|
<!-- beautify ignore:end -->
|
||||||
|
|
||||||
</div>
|
<!-- Include necessary scripts -->
|
||||||
<!-- beautify ignore:end -->
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script>
|
||||||
|
|
||||||
<!-- Include necessary scripts -->
|
<script>
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
$(document).ready(function() {
|
||||||
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script>
|
$("#promocode").hide();
|
||||||
|
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||||
<script>
|
text: "https://www.example.com", // 要顯示的內容
|
||||||
$(document).ready(function() {
|
width: 250, // QR code 的寬度
|
||||||
$("#promocode").hide();
|
height: 250 // QR code 的高度
|
||||||
var qrcode = new QRCode(document.getElementById("qrcode"), {
|
});
|
||||||
text: "https://www.example.com", // 要顯示的內容
|
|
||||||
width: 250, // QR code 的寬度
|
|
||||||
height: 250 // QR code 的高度
|
|
||||||
});
|
});
|
||||||
});
|
$("#submit-btn").on('click', function() {
|
||||||
$("#submit-btn").on('click', function() {
|
var id = "{{ Auth::guard('member')->user()->id }}";
|
||||||
var id = "{{Auth::guard('member')->user()->id}}";
|
$("#promocode").show();
|
||||||
$("#promocode").show();
|
|
||||||
|
|
||||||
console.log('id:', id);
|
console.log('id:', id);
|
||||||
// 發送 AJAX 請求
|
// 發送 AJAX 請求
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{route('member.getpromocode')}}", // 設定你的路由 URL
|
url: "{{ route('member.getpromocode') }}", // 設定你的路由 URL
|
||||||
type: 'POST'
|
type: 'POST',
|
||||||
, data: {
|
data: {
|
||||||
_token: '{{ csrf_token() }}', // CSRF token
|
_token: '{{ csrf_token() }}', // CSRF token
|
||||||
id: id
|
id: id
|
||||||
}
|
},
|
||||||
, success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
$("#floatingInput").val(response.promocode);
|
$("#floatingInput").val(response.promocode);
|
||||||
|
$("#floatingInput2").val(response.promocode);
|
||||||
|
|
||||||
|
|
||||||
|
console.log(response); // 顯示後端回應資料
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.log(xhr.responseText); // 顯示錯誤資訊
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
console.log(response); // 顯示後端回應資料
|
|
||||||
}
|
|
||||||
, error: function(xhr, status, error) {
|
|
||||||
console.log(xhr.responseText); // 顯示錯誤資訊
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
$("#button-addon2").on('click', function() {
|
||||||
|
var id = "{{ Auth::guard('member')->user()->id }}";
|
||||||
|
$("#promocode").show();
|
||||||
|
|
||||||
});
|
console.log('id:', id);
|
||||||
|
// 發送 AJAX 請求
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('member.morepromocode') }}", // 設定你的路由 URL
|
||||||
|
type: 'PATCH',
|
||||||
|
data: {
|
||||||
|
_token: '{{ csrf_token() }}', // CSRF token
|
||||||
|
id: id
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
|
||||||
</script>
|
$("#floatingInput").val(response.promocode);
|
||||||
|
$("#floatingInput2").val(response.promocode);
|
||||||
|
|
||||||
|
|
||||||
|
console.log(response); // 顯示後端回應資料
|
||||||
|
},
|
||||||
|
error: function(xhr, status, error) {
|
||||||
|
console.log(xhr.responseText); // 顯示錯誤資訊
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@ -158,16 +158,7 @@ class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-
|
|||||||
<!-- BEGIN: Vendor JS-->
|
<!-- BEGIN: Vendor JS-->
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
<!-- Core JS -->
|
<!-- Core JS -->
|
||||||
<!-- build:js assets/vendor/js/core.js -->
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/jquery/jquery.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/popper/popper.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/js/bootstrap.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/node-waves/node-waves.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/perfect-scrollbar/perfect-scrollbar.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/hammer/hammer.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/i18n/i18n.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/libs/typeahead-js/typeahead.js"></script>
|
|
||||||
<script src="{{ asset('assets') }}/vendor/js/menu.js"></script>
|
|
||||||
|
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
|
|
||||||
@ -182,7 +173,6 @@ class="col-12 text-center d-flex flex-wrap justify-content-center gap-4 row-gap-
|
|||||||
<script src="{{ asset('assets') }}/vendor/libs/@form-validation/auto-focus.js"></script>
|
<script src="{{ asset('assets') }}/vendor/libs/@form-validation/auto-focus.js"></script>
|
||||||
|
|
||||||
<!-- Main JS -->
|
<!-- Main JS -->
|
||||||
<script src="../../assets/js/main.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" class="dark-style layout-menu-fixed customizer-hide" dir="ltr" data-theme="theme-default" data-assets-path="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/assets/" data-base-url="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo-4" data-framework="laravel" data-template="blank-menu-theme-default-dark" data-style="dark">
|
<html lang="en" class="light-style layout-menu-fixed customizer-hide" dir="ltr" data-theme="theme-default" data-assets-path="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo/assets/" data-base-url="https://demos.pixinvent.com/materialize-html-laravel-admin-template/demo-4" data-framework="laravel" data-template="blank-menu-theme-default-dark" data-style="dark">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<!-- $isFront is used to append the front layout styles only on the front layout otherwise the variable will be blank -->
|
<!-- $isFront is used to append the front layout styles only on the front layout otherwise the variable will be blank -->
|
||||||
<!-- BEGIN: Theme CSS-->
|
<!-- BEGIN: Theme CSS-->
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com/css">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" cross origin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/fonts/remixicon/remixicon.css" />
|
<link rel="preload" as="style" href="{{asset('assets')}}/vendor/fonts/remixicon/remixicon.css" />
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<title>卡菲姬後台管理</title>
|
<title>卡菲姬後台管理</title>
|
||||||
|
|
||||||
<meta name="description" content="" />
|
<meta name="description" content="" />
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/favicon.ico') }}" />
|
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/cafeg.ico') }}" />
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
<meta name="description" content="" />
|
<meta name="description" content="" />
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/favicon.ico') }}" />
|
<link rel="icon" type="image/x-icon" href="{{ asset('assets/img/favicon/cafeg.ico') }}" />
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
|||||||
@ -63,6 +63,7 @@
|
|||||||
Route::get('validemail', [EmailController::class, 'validemail'])->name('validemail');
|
Route::get('validemail', [EmailController::class, 'validemail'])->name('validemail');
|
||||||
Route::post('sendemail', [EmailController::class, 'sendemail'])->name('sendemail');
|
Route::post('sendemail', [EmailController::class, 'sendemail'])->name('sendemail');
|
||||||
Route::get('page-profile', [MemberController::class, 'pageProfile'])->name('page-profile');
|
Route::get('page-profile', [MemberController::class, 'pageProfile'])->name('page-profile');
|
||||||
|
Route::patch('morepromocode', [PromoCodeController::class, 'morePromocode'])->name('morepromocode');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user