lilishop-ui/manager/src/api/shops.js

84 lines
1.9 KiB
JavaScript
Raw Normal View History

2021-05-13 10:56:04 +08:00
// 统一请求路径前缀在libs/axios.js中修改
import {getRequest, postRequest, putRequest} from '@/libs/axios';
//查询店铺列表
export const getBillPage = (params) => {
return getRequest('/', params)
}
//查询店铺列表
export const getShopListData = (params) => {
2022-01-25 09:22:22 +08:00
return getRequest('/store/store', params)
2021-05-13 10:56:04 +08:00
}
//禁用店铺
export const disableShop = (id) => {
2022-01-25 09:22:22 +08:00
return putRequest(`/store/store/disable/${id}`)
2021-05-13 10:56:04 +08:00
}
//开启店铺
export const enableBrand = (id) => {
2022-01-25 09:22:22 +08:00
return putRequest(`/store/store/enable/${id}`)
2021-05-13 10:56:04 +08:00
}
//查询店铺详细
export const getShopDetailData = (id, params) => {
2022-01-25 09:22:22 +08:00
return getRequest(`/store/store/get/detail/${id}`, params)
2021-05-13 10:56:04 +08:00
}
//增加店铺列表
export const shopAdd = (params) => {
2022-01-25 09:22:22 +08:00
return postRequest(`/store/store/add`, params)
2021-05-13 10:56:04 +08:00
}
//修改店铺列表
export const shopEdit = (id,params) => {
2022-01-25 09:22:22 +08:00
return putRequest(`/store/store/edit/${id}`, params)
2021-05-13 10:56:04 +08:00
}
//审核店铺
export const shopAudit = (id, passed) => {
2022-01-25 09:22:22 +08:00
return putRequest(`/store/store/audit/${id}/${passed}`)
2021-05-13 10:56:04 +08:00
}
//查询店铺详情
export const shopDetail = (id) => {
2022-01-25 09:22:22 +08:00
return getRequest(`/store/store/get/detail/${id}`)
2021-05-13 10:56:04 +08:00
}
// 获取结算单分页
export const getBuyBillPage = (params) => {
return getRequest(`/store/bill/getByPage`,params)
}
// 获取结算单详情
export const getBuyBillDetail = (id) => {
return getRequest(`/store/bill/get/${id}`)
}
// 获取商家结算单流水分页
export const getStoreFlow = (id,params) => {
2022-02-10 18:57:36 +08:00
return getRequest(`/order/bill/${id}/getStoreFlow`,params)
2021-05-13 10:56:04 +08:00
}
// 审核结算单
export const examine = (id) => {
return putRequest(`/store/bill/examine/${id}`)
}
// 审核结算单
export const pay = (id) => {
return putRequest(`/store/bill/pay/${id}`)
}
//获取所有商家
export const getShopList = () => {
2022-01-25 09:22:22 +08:00
return getRequest(`/store/store/all`)
2021-05-13 10:56:04 +08:00
}
//根据id获取店铺信息
export const getShopByMemberId = (id) => {
2022-01-25 09:22:22 +08:00
return getRequest(`/store/store/${id}/member`)
2021-05-13 10:56:04 +08:00
}