Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
62233c6d
Commit
62233c6d
authored
Apr 27, 2023
by
李鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
01cca274
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
src/components/login-by-code.vue
src/components/login-by-code.vue
+26
-8
No files found.
src/components/login-by-code.vue
View file @
62233c6d
...
@@ -34,7 +34,9 @@
...
@@ -34,7 +34,9 @@
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
<el-button
type=
"primary"
@
click.prevent=
"loginAction()"
style=
"width: 100%"
>
登 录
</el-button>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
<el-button
class=
"register_btn"
@
click.prevent=
"$emit('register')"
style=
"width: 100%"
>
...
@@ -51,8 +53,11 @@
...
@@ -51,8 +53,11 @@
<
script
setup
>
<
script
setup
>
import
{
reactive
,
toRefs
,
ref
,
onBeforeMount
,
nextTick
}
from
"
vue
"
;
import
{
reactive
,
toRefs
,
ref
,
onBeforeMount
,
nextTick
}
from
"
vue
"
;
import
menu
from
"
../router/function
"
;
import
{
generateRoutes
}
from
"
../router/index
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
useStore
}
from
"
vuex
"
;
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
const
validatePhone
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
;
const
reg
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
;
...
@@ -82,18 +87,21 @@ const state = reactive({
...
@@ -82,18 +87,21 @@ const state = reactive({
countDownTimer
:
null
,
countDownTimer
:
null
,
});
});
const
store
=
useStore
();
const
loginFormRef
=
ref
(
null
);
const
loginFormRef
=
ref
(
null
);
const
getMsgCode
=
()
=>
{
const
getMsgCode
=
()
=>
{
loginFormRef
.
value
.
validateField
(
"
mobile
"
,
(
valid
)
=>
{
loginFormRef
.
value
.
validateField
(
"
mobile
"
,
(
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
axios
.
post
(
"
/apaas/system/v5/sms/verifyCode
"
,
{
phone
:
state
.
loginForm
.
mobile
}).
then
(({
data
})
=>
{
axios
if
(
data
.
code
==
200
)
{
.
post
(
"
/apaas/system/v5/sms/verifyCode
"
,
{
phone
:
state
.
loginForm
.
mobile
})
countDownAction
();
.
then
(({
data
})
=>
{
}
else
{
if
(
data
.
code
==
200
)
{
ElMessage
.
error
(
data
.
data
);
countDownAction
();
}
}
else
{
});
ElMessage
.
error
(
data
.
data
);
}
});
}
}
});
});
};
// 获取验证码
};
// 获取验证码
...
@@ -166,6 +174,16 @@ const getUser = () => {
...
@@ -166,6 +174,16 @@ const getUser = () => {
});
});
};
};
const
getMenuObj
=
(
menu
,
parentRowPath
,
menuObj
)
=>
{
menu
.
forEach
((
e
,
idx
)
=>
{
e
.
rowPath
=
parentRowPath
+
"
.
"
+
idx
;
menuObj
[
e
.
path
]
=
e
;
if
(
e
.
children
&&
e
.
children
.
length
)
{
getMenuObj
(
e
.
children
,
e
.
rowPath
,
menuObj
);
}
});
};
const
{
loginForm
,
loginFormRules
,
countDown
,
countDownTimer
}
=
toRefs
(
state
);
const
{
loginForm
,
loginFormRules
,
countDown
,
countDownTimer
}
=
toRefs
(
state
);
</
script
>
</
script
>
...
...
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