Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
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
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
c51c27b4
Commit
c51c27b4
authored
Dec 17, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:去掉axios无用代码
parent
40d67418
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
40 deletions
+1
-40
src/common/js/axios.ts
+1
-40
No files found.
src/common/js/axios.ts
View file @
c51c27b4
...
@@ -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'
)
{
...
...
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