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
d99ae3e3
Commit
d99ae3e3
authored
Feb 10, 2025
by
许珑标
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出功能优化
parent
f0ade724
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
src/utils/request.js
src/utils/request.js
+1
-4
No files found.
src/utils/request.js
View file @
d99ae3e3
...
@@ -33,13 +33,11 @@ service.interceptors.request.use(config => {
...
@@ -33,13 +33,11 @@ service.interceptors.request.use(config => {
// 请求参数加密
// 请求参数加密
if
(
process
.
env
.
VUE_APP_AES_ENCRYPT_ENABLED
==
'
true
'
)
{
if
(
process
.
env
.
VUE_APP_AES_ENCRYPT_ENABLED
==
'
true
'
)
{
if
(
config
.
data
)
{
if
(
config
.
data
)
{
console
.
log
(
JSON
.
stringify
(
config
.
data
));
config
.
data
=
{
config
.
data
=
{
// 加密参数
// 加密参数
dataParams
:
encodeURIComponent
(
aes
.
encrypt
(
JSON
.
stringify
(
config
.
data
)))
dataParams
:
encodeURIComponent
(
aes
.
encrypt
(
JSON
.
stringify
(
config
.
data
)))
}
}
}
else
if
(
config
.
params
)
{
}
else
if
(
config
.
params
)
{
console
.
log
(
JSON
.
stringify
(
config
.
params
));
config
.
params
=
{
config
.
params
=
{
// 加密参数
// 加密参数
dataParams
:
encodeURIComponent
(
aes
.
encrypt
(
JSON
.
stringify
(
config
.
params
)))
dataParams
:
encodeURIComponent
(
aes
.
encrypt
(
JSON
.
stringify
(
config
.
params
)))
...
@@ -62,6 +60,7 @@ service.interceptors.request.use(config => {
...
@@ -62,6 +60,7 @@ service.interceptors.request.use(config => {
config
.
url
=
url
;
config
.
url
=
url
;
}
}
if
(
!
isRepeatSubmit
&&
(
config
.
method
===
'
post
'
||
config
.
method
===
'
put
'
))
{
if
(
!
isRepeatSubmit
&&
(
config
.
method
===
'
post
'
||
config
.
method
===
'
put
'
))
{
console
.
log
(
config
);
const
requestObj
=
{
const
requestObj
=
{
url
:
config
.
url
,
url
:
config
.
url
,
data
:
typeof
config
.
data
===
'
object
'
?
JSON
.
stringify
(
config
.
data
)
:
config
.
data
,
data
:
typeof
config
.
data
===
'
object
'
?
JSON
.
stringify
(
config
.
data
)
:
config
.
data
,
...
@@ -158,8 +157,6 @@ service.interceptors.response.use(res => {
...
@@ -158,8 +157,6 @@ service.interceptors.response.use(res => {
export
function
download
(
url
,
params
,
filename
)
{
export
function
download
(
url
,
params
,
filename
)
{
downloadLoadingInstance
=
Loading
.
service
({
text
:
"
正在下载数据,请稍候
"
,
spinner
:
"
el-icon-loading
"
,
background
:
"
rgba(0, 0, 0, 0.7)
"
,
})
downloadLoadingInstance
=
Loading
.
service
({
text
:
"
正在下载数据,请稍候
"
,
spinner
:
"
el-icon-loading
"
,
background
:
"
rgba(0, 0, 0, 0.7)
"
,
})
return
service
.
post
(
url
,
params
,
{
return
service
.
post
(
url
,
params
,
{
transformRequest
:
[(
params
)
=>
{
return
tansParams
(
params
)
}],
headers
:
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
},
responseType
:
'
blob
'
responseType
:
'
blob
'
}).
then
(
async
(
data
)
=>
{
}).
then
(
async
(
data
)
=>
{
const
isLogin
=
await
blobValidate
(
data
);
const
isLogin
=
await
blobValidate
(
data
);
...
...
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