Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
044fa59a
Commit
044fa59a
authored
Jun 12, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 接口联调
parent
04f973cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
54 deletions
+17
-54
env.config.js
config/env.config.js
+1
-1
index.jsx
src/pages/StoreManagement/index.jsx
+15
-52
service.js
src/pages/StoreManagement/service.js
+1
-1
No files found.
config/env.config.js
View file @
044fa59a
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
xyqb
'
;
const
environment
=
'
sc
'
;
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
src/pages/StoreManagement/index.jsx
View file @
044fa59a
...
...
@@ -19,52 +19,17 @@ const StoreManagement = () => {
page
:
1
,
size
:
10
,
});
const
optionData
=
[
{
value
:
'
jack
'
,
label
:
'
1
'
,
},
{
value
:
'
lucy
'
,
label
:
'
2
'
,
},
{
value
:
'
tom
'
,
label
:
'
3
'
,
},
];
const
[
searchForm
,
setSearchForm
]
=
useState
({});
const
formRef
=
useRef
(
null
);
const
[
editVisible
,
setEditVisible
]
=
useState
(
false
);
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
repastType
,
setRepastType
]
=
useState
([]);
const
[
repastId
,
setRepastId
]
=
useState
(
null
);
const
[
enterpriseList
,
setEnterpriseList
]
=
useState
(
optionData
);
const
[
enterpriseList
,
setEnterpriseList
]
=
useState
();
const
[
firstEnterprise
,
setFirstEnterprise
]
=
useState
(
''
);
const
[
enterprise
,
setEnterprise
]
=
useState
({});
const
[
dataList
,
setDataList
]
=
useState
([]);
const
[
name
,
setName
]
=
useState
(
''
);
const
data
=
[
{
enterpriseId
:
'
企业id
'
,
id
:
'
1
'
,
shopId
:
'
shopId
'
,
shopName
:
'
店铺名称
'
,
mealType
:
[
1
,
2
],
pickselfName
:
[
'
1
'
,
'
1111
'
],
updatedBy
:
'
修改人名称
'
,
amount
:
'
2023/03/21 14:06:11
'
,
},
{
enterpriseId
:
'
企业id
'
,
id
:
'
2
'
,
shopId
:
'
shopId
'
,
shopName
:
'
店铺名称
'
,
mealType
:
[
1
,
2
],
updatedBy
:
'
修改人名称
'
,
pickselfName
:
[
'
xxx
'
,
'
1111
'
],
},
];
const
shopList
=
async
()
=>
{
const
params
=
{
...
...
@@ -79,21 +44,19 @@ const StoreManagement = () => {
// 企业查询
const
getEnterpriseList
=
async
()
=>
{
// const res = await apiEnterpriseList();
// if (res.businessCode === '0000' && res.data?.records?.length) {
// const list = res.data.records;
// const firstOption = list[0].id;
// const optionData = list.map(item => ({
// value: item.id,
// label: item.name,
// }));
// setFirstEnterprise(firstOption);
// setEnterpriseList(optionData);
// setSearchForm({ enterpriseId: firstOption });
// shopList();
// }
setSearchForm
({
enterpriseId
:
'
jack
'
});
setFirstEnterprise
(
'
jack
'
);
const
res
=
await
apiEnterpriseList
();
if
(
res
.
businessCode
===
'
0000
'
&&
res
.
data
?.
records
?.
length
)
{
const
list
=
res
.
data
.
records
;
const
firstOption
=
list
[
0
].
id
;
const
optionData
=
list
.
map
(
item
=>
({
value
:
item
.
id
,
label
:
item
.
name
,
}));
setFirstEnterprise
(
firstOption
);
setEnterpriseList
(
optionData
);
setSearchForm
({
enterpriseId
:
firstOption
});
shopList
();
}
};
useEffect
(()
=>
{
getEnterpriseList
();
...
...
@@ -242,7 +205,7 @@ const StoreManagement = () => {
</
Card
>
<
Table
columns=
{
columns
(
res
)
}
dataSource=
{
data
}
dataSource=
{
data
List
}
rowKey=
{
r
=>
r
.
appealNo
}
bordered
onChange=
{
handleTableChange
}
...
...
src/pages/StoreManagement/service.js
View file @
044fa59a
...
...
@@ -50,7 +50,7 @@ export const shopAdd = async params => {
// 企业店铺]-修改餐品类型
// http://yapi.quantgroups.com/project/389/interface/api/65309
export
const
apiShopUpdate
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/
v1/channel
s/enterprise/shop/update
'
,
{
const
data
=
await
request
.
post
(
'
/
api/console
s/enterprise/shop/update
'
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
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