Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
陈智峰
jinfa-platform
Commits
29ae6e89
Commit
29ae6e89
authored
Aug 10, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改店铺信息查询商城的请求接口
parent
8a3968c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
index.tsx
src/pages/shop/shopInfo/index.tsx
+9
-5
index.ts
src/store/site/index.ts
+1
-1
request.ts
src/utils/request.ts
+1
-1
No files found.
src/pages/shop/shopInfo/index.tsx
View file @
29ae6e89
...
...
@@ -16,12 +16,13 @@ import { isEmpty } from '@formily/antd/esm/shared'
interface
ShopInfoPropsType
{
SiteStore
:
{
siteUrl
:
string
siteUrl
:
string
;
siteId
:
number
;
}
}
const
ShopInfo
:
React
.
FC
<
ShopInfoPropsType
>
=
(
props
)
=>
{
const
{
siteUrl
}
=
props
.
SiteStore
const
{
siteUrl
,
siteId
}
=
props
.
SiteStore
const
[
formIsHalfFilledOut
,
setFormIsHalfFilledOut
]
=
useState
(
false
)
const
[
form
]
=
Form
.
useForm
()
const
[
allMallList
,
setAllMallList
]
=
useState
([])
...
...
@@ -36,10 +37,13 @@ const ShopInfo: React.FC<ShopInfoPropsType> = (props) => {
fetchAllShop
()
},
[])
// 根据站点获取商城信息
const
fetchAllShop
=
()
=>
{
PublicApi
.
getManageShopAll
().
then
(
res
=>
{
setAllMallList
(
res
.
data
)
//@ts-ignore
PublicApi
.
getManageShopFindShopsBySiteId
({
siteId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setAllMallList
(
res
.
data
)
}
})
}
...
...
src/store/site/index.ts
View file @
29ae6e89
...
...
@@ -2,7 +2,7 @@ import { action, computed, observable, runInAction } from 'mobx'
import
{
ISiteModule
}
from
'@/module/siteModule'
;
class
SiteStore
implements
ISiteModule
{
@
observable
public
siteId
:
number
=
255
;
// 站点id
@
observable
public
siteId
:
number
=
352
;
// 站点id
@
observable
public
siteUrl
:
string
=
'https://127.0.0.1:4379'
;
// 站点域名
}
...
...
src/utils/request.ts
View file @
29ae6e89
...
...
@@ -62,7 +62,7 @@ const baseRequest = extend({
timeout
:
30
*
1000
,
headers
:
defaultHeaders
,
credentials
:
'include'
,
// 默认请求是否带上cookie
errorHandler
//
errorHandler
});
// 请求拦截器
...
...
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