import { api } from '@/services/api';
import { request } from '@umijs/max';

type Data = {
  templateName: string,
  appPageConfigDTOList: {
    id?: number,
    "pageName": string,
    "pageDesc": string,
    "pagePath": string,
    "readingContent": boolean,
    "sharePicUrl": string,
    "shareTitles": string,
    "enabledComponent": boolean
  }[]
}
/**
 * 新增修改页面模板
 * @param id
 */
export async function configAppPages(data: Data) {
  return request(api + `/bookDistributionPlatform/admin/appPage/configAppPages`, {
    method: 'POST',
    data,
  });
}
/**
 * 页面模板列表
 * @param id
 */
export async function appPageList(params?: any) {
  return request(api + `/bookDistributionPlatform/admin/appPage/appPageList`, {
    method: 'GET'
  });
}
/**
 * 
 * */ 