Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_pda_Web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
高宇
template_pda_Web
Commits
383d71b3
Commit
383d71b3
authored
Mar 08, 2024
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化项目
parent
bc213858
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
login.js
src/api/login.js
+25
-8
login.vue
src/views/login/login.vue
+1
-0
vue.config.js
vue.config.js
+2
-1
No files found.
src/api/login.js
View file @
383d71b3
...
@@ -2,24 +2,41 @@ import request from '@/utils/request'
...
@@ -2,24 +2,41 @@ import request from '@/utils/request'
import
{
encrypt
}
from
'@/utils/jsencrypt'
import
{
encrypt
}
from
'@/utils/jsencrypt'
import
Qs
from
'qs'
import
Qs
from
'qs'
// 登录方法
// 登录方法
// 登录方法
export
function
login
(
username
,
password
,
code
,
uuid
)
{
export
function
login
(
username
,
password
,
code
,
uuid
)
{
const
data
=
{
const
data
=
{
username
,
username
,
password
,
password
code
,
//
code,
uuid
//
uuid
}
}
console
.
log
(
'加密前数据'
,
data
)
return
request
({
return
request
({
url
:
'/auth/login'
,
url
:
'/auth/login'
,
method
:
'post'
,
method
:
'post'
,
data
:
Qs
.
stringify
({
params
:
data
,
sign
:
encrypt
(
data
)
headers
:
{
}),
'Content-Type'
:
'application/x-www-form-urlencoded'
headers
:
{
}
}
})
})
}
}
// export function login(username, password, code, uuid) {
// const data = {
// username,
// password,
// code,
// uuid
// }
// console.log('加密前数据', data)
// return request({
// url: '/auth/login',
// method: 'post',
// data: Qs.stringify({
// sign: encrypt(data)
// }),
// headers: {}
// })
// }
// 刷新token
// 刷新token
export
function
refreshToken
(
params
)
{
export
function
refreshToken
(
params
)
{
return
request
({
return
request
({
...
...
src/views/login/login.vue
View file @
383d71b3
...
@@ -245,6 +245,7 @@ export default {
...
@@ -245,6 +245,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
// this.$router.push('/welcome')
// this.$router.push('/welcome')
this
.
$router
.
push
(
'/controlPlatform/control'
)
this
.
$router
.
push
(
'/controlPlatform/control'
)
// setTimeout(this.loading =false,1000)
this
.
loading
=
false
this
.
loading
=
false
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
...
vue.config.js
View file @
383d71b3
...
@@ -86,8 +86,9 @@ module.exports = {
...
@@ -86,8 +86,9 @@ module.exports = {
// target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.31:8082/`,
// target: `http://192.168.1.12:8082/`, // 孙浩
// target: `http://192.168.1.12:8082/`, // 孙浩
// target: `http://192.168.1.41:8082/`,
// target: `http://192.168.1.41:8082/`,
target
:
`http://49.232.167.247:20014/`
,
// 线上
//
target: `http://49.232.167.247:20014/`, // 线上
// target: `http://192.168.1.30:8082/`,
// target: `http://192.168.1.30:8082/`,
target
:
`http://localhost:8088/`
,
// target: `http://49.232.167.247:20014/`,
// target: `http://49.232.167.247:20014/`,
// changeOrigin: true,
// changeOrigin: true,
pathRewrite
:
{
pathRewrite
:
{
...
...
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