Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-manager-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
赵啸非
attendance-performance-manager-ui
Commits
83afc5db
Commit
83afc5db
authored
May 10, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改post提交对象包装
parent
d79161e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
src/assets/utils/ajax.js
src/assets/utils/ajax.js
+7
-11
No files found.
src/assets/utils/ajax.js
View file @
83afc5db
...
...
@@ -81,20 +81,16 @@ instance.interceptors.response.use(response=>{
* @returns
*/
export
function
post
(
url
,
option
,
config
=
{})
{
/* const data = Object.assign({}, option, {
// __mortals_token__: cookie.getItem('__mortals_token__'),
})
return instance.post(url, data, config)*/
//判断object是数组还是对象
if
(
Object
.
getPrototypeOf
(
option
)
===
Object
.
prototype
){
const
data
=
Object
.
assign
({},
option
,
{
// __mortals_token__: cookie.getItem('__mortals_token__'),
})
return
instance
.
post
(
url
,
data
,
config
)
}
else
{
if
(
Object
.
getPrototypeOf
(
option
)
===
Array
.
prototype
){
return
instance
.
post
(
url
,
option
,
config
)
}
const
data
=
Object
.
assign
({},
option
,
{
// __mortals_token__: cookie.getItem('__mortals_token__'),
})
return
instance
.
post
(
url
,
data
,
config
)
}
/**
...
...
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