Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
薪
薪瑞通-前端
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
许珑标
薪瑞通-前端
Commits
c5aca049
Commit
c5aca049
authored
May 30, 2025
by
许珑标
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试环境免短信登录
parent
3668696e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/api/login.js
src/api/login.js
+1
-1
src/views/login.vue
src/views/login.vue
+4
-4
No files found.
src/api/login.js
View file @
c5aca049
...
@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) {
...
@@ -10,7 +10,7 @@ export function login(username, password, code, smsCode, uuid) {
uuid
uuid
}
}
return
request
({
return
request
({
url
:
'
/login
BySmsCode
'
,
url
:
'
/login
'
,
headers
:
{
headers
:
{
isToken
:
false
isToken
:
false
},
},
...
...
src/views/login.vue
View file @
c5aca049
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
<el-input
v-model=
"loginForm.password"
type=
"password"
auto-complete=
"off"
placeholder=
"密码"
@
keyup.enter.native=
"
getSmsCode
"
>
@
keyup.enter.native=
"
handleLogin
"
>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-form-item
prop=
"code"
v-if=
"captchaEnabled"
>
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"数字验证码"
style=
"width: 63%;"
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
placeholder=
"数字验证码"
style=
"width: 63%;"
@
keyup.enter.native=
"
getSmsCode
"
>
@
keyup.enter.native=
"
handleLogin
"
>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"validCode"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
<div
class=
"login-code"
>
<div
class=
"login-code"
>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:12px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-checkbox
v-model=
"loginForm.rememberMe"
style=
"margin:12px 0px 25px 0px;"
>
记住密码
</el-checkbox>
<el-form-item
style=
"width:100%;"
>
<el-form-item
style=
"width:100%;"
>
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
<el-button
:loading=
"loading"
size=
"medium"
type=
"primary"
style=
"width:100%;"
@
click.native.prevent=
"
getSmsCode
"
>
@
click.native.prevent=
"
handleLogin
"
>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-if=
"!loading"
>
登 录
</span>
<span
v-else
>
登 录 中...
</span>
<span
v-else
>
登 录 中...
</span>
</el-button>
</el-button>
...
@@ -236,7 +236,7 @@ export default {
...
@@ -236,7 +236,7 @@ export default {
// this.loginRules.smsCode = [{ required: true, trigger: "change", message: "请输入短信验证码" }]
// this.loginRules.smsCode = [{ required: true, trigger: "change", message: "请输入短信验证码" }]
// this.$refs.loginForm.validate(valid => {
// this.$refs.loginForm.validate(valid => {
// if (valid) {
// if (valid) {
this
.
loginForm
.
smsCode
=
code
//
this.loginForm.smsCode = code
this
.
loading
=
true
;
this
.
loading
=
true
;
if
(
this
.
loginForm
.
rememberMe
)
{
if
(
this
.
loginForm
.
rememberMe
)
{
Cookies
.
set
(
"
username
"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
Cookies
.
set
(
"
username
"
,
this
.
loginForm
.
username
,
{
expires
:
30
});
...
...
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