Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xichonght
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
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
zhangdishen
xichonght
Commits
4eb9aff7
Commit
4eb9aff7
authored
Sep 01, 2021
by
qddidi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 修改获取验证码逻辑
parent
0ea7fcf2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2422 additions
and
2393 deletions
+2422
-2393
package-lock.json
xichongSys/package-lock.json
+2401
-2382
axios.js
xichongSys/src/http/axios.js
+1
-0
getlist.js
xichongSys/src/http/moudules/getlist.js
+8
-0
global.js
xichongSys/src/utils/global.js
+4
-9
Login.vue
xichongSys/src/views/Login.vue
+8
-2
No files found.
xichongSys/package-lock.json
View file @
4eb9aff7
This diff is collapsed.
Click to expand it.
xichongSys/src/http/axios.js
View file @
4eb9aff7
...
...
@@ -154,6 +154,7 @@ export default function $axios(options) {
// 请求处理
instance
(
options
).
then
(
res
=>
{
console
.
log
(
options
)
resolve
(
res
)
return
false
}).
catch
(
error
=>
{
...
...
xichongSys/src/http/moudules/getlist.js
View file @
4eb9aff7
...
...
@@ -288,3 +288,11 @@ export const selectNoArcEventLogList = (data) => {
data
})
};
//获取验证码
export
const
getCode
=
(
data
)
=>
{
return
axios
({
url
:
'/captcha.jpg'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
xichongSys/src/utils/global.js
View file @
4eb9aff7
...
...
@@ -4,16 +4,11 @@
* 通过 this.Global 调用
*/
// 后台管理系统服务器地址
// export const baseUrl2 = 'http://xclc.rensheju.com'
//export const baseUrl = 'http://xc.rensheju.com'
// export const baseUrl2 = 'http://xclc.rensheju.com'
// //export const baseUrl = 'http://xc.rensheju.com'
// export const baseUrl = 'http://172.16.10.33:9002'
export
const
baseUrl
=
'http://xc.rensheju.com'
export
const
baseUrl2
=
'http://xclc.rensheju.com'
export
const
baseUrl
=
'http://xc.rensheju.com'
// export const baseUrl2 = 'http://xclc.rensheju.com'
//export const baseUrl = 'http://172.16.10.33:9002'
export
const
baseUrl2
=
'http://xclc.rensheju.com'
export
default
{
baseUrl
,
baseUrl2
...
...
xichongSys/src/views/Login.vue
View file @
4eb9aff7
...
...
@@ -81,7 +81,7 @@ export default {
login
()
{
this
.
loading
=
true
let
userInfo
=
{
account
:
this
.
loginForm
.
account
,
password
:
this
.
loginForm
.
password
,
captcha
:
this
.
loginForm
.
captcha
}
let
userInfo
=
{
account
:
this
.
loginForm
.
account
,
password
:
this
.
loginForm
.
password
,
kaptchasessionkey
:
sessionStorage
.
getItem
(
"KAPTCHA_SESSION_KEY"
),
captcha
:
this
.
loginForm
.
captcha
}
this
.
$api
.
login
.
login
(
userInfo
).
then
((
res
)
=>
{
if
(
res
.
code
!=
200
)
{
this
.
$message
({
...
...
@@ -103,7 +103,13 @@ export default {
});
},
refreshCaptcha
:
function
(){
this
.
loginForm
.
src
=
this
.
global
.
baseUrl
+
"/captcha.jpg?t="
+
new
Date
().
getTime
();
this
.
$api
.
getlist
.
getCode
().
then
((
res
)
=>
{
this
.
loginForm
.
src
=
`data:image/jpg;base64,
${
res
.
data
.
img
}
`
sessionStorage
.
setItem
(
'KAPTCHA_SESSION_KEY'
,
res
.
data
.
KAPTCHA_SESSION_KEY
)
}).
catch
((
res
)
=>
{
});
//this.loginForm.src = this.global.baseUrl + "/captcha.jpg?t=" + new Date().getTime();
},
reset
()
{
this
.
$refs
.
loginForm
.
resetFields
()
...
...
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