Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
4b57a3fd
Commit
4b57a3fd
authored
Nov 06, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
4ba20d41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
center-order/app/base/utils/execClientNew.js
+19
-19
No files found.
center-order/app/base/utils/execClientNew.js
View file @
4b57a3fd
...
...
@@ -207,25 +207,25 @@ class ExecClientNew {
if
(
!
ContentType
)
{
ContentType
=
"application/json"
;
}
var
data
=
null
;
if
(
typeof
params
===
'object'
)
{
// 声明cache变量,便于匹配是否有循环引用的情况
var
cache
=
[];
data
=
JSON
.
stringify
(
params
,
function
(
key
,
value
)
{
if
(
typeof
value
===
'object'
&&
value
!==
null
)
{
if
(
cache
.
indexOf
(
value
)
!==
-
1
)
{
// 移除
return
;
}
// 收集所有的值
cache
.
push
(
value
);
}
return
value
;
});
cache
=
null
;
// 清空变量,便于垃圾回收机制回收
}
else
{
data
=
params
;
}
var
data
=
JSON
.
stringify
(
params
)
;
//
if (typeof params === 'object') {
//
// 声明cache变量,便于匹配是否有循环引用的情况
//
var cache = [];
//
data = JSON.stringify(params, function (key, value) {
//
if (typeof value === 'object' && value !== null) {
//
if (cache.indexOf(value) !== -1) {
//
// 移除
//
return;
//
}
//
// 收集所有的值
//
cache.push(value);
//
}
//
return value;
//
});
//
cache = null; // 清空变量,便于垃圾回收机制回收
//
} else {
//
data = params;
//
}
var
cmdStr
=
"curl --user admines:adminGSBes. -k -H 'Content-type:"
+
ContentType
+
"'"
;
if
(
headData
)
{
var
headDataKeys
=
Object
.
keys
(
headData
);
...
...
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