# uniRequest **Repository Path**: my-projects1/uniRequest ## Basic Information - **Project Name**: uniRequest - **Description**: uni 请求封装 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-30 - **Last Updated**: 2024-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # uni-request-app > 基于Promise封装uni-app的request方法 ## asycn await ``` const uniRequest = async (url,param,method) =>{ const [err, data] = await awaitWrap(http(url,param,method)) const obj = {err,data} return obj } 返回的是个promise对象 用法: if (!data.err) return; // 错误判断 this.info = data.data ``` ## 致谢 && 参考 * [axios](https://github.com/axios/axios) ## License MIT