修改接口签名传参判断条件
This commit is contained in:
@@ -1084,7 +1084,7 @@ function networkRequest(reqObj = {}, type) {
|
||||
});
|
||||
promise.then((val) => {
|
||||
// setTimeout(function () {
|
||||
const sign = objectToQueryString(Object.assign({}, params));
|
||||
const sign = objectToQueryString(Object.assign({}, params), reqObj);
|
||||
pubHeader.pub_sign = sign;
|
||||
|
||||
if (!reqObj.headers || typeof reqObj.headers !== 'object') {
|
||||
@@ -1110,7 +1110,7 @@ function networkRequest(reqObj = {}, type) {
|
||||
// console.log(reqObj.contentType);
|
||||
if (!reqObj.contentType) {
|
||||
reqObj.data = objToParam(reqObj.data)
|
||||
console.log('1111',reqObj.data);
|
||||
console.log('1111', reqObj.data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1122,8 +1122,8 @@ function networkRequest(reqObj = {}, type) {
|
||||
});
|
||||
|
||||
}
|
||||
function objectToQueryString(obj) {
|
||||
if (JSON.stringify(obj) == "{}") {
|
||||
function objectToQueryString(obj, objAll) {
|
||||
if (JSON.stringify(obj) == "{}" || objAll.contentType) {
|
||||
var str = 'key=rpbs6us1m8r2j9g6u06ff2bo18orwaya'
|
||||
} else {
|
||||
var str = Object.keys(obj)
|
||||
|
Reference in New Issue
Block a user