fix. 修正一些之前 login 的命名導致program error
This commit is contained in:
parent
ffede88eec
commit
e86160cb63
@ -157,7 +157,7 @@ public function memberNormalLogin(Request $request)
|
||||
return redirect()->route('member.index');
|
||||
} else {
|
||||
|
||||
return redirect()->route('front.login.view')->with('error', '帳號密碼錯誤');
|
||||
return redirect()->route('login')->with('error', '帳號密碼錯誤');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,14 +35,8 @@ public function create(Request $request)
|
||||
'phone' => $request->phone ?? '',
|
||||
]);
|
||||
|
||||
if (isset($newUser->email)) {
|
||||
return redirect()->route('login')->with('sucess', '完成註冊,請登入');
|
||||
|
||||
return redirect()->route('member.index')->with('sucess', '完成註冊');
|
||||
|
||||
} else {
|
||||
|
||||
return redirect()->route('member.profile')->with('sucess', '完成註冊,請完善你得資料');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -231,6 +231,14 @@
|
||||
</body>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
@if (session('error'))
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
@ -244,11 +252,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
@endif
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
|
||||
@endif
|
||||
@ -157,7 +157,7 @@
|
||||
|
||||
<p class="text-center">
|
||||
<span>已經有帳號?</span>
|
||||
<a href="{{ route('front.login.view') }}" class="text-body">
|
||||
<a href="{{ route('login') }}" class="text-body">
|
||||
<span>由此登入</span>
|
||||
</a>
|
||||
</p>
|
||||
@ -388,6 +388,11 @@ function validateEmailField(field) {
|
||||
|
||||
// 如果所有欄位均有效,執行表單提交
|
||||
if (isFormValid && isPhoneValid) {
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: "{{ route('member.register.create') }}",
|
||||
type: 'POST',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user