import request from '@/utils/request'

//新增模板
export function templates(data) {
    return request({
      url: '/templates',
      method: 'post',
      data
    })
  }

//模板列表
  export function templatesList(params) {
    return request({
      url: '/templates',
      method: 'get',
      params
    })
  }
  //查看模板
  export function lookTemplates(params) {
    return request({
      url: '/templates/'+ params.id,
      method: 'get',
    })
  }

  //修改模板
export function modifyTemplates(data) {
    return request({
      url: '/templates/' + data.id,
      method: 'put',
      data
    })
  }
    //删除模板
export function deleteTemplates(data) {
  return request({
    url: '/templates/' + data,
    method: 'delete',

  })
}
//上传图片
export function upLoadImage(data) {
  return request({
    url: '/upload',
    method: 'post',
    data
  })
}
