前端项目实战103-postgrest详情接口

 getDetail: (resource: any, params: any) => {
            const data=new URLSearchParams(params)
            const url = `${PostgrestUrl}/rpc/${resource}?${data}`;
            return httpClient(url, {
                headers: new Headers({}),
            }).then(({ json }) => ({
                data: json,
            })).catch((err) => {
                return err
            })
        },

posted @ 2022-10-22 17:02  前端导师歌谣  阅读(23)  评论(0)    收藏  举报