Commit c51c27b4 by wufan

feat:去掉axios无用代码

parent 40d67418
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-31 09:34:31 * @Date: 2020-08-31 09:34:31
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2020-12-09 19:07:53 * @LastEditTime: 2020-12-17 14:24:27
* @Description: * @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -33,7 +33,6 @@ class Axios { ...@@ -33,7 +33,6 @@ class Axios {
options: FetchOptions = { requestType: 'json' } options: FetchOptions = { requestType: 'json' }
): Promise<any> { ): Promise<any> {
const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}`; const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}`;
// const _url = `${url}?storeId=${User.getStoreId()}&token=${User.getToken()}&storeUserId=${User.getStoreUserId()}&userId=${User.getUserId()}p=w&v=v5.4.8&userType=B&token=9f1609b2e7234afd8922a8676dbbf721&uid=920261769807528000&tid=1305385165390426114&aid=1305385165390426114`;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const instance: AxiosInstance = axios.create({ const instance: AxiosInstance = axios.create({
...@@ -47,44 +46,6 @@ class Axios { ...@@ -47,44 +46,6 @@ class Axios {
product: "xmCloudClass", product: "xmCloudClass",
'Content-Type': options.requestType === 'form' ? 'application/x-www-form-urlencoded' : 'application/json; charset=UTF-8', 'Content-Type': options.requestType === 'form' ? 'application/x-www-form-urlencoded' : 'application/json; charset=UTF-8',
} }
// headers: {
// "content-length": "2",
// "referer": "https://dev.xiaomai5.com/",
// "x-b3-parentspanid": "e5e8fdfc471ed007",
// "sec-fetch-site": "same-site",
// "origin": "https://dev.xiaomai5.com",
// "x-b3-sampled": "1",
// "x-forwarded-port": "443",
// "project": "xmzj-web-b",
// "tid": "1305385165390426114",
// "uid": "920261769807528000",
// "instid": "1213001850820476929",
// "x-forwarded-host": "dev-heimdall.xiaomai5.com",
// "host": "dev-heimdall.xiaomai5.com",
// "content-type": "application/json; charset=UTF-8",
// "x-b3-flags": "0",
// "x-request-id": "0d7ad401ed447ff75c0de254563e76fd",
// "sec-fetch-mode": "cors",
// "x-forwarded-proto": "https",
// "accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
// "usertype": "B",
// "xmversion": "5.0",
// "x-forwarded-for": "60.191.55.162",
// "accept": "application/json, text/plain, */*",
// "token": "9f1609b2e7234afd8922a8676dbbf721",
// "x-real-ip": "60.191.55.162",
// "p": "w",
// "x-b3-traceid": "12a41d862eb3e551",
// "x-b3-spanid": "08dc4d59580c4bee",
// "v": "VERSION",
// "vn": "v5.4.8",
// "x-scheme": "https",
// "bizaccountid": "1305385165390426114",
// "accept-encoding": "gzip, deflate, br",
// "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
// "cid": "940838898156699712",
// "sec-fetch-dest": "empty"
// },
}); });
if (method !== 'GET' && options.requestType === 'form') { if (method !== 'GET' && options.requestType === 'form') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment