Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-boss
Commits
e7e35514
Commit
e7e35514
authored
Oct 31, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改正式环境配置
parent
5849cd5f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
fetch.js
miniprogram/api/fetch.js
+6
-6
fetch.ts
miniprogram/api/fetch.ts
+5
-5
No files found.
miniprogram/api/fetch.js
View file @
e7e35514
This diff is collapsed.
Click to expand it.
miniprogram/api/fetch.ts
View file @
e7e35514
import
{
devUrl
,
successCode
,
logoutode
}
from
'../config/constants'
;
import
{
successCode
,
logoutode
,
masterUrl
}
from
'../config/constants'
;
import
{
IMyApp
}
from
'../app'
;
import
{
IMyApp
}
from
'../app'
;
const
app
=
getApp
<
IMyApp
>
();
const
app
=
getApp
<
IMyApp
>
();
...
@@ -43,11 +43,11 @@ const fetch = (req: wx.RequestOption) =>
...
@@ -43,11 +43,11 @@ const fetch = (req: wx.RequestOption) =>
});
});
export
const
systemFetch
=
(
req
:
wx
.
RequestOption
)
=>
export
const
systemFetch
=
(
req
:
wx
.
RequestOption
)
=>
fetch
({
...
req
,
url
:
dev
Url
.
SYSTEM_SERVER_URL
+
req
.
url
});
fetch
({
...
req
,
url
:
master
Url
.
SYSTEM_SERVER_URL
+
req
.
url
});
export
const
statisticsFetch
=
(
req
:
wx
.
RequestOption
)
=>
export
const
statisticsFetch
=
(
req
:
wx
.
RequestOption
)
=>
fetch
({
...
req
,
url
:
dev
Url
.
STATISTICS_SERVER_URL
+
req
.
url
});
fetch
({
...
req
,
url
:
master
Url
.
STATISTICS_SERVER_URL
+
req
.
url
});
export
const
customerFetch
=
(
req
:
wx
.
RequestOption
)
=>
export
const
customerFetch
=
(
req
:
wx
.
RequestOption
)
=>
fetch
({
...
req
,
url
:
dev
Url
.
CUSTOMER_SERVER_URL
+
req
.
url
});
fetch
({
...
req
,
url
:
master
Url
.
CUSTOMER_SERVER_URL
+
req
.
url
});
export
const
baseFetch
=
(
req
:
wx
.
RequestOption
)
=>
export
const
baseFetch
=
(
req
:
wx
.
RequestOption
)
=>
fetch
({
...
req
,
url
:
dev
Url
.
BASE_SERVER_URL
+
req
.
url
});
fetch
({
...
req
,
url
:
master
Url
.
BASE_SERVER_URL
+
req
.
url
});
export
default
fetch
;
export
default
fetch
;
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