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
1b045551
Commit
1b045551
authored
Jun 12, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 接口判断
parent
044fa59a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
29 deletions
+32
-29
config.js
config/config.js
+2
-2
env.config.js
config/env.config.js
+6
-0
service.js
src/pages/EmployeeManagement/service.js
+13
-13
service.js
src/pages/StoreManagement/service.js
+11
-14
No files found.
config/config.js
View file @
1b045551
...
...
@@ -287,13 +287,13 @@ export default {
component
:
'
./businessManage/info
'
,
},
{
title
:
'
商户管理后台-
商家资料
'
,
title
:
'
商户管理后台-
企业团餐-企业店铺管理
'
,
path
:
'
/StoreManagement
'
,
name
:
'
StoreManagement
'
,
component
:
'
./StoreManagement
'
,
},
{
title
:
'
商户管理后台-
员工
员工管理
'
,
title
:
'
商户管理后台-
企业团餐-企业
员工管理
'
,
path
:
'
/EmployeeManagement
'
,
name
:
'
EmployeeManagement
'
,
component
:
'
./EmployeeManagement
'
,
...
...
config/env.config.js
View file @
1b045551
const
isProduction
=
process
.
env
.
NODE_ENV
===
'
production
'
;
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
environment
=
'
sc
'
;
// 从tob进入的判断接口前缀
const
apiPrefix
=
sessionStorage
.
getItem
(
'
role
'
)
===
'
platform
'
?
'
/api/consoles
'
:
'
/api/merchants
'
;
const
envAPi
=
{
api
:
`https://security-
${
environment
}
.liangkebang.net`
,
//'https://security-xyqb.liangkebang.net',
kdspOpApi
:
`https://sc-merchant-api-
${
environment
}
.liangkebang.net`
,
...
...
@@ -12,6 +15,7 @@ const envAPi = {
opapiHost
:
`https://gw.yxmie.com`
,
wsApi
:
`wss://push-
${
environment
}
.liangkebang.net`
,
msgApi
:
`https://msgapi-
${
environment
}
.liangkebang.net`
,
apiPrefix
,
};
const
prodApi
=
{
...
...
@@ -29,6 +33,7 @@ const prodApi = {
querysApi
:
'
https://sc-merchant-api.q-gp.com/admin/merchant/sc-settlement
'
,
wsApi
:
'
wss://push.q-gp.com
'
,
msgApi
:
'
https://msgapi.q-gp.com
'
,
apiPrefix
,
};
const
preProdApi
=
{
...
...
@@ -42,6 +47,7 @@ const preProdApi = {
querysApi
:
'
https://sc-settlement-api.q-gp.com
'
,
wsApi
:
'
wss://push.q-gp.com
'
,
msgApi
:
'
https://msgapi.q-gp.com
'
,
apiPrefix
,
};
let
exportApi
=
envAPi
;
...
...
src/pages/EmployeeManagement/service.js
View file @
1b045551
...
...
@@ -3,12 +3,12 @@ import config from '../../../config/env.config';
import
{
stringify
}
from
'
qs
'
;
import
_
from
'
lodash
'
;
const
{
goodsApi
}
=
config
;
const
{
goodsApi
,
apiPrefix
}
=
config
;
// [企业员工]-列表查询
// http://yapi.quantgroups.com/project/389/interface/api/65359
export
const
apiStaffList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/pageList
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/pageList`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -18,7 +18,7 @@ export const apiStaffList = async params => {
// [企业客户]-列表查询
// http://yapi.quantgroups.com/project/389/interface/api/65324
export
const
apiEnterpriseList
=
async
()
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/pageList
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/pageList`
,
{
prefix
:
goodsApi
,
data
:
{
page
:
1
,
...
...
@@ -31,7 +31,7 @@ export const apiEnterpriseList = async () => {
// [企业部门]-列表查询
// http://yapi.quantgroups.com/project/389/interface/api/65344
export
const
apiDepartmentList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/department/pageList
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/department/pageList`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -41,7 +41,7 @@ export const apiDepartmentList = async params => {
// [企业员工]-添加员工
// http://yapi.quantgroups.com/project/389/interface/api/65364
export
const
apiStaffSave
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/save
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/save`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -54,7 +54,7 @@ export const apiStaffExcel = async file => {
const
params
=
new
FormData
();
params
.
append
(
'
file
'
,
file
.
file
);
params
.
append
(
'
enterpriseId
'
,
file
.
enterpriseId
);
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/excel
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/excel`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -64,7 +64,7 @@ export const apiStaffExcel = async file => {
// [企业部门]-新增企业部门
// http://yapi.quantgroups.com/project/389/interface/api/65349
export
const
apiDepartmentSave
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/department/save
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/department/save`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -77,7 +77,7 @@ export const apiDepartmentExcel = async file => {
const
params
=
new
FormData
();
params
.
append
(
'
file
'
,
file
.
file
);
params
.
append
(
'
enterpriseId
'
,
file
.
enterpriseId
);
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/department/excel
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/department/excel`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -87,7 +87,7 @@ export const apiDepartmentExcel = async file => {
// [企业员工]-删除员工
// http://yapi.quantgroups.com/project/389/interface/api/65374
export
const
apiStaffDelete
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/delete
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/delete`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -97,7 +97,7 @@ export const apiStaffDelete = async params => {
// [企业部门]-更新部门
// http://yapi.quantgroups.com/project/389/interface/api/65474
export
const
apiDepartmentUpdate
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/department/update
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/department/update`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -107,7 +107,7 @@ export const apiDepartmentUpdate = async params => {
// [企业员工]-充值明细查询
// http://yapi.quantgroups.com/project/389/interface/api/65489
export
const
apiGenerateLogList
=
async
params
=>
{
const
data
=
await
request
.
get
(
'
/api/consoles/enterprise/staff/generateLog/list
'
,
{
const
data
=
await
request
.
get
(
`
${
apiPrefix
}
/enterprise/staff/generateLog/list`
,
{
prefix
:
goodsApi
,
params
,
});
...
...
@@ -117,7 +117,7 @@ export const apiGenerateLogList = async params => {
// [企业员工]-员工限额
// http://yapi.quantgroups.com/project/389/interface/api/65379
export
const
apiStaffLimit
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/limit
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/limit`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -127,7 +127,7 @@ export const apiStaffLimit = async params => {
// [企业员工]-拉黑员工
// http://yapi.quantgroups.com/project/389/interface/api/65369
export
const
apiStaffBlack
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/staff/black
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/staff/black`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
src/pages/StoreManagement/service.js
View file @
1b045551
...
...
@@ -3,14 +3,11 @@ import config from '../../../config/env.config';
import
{
stringify
}
from
'
qs
'
;
import
_
from
'
lodash
'
;
const
{
goodsApi
}
=
config
;
const
headers
=
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
};
const
{
goodsApi
,
apiPrefix
}
=
config
;
// [企业店铺]-列表查询
// http://yapi.quantgroups.com/project/389/interface/api/65284
export
const
setShopList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/list
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/list`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -20,7 +17,7 @@ export const setShopList = async params => {
// [企业店铺]-删除企业下面的店铺
// http://yapi.quantgroups.com/project/389/interface/api/65319
export
const
setShopDelete
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/delete
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/delete`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -30,7 +27,7 @@ export const setShopDelete = async params => {
// [企业店铺]-查询餐品类型
// http://yapi.quantgroups.com/project/389/interface/api/65314
export
const
mealTypeList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/mealType/list
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/mealType/list`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -40,7 +37,7 @@ export const mealTypeList = async params => {
// [企业店铺]-添加企业店铺
// http://yapi.quantgroups.com/project/389/interface/api/65304
export
const
shopAdd
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/add
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/add`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -50,7 +47,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
(
'
/api/consoles/enterprise/shop/update
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/update`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -60,7 +57,7 @@ export const apiShopUpdate = async params => {
// [企业客户]-列表查询
// http://yapi.quantgroups.com/project/389/interface/api/65324
export
const
apiEnterpriseList
=
async
()
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/update
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/update`
,
{
prefix
:
goodsApi
,
data
:
{
page
:
1
,
...
...
@@ -72,7 +69,7 @@ export const apiEnterpriseList = async () => {
// [企业店铺]-可选择店铺列表
// http://yapi.quantgroups.com/project/389/interface/api/65524
export
const
apiSelectList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/console/enterprise/shop/select/list
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/select/list`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -82,7 +79,7 @@ export const apiSelectList = async params => {
// [企业店铺]-添加企业店铺校验是否是到店类型
// http://yapi.quantgroups.com/project/389/interface/api/65304
export
const
busineesTypeCheck
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/console/enterprise/shop/busineesType/check
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/busineesType/check`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -92,7 +89,7 @@ export const busineesTypeCheck = async params => {
// [企业店铺]-添加企业店铺
// http://yapi.quantgroups.com/project/389/interface/api/65304
export
const
apiShopAdd
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/add
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/add`
,
{
prefix
:
goodsApi
,
data
:
params
,
});
...
...
@@ -102,7 +99,7 @@ export const apiShopAdd = async params => {
// [企业店铺]-企业已选的店铺
// http://yapi.quantgroups.com/project/389/interface/api/65534
export
const
apiSelectedList
=
async
params
=>
{
const
data
=
await
request
.
post
(
'
/api/consoles/enterprise/shop/selected/list
'
,
{
const
data
=
await
request
.
post
(
`
${
apiPrefix
}
/enterprise/shop/selected/list`
,
{
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