index.ts 859 Bytes
import request from '../request'
import { deleteEmptyParam } from '@/utils/tool'

/**
 * @description 公益分类
 * @function eventCategory
 */
export const eventCategory = async ( params: any ) => {
  let res: any = await request({
    method: 'get',
    url: '/craft/craftList',
    params: deleteEmptyParam(params)
  })
  return res
}


/**
 * @description 手工活动列表
 * @function handworkList
 */
 export const handworkList = async ( params: any ) => {
  let res: any = await request({
    method: 'get',
    url: '/handwork/listHandwork',
    params: deleteEmptyParam(params)
  })
  return res
}

/**
 * @description 手工活动编辑
 * @function handworkEdit
 */
 export const handworkEdit = async ( data: any ) => {
  let res: any = await request({
    method: 'post',
    url: '/handwork/insertOrUpdate',
    data: data
  })
  return res
}