From ff3f50a58026c5ccc595fa60d6df159025d647f0 Mon Sep 17 00:00:00 2001 From: zjx0905 <954270063@qq.com> Date: Fri, 7 Apr 2023 22:07:13 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 ++++++++++++++++++++++---- docs/guide/introduction.md | 47 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fe90903..83f0677 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,14 @@ $ npm i axios-miniprogram [原生小程序也可以直接下载源码包](https://github.com/zjx0905/axios-miniprogram/releases) -## 简介 +# 简介 -为小程序平台量身定制的轻量级请求库,请求配置以微信小程序作为标准,其他平台兼容实现。 +## 什么是 axios-miniprogram? + +axios-miniprogram 是一款为小程序平台量身定制的轻量级请求库,支持跨平台使用,同时也支持多种导入方式,可用于原生小程序项目,也可用于第三方框架项目,用法上同 [axios](git@github.com:axios/axios.git) 类似。 + +## 特性 -- 支持 微信小程序、支付宝小程序、百度小程序、字节跳动小程序、QQ 小程序、钉钉小程序、京东小程序、uniapp。 - 支持 `Typescript`,健全的类型系统,智能的 `IDE` 提示。 - 支持 `Promise`。 - 支持 拦截器。 @@ -33,5 +36,26 @@ $ npm i axios-miniprogram - 支持 自定义转换数据。 - 支持 自定义错误处理。 - 支持 自定义平台适配器 +- 支持 上传/下载 -[有问题欢迎反馈](https://github.com/zjx0905/axios-miniprogram/issues) +## 目前支持的平台 + +- [微信小程序](https://developers.weixin.qq.com/miniprogram/dev/framework/?from=axios-miniprogram) +- [支付宝小程序](https://opendocs.alipay.com/mini/developer/getting-started?from=axios-miniprogram) +- [百度小程序](https://smartprogram.baidu.com/developer/index.html?from=axios-miniprogram) +- [京东小程序](https://mp.jd.com?from=axios-miniprogram) +- [字节跳动小程序](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/introduction/overview?from=axios-miniprogram) +- [QQ 小程序](https://q.qq.com/wiki/develop/miniprogram/frame/?from=axios-miniprogram) +- [钉钉小程序](https://open.dingtalk.com/document/org/develop-org-mini-programs?from=axios-miniprogram) +- [飞书小程序](https://open.feishu.cn/document/uYjL24iN/uMjNzUjLzYzM14yM2MTN?from=axios-miniprogram) +- [uni-app](https://uniapp.dcloud.net.cn?form=axios-miniprogram) + +## 关于在跨端框架中使用时的支持度 + +问:在 uni-app 或者 Taro 等等这类跨端框架中使用时,该请求库支持 h5,APP,vue3,react 等等吗? + +答:该请求库只是对框架提供的请求 API 进行了封装,并没有使用什么黑魔法。理论上来讲,框架支持的平台,该库也必然支持。 + +有问题欢迎反馈,请尽量把问题提到 [github issues](https://github.com/zjx0905/axios-miniprogram/issues) 中,这样更容易被我注意到。 + +[提问点这里](https://github.com/zjx0905/axios-miniprogram/issues) diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md index 9affc00..6c12374 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/introduction.md @@ -6,15 +6,35 @@ sitemap: priority: 0.8 --- +# axios-miniprogram + +[![npm version](https://badge.fury.io/js/axios-miniprogram.svg)](https://badge.fury.io/js/axios-miniprogram) +[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) + +[中文文档](https://axios-miniprogram.com) + +## 安装 + +```bash +$ yarn add axios-miniprogram +``` + +或者 + +```bash +$ npm i axios-miniprogram +``` + +[原生小程序也可以直接下载源码包](https://github.com/zjx0905/axios-miniprogram/releases) + # 简介 -## 什么是 axios-miniprogram +## 什么是 axios-miniprogram? axios-miniprogram 是一款为小程序平台量身定制的轻量级请求库,支持跨平台使用,同时也支持多种导入方式,可用于原生小程序项目,也可用于第三方框架项目,用法上同 [axios](git@github.com:axios/axios.git) 类似。 ## 特性 -- 支持 微信小程序、支付宝小程序、百度小程序、字节跳动小程序、QQ 小程序、uniapp。 - 支持 `Typescript`,健全的类型系统,智能的 `IDE` 提示。 - 支持 `Promise`。 - 支持 拦截器。 @@ -24,3 +44,26 @@ axios-miniprogram 是一款为小程序平台量身定制的轻量级请求库 - 支持 自定义转换数据。 - 支持 自定义错误处理。 - 支持 自定义平台适配器 +- 支持 上传/下载 + +## 目前支持的平台 + +- [微信小程序](https://developers.weixin.qq.com/miniprogram/dev/framework/?from=axios-miniprogram) +- [支付宝小程序](https://opendocs.alipay.com/mini/developer/getting-started?from=axios-miniprogram) +- [百度小程序](https://smartprogram.baidu.com/developer/index.html?from=axios-miniprogram) +- [京东小程序](https://mp.jd.com?from=axios-miniprogram) +- [字节跳动小程序](https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/introduction/overview?from=axios-miniprogram) +- [QQ 小程序](https://q.qq.com/wiki/develop/miniprogram/frame/?from=axios-miniprogram) +- [钉钉小程序](https://open.dingtalk.com/document/org/develop-org-mini-programs?from=axios-miniprogram) +- [飞书小程序](https://open.feishu.cn/document/uYjL24iN/uMjNzUjLzYzM14yM2MTN?from=axios-miniprogram) +- [uni-app](https://uniapp.dcloud.net.cn?form=axios-miniprogram) + +## 关于在跨端框架中使用时的支持度 + +问:在 uni-app 或者 Taro 等等这类跨端框架中使用时,该请求库支持 h5,APP,vue3,react 等等吗? + +答:该请求库只是对框架提供的请求 API 进行了封装,并没有使用什么黑魔法。理论上来讲,框架支持的平台,该库也必然支持。 + +有问题欢迎反馈,请尽量把问题提到 [github issues](https://github.com/zjx0905/axios-miniprogram/issues) 中,这样更容易被我注意到。 + +[提问点这里](https://github.com/zjx0905/axios-miniprogram/issues)