import request from '@/utils/request'

// 首页模板编辑接口
class IndexTemplateSet {
  /**
   * 首页模块获取
   * https://www.showdoc.com.cn/1003739271891029?page_id=5845296410083888
   *
   * @export
   * @param {*} query
   * @return {*}
   */
  fetchTemp(query) {
    return request({
      url: '/setModule/Index/saveModule',
      method: 'get',
      params: query
    })
  }

  /**
   * 首页模块保存
   * https://www.showdoc.com.cn/1003739271891029?page_id=5845337991068426
   *
   * @export
   * @param {*} query
   * @return {*}
   */
  saveModules(data) {
    return request({
      url: '/setModule/Index/saveModule',
      method: 'post',
      data
    })
  }
}

export default IndexTemplateSet
