Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
79116365
authored
Nov 14, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店铺登录
parent
b1b102f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
resources/views/admin/loginstore.blade.php
+12
-11
No files found.
resources/views/admin/loginstore.blade.php
View file @
79116365
...
...
@@ -78,10 +78,10 @@
<fieldset
class=
"form-label-group form-group position-relative has-icon-left"
>
<input
type=
"text"
class=
"form-control {{ $errors->has('
phon
e') ? 'is-invalid' : '' }}"
name=
"
phon
e"
class=
"form-control {{ $errors->has('
usernam
e') ? 'is-invalid' : '' }}"
name=
"
usernam
e"
placeholder=
"手机号"
value=
"{{ old('
phon
e') }}"
value=
"{{ old('
usernam
e') }}"
required
autofocus
>
...
...
@@ -90,12 +90,12 @@
<i
class=
"feather icon-user"
></i>
</div>
<label
for=
"
phon
e"
>
手机号
</label>
<label
for=
"
usernam
e"
>
手机号
</label>
<div
class=
"help-block with-errors"
></div>
@if($errors->has('
phon
e'))
@if($errors->has('
usernam
e'))
<span
class=
"invalid-feedback text-danger"
role=
"alert"
>
@foreach($errors->get('
phon
e') as $message)
@foreach($errors->get('
usernam
e') as $message)
<span
class=
"control-label"
for=
"inputError"
><i
class=
"feather icon-x-circle"
></i>
{{$message}}
</span><br>
@endforeach
</span>
...
...
@@ -176,18 +176,19 @@
let
timer
;
function
getVerificationCode
()
{
const
phone
=
$
(
'input[name="phon
e"]'
).
val
();
if
(
!
phon
e
)
{
const
username
=
$
(
'input[name="usernam
e"]'
).
val
();
if
(
!
usernam
e
)
{
alert
(
'请输入手机号'
);
return
;
}
// 发送 AJAX 请求获取验证码
$
.
ajax
({
url
:
'{{ admin_url('
auth
/
get
-
verification
-
code
') }}'
,
// 替换为您的接口地址
url
:
"{{ admin_url('auth/get-verification-code') }}"
,
// 替换为您的接口地址
method
:
'POST'
,
data
:
{
phone
:
phone
,
username
:
username
,
role
:
store
,
_token
:
'{{ csrf_token() }}'
},
success
:
function
(
response
)
{
...
...
@@ -211,7 +212,7 @@ function startCountdown() {
$
(
'#get-verification-code'
).
text
(
`重新获取(
${
countdown
}
s)`
);
if
(
countdown
<=
0
)
{
clearInterval
(
timer
);
$
(
'#get-verification-code'
).
prop
(
'disabled'
,
false
).
text
(
'
{{ __('
admin
.
get_verification_code
') }}
'
);
$
(
'#get-verification-code'
).
prop
(
'disabled'
,
false
).
text
(
'
获取验证码
'
);
countdown
=
60
;
// 重置倒计时
}
},
1000
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment