|
|
@ -15,7 +15,7 @@ export function requestGet(url: string, data?: any): Promise<ResultType> { |
|
|
|
|
|
|
|
|
|
|
|
export function requestPost(url: string, data = {}): Promise<ResultType> { |
|
|
|
export function requestPost(url: string, data = {}): Promise<ResultType> { |
|
|
|
return new Promise(resolve => { |
|
|
|
return new Promise(resolve => { |
|
|
|
Dec.reqPost(getFullUrl(url), data, re => { |
|
|
|
Dec.reqByEncrypt("POST", getFullUrl(url), data, re => { |
|
|
|
resolve(re); |
|
|
|
resolve(re); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -23,7 +23,7 @@ export function requestPost(url: string, data = {}): Promise<ResultType> { |
|
|
|
|
|
|
|
|
|
|
|
export function requestDelete(url: string, data = {}) { |
|
|
|
export function requestDelete(url: string, data = {}) { |
|
|
|
return new Promise(resolve => { |
|
|
|
return new Promise(resolve => { |
|
|
|
Dec.reqDelete(getFullUrl(url), data, re => { |
|
|
|
Dec.reqByEncrypt("DELETE", getFullUrl(url), data, re => { |
|
|
|
resolve(re); |
|
|
|
resolve(re); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -31,7 +31,7 @@ export function requestDelete(url: string, data = {}) { |
|
|
|
|
|
|
|
|
|
|
|
export function requestPut(url: string, data = {}) { |
|
|
|
export function requestPut(url: string, data = {}) { |
|
|
|
return new Promise(resolve => { |
|
|
|
return new Promise(resolve => { |
|
|
|
Dec.reqPut(getFullUrl(url), data, re => { |
|
|
|
Dec.reqByEncrypt("PUT", getFullUrl(url), data, re => { |
|
|
|
resolve(re); |
|
|
|
resolve(re); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|