import http from './index.js';

// 分页查询商户列表
export const pageMerchant = (params) => http.get('/shop/merchant/page', {params})

// 查询全部商户
export const listMerchant = (params) => http.get('/shop/merchant', {params})

// 获取商户详情
export const getMerchant = (merchantId) => http.get('/shop/merchant/page', {merchantId})

// 添加商户
export const addMerchant = (data) => http.post('/shop/merchant', data)

// 修改商户
export const updateMerchant = (data) => http.put('/shop/merchant/', data)

// 提现申请
export const addWithdraw = (data) => http.post('/shop/merchant/addWithdraw', data)

export default {
	pageMerchant,
	listMerchant,
	getMerchant,
	addMerchant,
	updateMerchant,
	addWithdraw
}
