Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
contractmanage
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
张伯涛
contractmanage
Commits
1a6b5fe1
Commit
1a6b5fe1
authored
Jan 13, 2022
by
wangjiankun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:地址、请求修改
parent
b58691f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
15 deletions
+12
-15
request.js
src/utils/request.js
+4
-14
login.vue
src/views/user/login.vue
+7
-0
vue.config.js
vue.config.js
+1
-1
No files found.
src/utils/request.js
View file @
1a6b5fe1
...
...
@@ -34,25 +34,15 @@ service.interceptors.request.use(config => {
}
// 参数发出前统一进行加密 白名单内的不进行加密
console
.
log
(
config
)
if
((
config
.
baseURL
+
config
.
url
).
indexOf
(
'authority'
)
<
0
)
{
if
(
config
.
params
)
{
console
.
log
(
config
.
params
)
config
.
params
=
{
sign
:
(
new
SM4
(
JSON
.
stringify
(
config
.
params
)).
encryptEcb
())
}
}
else
{
if
(
config
.
data
)
{
config
.
headers
[
'Content-Type'
]
=
'application/x-www-form-urlencoded;charset=UTF-8'
console
.
log
(
JSON
.
stringify
(
config
.
data
))
const
temp
=
{
sign
:
(
new
SM4
(
JSON
.
stringify
(
config
.
data
)).
encryptEcb
())
}
config
.
data
=
Qs
.
stringify
(
temp
,
{
arrayFormat
:
'indices'
,
allowDots
:
true
})
}
}
}
// if(config.data) {
// config.data = Qs.stringify(config.data, { arrayFormat: 'repeat' })
// }
return
config
},
error
=>
{
console
.
log
(
error
)
Promise
.
reject
(
error
)
})
// 响应拦截器
service
.
interceptors
.
response
.
use
(
res
=>
{
/* // 判断 loading 状态
...
...
src/views/user/login.vue
View file @
1a6b5fe1
...
...
@@ -75,6 +75,7 @@
import
{
Store
}
from
'@/utils/storage'
import
{
storeKey
}
from
'@/utils/auth'
import
{
Login
}
from
'./apis'
import
request
from
'@/utils/request'
export
default
{
name
:
'Login'
,
data
()
{
...
...
@@ -114,6 +115,12 @@ export default {
created
()
{
this
.
getCode
()
this
.
getCookie
()
request
({
method
:
'post'
,
data
:
{
},
// post/put 用此传参
// params: {}, // get 用此传参
url
:
'/contract/contract/add'
})
},
methods
:
{
goDetail
(
path
)
{
...
...
vue.config.js
View file @
1a6b5fe1
...
...
@@ -42,7 +42,7 @@ module.exports = {
[
process
.
env
.
VUE_APP_BASE_API
]:
{
// target: `http://10.5.87.231:10010/`,
// target: `http://zt.51newsoftware.com:10184/`,
target
:
'http://
zt.91isoft.com:10184
/'
,
target
:
'http://
117.122.212.101:8090
/'
,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
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