import http from '@/api/http';
/**
 * 用户小程序列表
 */
export function channelMiniprogramList(params?: object) {
  return http.get('/channel/miniprogram/list', params);
}
/**
 * 小程序列表
 */
export function manageMiniprogramIndex(params: object) {
  return http.get('/manage/miniprogram/index', params);
}
/**
 * 小程序-公司列表
 */
export function manageMiniprogramCompanylist(params?: object) {
  return http.get('/manage/miniprogram/companylist', params);
}
/**
 * 小程序详情
 */
export function manageMiniprogramShow(id: number | string, params?: object) {
  return http.get(`/manage/miniprogram/show/${id}`, params);
}
/**
 * 小程序类型
 */
export function manageMiniprogramTypelist(params?: object) {
  return http.get('/manage/miniprogram/typelist', params);
}

/**
 * 添加小程序
 */
export function manageMiniprogramStore(params: object) {
  return http.post('/manage/miniprogram/store', params);
}
/**
 * 更新小程序
 */
export function manageMiniprogramUpdate(id: number | string, params: object) {
  return http.post(`/manage/miniprogram/update/${id}`, params);
}
/**
 * 分配小程序
 */
export function manageMiniprogramAllocation(
  id: number | string,
  params: object
) {
  return http.post(`/manage/miniprogram/allocation/${id}`, params);
}

/**
 * 小程序分配详情
 */
export function manageMiniprogramAllocationDetail(
  id: number | string,
  params?: object
) {
  return http.get(`/manage/miniprogram/allocation/${id}`, params);
}
