UNPKG

mt-flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

30 lines (29 loc) 904 B
import { MtmBaseService } from "./mtm-base-service"; export class ResViewService extends MtmBaseService { accessToken; constructor(accessToken) { super(accessToken); this.accessToken = accessToken; } // async getResViewByName(name: string) { // return super.httpApiGet(`/resView/name/${name}`) as Promise<ResView> // } /** */ /** * 设计备忘: mtm 后端跟前端的url 是完全对应的,返回本次页面渲染所需的全部json格式的数据。 * @param slug * @returns */ async getPage(host, path) { if (!path.startsWith("/")) { path = `/${path}`; } const params = new URLSearchParams({ host, path }); return super.httpApiGet("/page?" + params.toString()); } async getResViewById(id) { return super.httpApiGet(`/resView/${id}`); } }