@shencom/request
Version:
封装 axios 请求,兼容了 uni-app 的 uni.request 和 uni.uploadFile 的适配器
232 lines (136 loc) • 16.2 kB
Markdown
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.5.1](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.5.0...@shencom/request@1.5.1) (2024-08-06)
### Features
* **@shencom/ai-commit:** 添加 ai-commit 工具包 ([fb72c7b](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/fb72c7bd60940caa44961a457d0d8878358384ee))
* **@shencom/api:** 移除 jsencrypt 小程序的兼容 ([57696ca](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/57696cad6dccc67215bb556eed0dba0a62b96831))
* **@shencom/oss-browser:** 添加 @shencom/oss-browser 包 ([738bdc7](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/738bdc7094597ca3a95ba126e3c8ca22a0bc6fa7))
* **@shencom/oss-core:** 封装 oss 核心代码 ([ee1e1d8](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/ee1e1d8a5bc8efd3bb674fd5c8f8f5e2fd3cf4eb))
* **@shencom/utils-tenant:** 增加判断是否龙华平台scid ([159a03b](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/159a03bce877f78daf3ccf0797ced18c3dfde555))
* **@shencom/utils-tenant:** 增加判断是否智能物联平台scid ([1add4f7](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/1add4f7f1d54c5bc1897ea0c9a01cabd3b0ae3d0))
* **@shencom/utils-tree:** 添加 TreeFilter 方法 ([6ae5db8](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/6ae5db87f9a1171bd7a325c65c6e3d3796d0bc00))
* **@shencom/utils:** 添加 packages 的类型声明文件 ([30b59a9](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/30b59a96731fd5b3bd1d664a0cad15194daa5d7c))
* **shencom/api:** 添加粤政易获取JSSDK配置api ([ee507e0](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/ee507e0d3a45ee36e31f27ad6ffdfadae3a7d0f5))
* **shencom/api:** oauth 授权添加租户参数可默认给新用户绑定指定权限 ([eeed836](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/eeed83658939e6b576d16732756e40cb25a7daca))
* **shencom/oss-upload:** oss 批量下载限制下载并发数 ([5c251d0](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/5c251d0cf16e049211836a435d71966ff50bf422))
* **shencom/typing:** 添加微信jssdk调用未公开接口的方法 invoke, 添加 wx 全局声明 ([1e24b5e](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/1e24b5e4de1b0b8c65d1cc6508c718e0f5791e4b))
### Bug Fixes
* **@shencom/ai-commit:** 调整 prompt ([4bff54d](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/4bff54d0f9387b84126ffcc989969a84279b8a7c))
* **@shencom/ai-commit:** 添加 -v 指令,调整 init config 流程 ([3ff479c](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/3ff479c18518d188b7858a8d5791c6638ab452ea))
* **@shencom/ai-commit:** 修改 prompt, 补充缺少的依赖,添加测试文件 ([4942a9e](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/4942a9e210b0f901af753a1eb29d0be983a6dd21))
* **@shencom/ai-commit:** 修改 template 目录结构,和文件格式 ([aa25074](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/aa25074c143f3bd104d7e9c1608169c03e05a1e0))
* **@shencom/ai-commit:** 修改全局 config 文件验证 ([abb6b81](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/abb6b819b3e34688a6b35696eed07240ba63d765))
* **@shencom/api:** 部分接口兼容平台端 ([7c6d09f](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/7c6d09f180e6cab3a203aef4aec65b204fb97d73))
* **@shencom/api:** 添加 ApiFileStsToken ([c67a070](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/c67a07018bed5f921aa8c0f7e6eb1b949ff89005))
* **@shencom/api:** 添加 package.json 中 exports 模式 ([6120390](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/61203904c9bdcccdfae94e4ceb91ed6c827524fb))
* **@shencom/api:** 添加平台端登录接口 ([489cc44](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/489cc4465aa1f07351c1cf58b5fda7c90d48c1ae))
* **@shencom/api:** 修复 ApiScOAuthSecuser 入参错误 ([af22974](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/af22974a3682de9e922470b4306738411ac3a267))
* **@shencom/oss-upload:** 移除获取 branch 异常信息 ([a08e29e](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/a08e29e29bb68ca46f67eb6b24334443a705f785))
* **@shencom/request:** 兼容支付宝 h5 上传参数 Formdata 格式判断 ([76f0293](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/76f0293d5b33c294109ce34be144056e1d0b1eef))
* **@shencom/utils-date:** 更新 IFormatDate 类型定义 ([6d8fc62](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/6d8fc62ccaa8e1d2559c24fd44294051f2a368e4))
* **@shencom/utils:** 修改 date,resource,userinfo 类型依赖 ([a9ea093](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/a9ea093244d43c20d91c1165d39cb11f5fa2b5fb))
* **shencom/api:** 添加粤政易授权 api ([ecf9f8f](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/ecf9f8f36ab2d0c86343bac4fd1d8f50ca34bd11))
* **shencom/api:** 添加粤政易授权 api ([5b7a675](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/5b7a6759fe5585f49e54854d0f911fa5b26a9cc5))
# [1.5.0](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.6-alpha.0...@shencom/request@1.5.0) (2023-10-23)
**Note:** Version bump only for package @shencom/request
## [1.4.6-alpha.0](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.5...@shencom/request@1.4.6-alpha.0) (2023-10-10)
### Features
- **@shencom/request:** 构建生成类型文件,移除 version 字段 ([06110e7](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/06110e73d2047a738f51d7f65eba557b0130fb5f))
## [1.4.5](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.4...@shencom/request@1.4.5) (2023-08-16)
### Features
- **packages/request:** 导出接口请求配置 ts 类型 ([64f895a](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/64f895a7d02cf682399aa6f41eb633cd09a7332c))
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.4.4](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.3...@shencom/request@1.4.4) (2023-08-15)
### Features
- **@shencom/utils-object:** 添加对象处理工具包 ([394acf6](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/394acf66c2b52236a6872afc6af6a7f9593a7fc0))
- **@shencom/utils-resources:** 添加资源管理工具包 ([2b82c35](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/2b82c350a63f5c579bb0c3cdcf0e75722ba121b8))
- **@shencom/utils-string:** 添加字符串处理工具包 ([a991566](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/a99156682684883dd04862d1adacab1a1ab2b0c4))
- **packages/utils-tree:** 添加 TreeForEach 方法 ([b186ce0](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/b186ce0e9c7d4bb63cd3631f815c0eab4108e88e))
- **packages/utils:** 集成 utils-object、utils-string 工具 ([e416285](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/e4162850198ea3ff1afc29054a1d85fb40dcfa64))
- **shencom/utils:** 添加 utils-tenant 工具包 ([bc111c3](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/bc111c3535ddb3b1e4bdeb5665a264918fd6bc63))
### Bug Fixes
- **packages/oss-upload:** 清除版本号排除当前上传的版本 ([6b69dec](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/6b69dec22ba64f65c80a1a6ac6c7083c8d80ee39))
- **packages/utils:** 引入 @shencom/utils-resource 包 ([b9308b5](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/b9308b5b29c9656badfc6e23137fcf10ce6fb43b))
- **shencom-request:** 修复响应拦截状态码 200 响应数据缺少 data 字段未处理 ([e85b45d](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/e85b45d3bda761ef9a0065ed20411641f56a670e))
## [1.4.3](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.2...@shencom/request@1.4.3) (2023-07-18)
### Bug Fixes
- **packages/request:** 调整类型声明 ([482edeb](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/482edeb02251c0f7785c1bc6f5a868dbca42ccfe))
## [1.4.2](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.2-alpha.0...@shencom/request@1.4.2) (2023-07-09)
**Note:** Version bump only for package @shencom/request
## [1.4.2-alpha.0](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.1...@shencom/request@1.4.2-alpha.0) (2023-07-07)
### Bug Fixes
- **packages/request:** 添加支持自定义接口返回类型 ([14ab783](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/14ab78383df6b8201f0f31ca0ac38cb842bc3ba5))
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.4.1](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.4.0...@shencom/request@1.4.1) (2023-07-04)
### Bug Fixes
- **packages/api:** 修改 ApiFileUpload 返回数据类型定义 ([6cca192](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/6cca192149586451be1b6a82b8d54ef51b249092))
- **packages/request:** 添加 errcode 为空的请求,返回成功数据 ([330e8be](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/330e8be3b1061a0f17758a076970d4b296d491fe))
# [1.4.0](https://gitlab.shencom.cn/web/tools/npm-monorepo/compare/@shencom/request@1.3.0...@shencom/request@1.4.0) (2023-06-27)
### Features
- **packages/request:** 升级 axios 版本 ([6776df0](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/6776df00697e81cd1bf6dc9e4a2a8d40fc38c613))
- **packages/request:** 移除测试 example ([a56c5fa](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/a56c5fa732869d551902560896e2e5fb3f22903d))
- **packages/request:** 重构导出实例的模式 ([867188b](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/867188b2d8547ef709b854be9abde575ccddc1d2))
- **packages/request:** 重构适配器兼容情况,并兼容 uniapp H5 在 oss 直传的情况下拿不到 ETag 的问题 ([c2707fc](https://gitlab.shencom.cn/web/tools/npm-monorepo/commit/c2707fc49c98a61827e806f412736701ff57416b))
# [1.3.0](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.10-alpha.0...@shencom/request@1.3.0) (2023-03-02)
**Note:** Version bump only for package @shencom/request
## [1.2.10-alpha.0](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.9...@shencom/request@1.2.10-alpha.0) (2023-02-11)
### Bug Fixes
- **shencom/request:** 完善上传文件方法多端兼容 ([1ed5012](https://gitlab.shencom.cn/web/tools/shencom-request/commit/1ed501213739f5aaac8b7c6000b2c63f1c740317))
## [1.2.9](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.8...@shencom/request@1.2.9) (2023-01-03)
### Bug Fixes
- **shencom/request:** 修改请求方法名字私有化处理 ([49d368a](https://gitlab.shencom.cn/web/tools/shencom-request/commit/49d368ac686c294fe2c9e934da08e12b0287d622))
## [1.2.8](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.7...@shencom/request@1.2.8) (2022-12-29)
### Bug Fixes
- **shencom/request:** 修复判断是否为上传文件请求错误问题 ([6a90c33](https://gitlab.shencom.cn/web/tools/shencom-request/commit/6a90c33785b7d674e1cbd8cb4cb4c8ca4aebc5d5))
## [1.2.7](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.6...@shencom/request@1.2.7) (2022-12-27)
### Bug Fixes
- **request:** post 请求参数为空时, 默认转为空对象 ([b455e12](https://gitlab.shencom.cn/web/tools/shencom-request/commit/b455e1250ebabc371dcaa67b66686754098427ad))
## [1.2.6](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.5...@shencom/request@1.2.6) (2022-12-09)
### Features
- **shencom/request:** 移除 husky 文件和一些配置文件 ([eedd86a](https://gitlab.shencom.cn/web/tools/shencom-request/commit/eedd86a89c028df2110d0d5fac968845d3d4a50a))
## [1.2.5](https://gitlab.shencom.cn/web/tools/shencom-request/compare/@shencom/request@1.2.5-alpha.0...@shencom/request@1.2.5) (2022-12-07)
**Note:** Version bump only for package @shencom/request
## 1.2.5-alpha.0 (2022-11-30)
**Note:** Version bump only for package @shencom/request
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.2.4](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.2.3...v1.2.4) (2022-10-27)
### Bug Fixes
- 修改导出包入库文件顺序 ([6709651](https://gitlab.shencom.cn/web/tools/shencom-request/commit/670965181959b441a096afacea6123b21970696a))
### [1.2.3](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.2.2...v1.2.3) (2022-10-27)
### Bug Fixes
- 修改导出包入库文件顺序 ([c6979a6](https://gitlab.shencom.cn/web/tools/shencom-request/commit/c6979a6b7316d73f71d0efe8b40d80dc1e224160))
### [1.2.2](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.2.1...v1.2.2) (2022-10-17)
### Bug Fixes
- 修复参数不为 object 且 isFilterEmpty 为 true 时,数据处理存在异常 ([eb47e95](https://gitlab.shencom.cn/web/tools/shencom-request/commit/eb47e95d18ac80e9f8d7307844335fca88235498))
### [1.2.1](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.0.2...v1.2.1) (2022-10-17)
### Features
- 添加一些请求配置项 ([a9446b6](https://gitlab.shencom.cn/web/tools/shencom-request/commit/a9446b6dc3d93ac664cd8c29f1590b16bc903893))
- 修改构建格式,入口链接 ([67f8cf9](https://gitlab.shencom.cn/web/tools/shencom-request/commit/67f8cf9bdcf972ae765b24af04e9a3b8c749e31e))
### Bug Fixes
- 默认添加 upload name 字段 ([945a9f2](https://gitlab.shencom.cn/web/tools/shencom-request/commit/945a9f2272fcc950aba9ee786f73b9db4c86981f))
- 修改 lodash-es 使用方式 ([cef6e59](https://gitlab.shencom.cn/web/tools/shencom-request/commit/cef6e59ef9b5976762dade20d79ccd17e5be7b9e))
- 移除 registry 地址 ([0bf8e78](https://gitlab.shencom.cn/web/tools/shencom-request/commit/0bf8e78021ce67a709a2aa2c8e7075ac1250ba07))
- edit version import path ([2906359](https://gitlab.shencom.cn/web/tools/shencom-request/commit/2906359ce79bf6356b2c871de4dd88b6c6178778))
## [1.2.0](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.1.3...v1.2.0) (2022-10-12)
### Features
- 添加一些请求配置项 ([adc6a79](https://gitlab.shencom.cn/web/tools/shencom-request/commit/adc6a7966088f505ab7bccd547e646d9d1e30989))
### [1.1.3](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.1.2...v1.1.3) (2022-10-11)
### Bug Fixes
- 修改 lodash-es 使用方式 ([740b353](https://gitlab.shencom.cn/web/tools/shencom-request/commit/740b353b8cc131862365fae91916a9dcffd9888f))
### [1.1.2](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.1.1...v1.1.2) (2022-09-23)
### Bug Fixes
- edit version import path ([8ccfe5f](https://gitlab.shencom.cn/web/tools/shencom-request/commit/8ccfe5fb8fd0c74b0faa975c838a225e45c090ed))
### [1.1.1](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.1.0...v1.1.1) (2022-09-23)
### Bug Fixes
- 默认添加 upload name 字段 ([cd17a48](https://gitlab.shencom.cn/web/tools/shencom-request/commit/cd17a488f509baa297a2280d1b5c83841d401681))
## [1.1.0](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.0.1...v1.1.0) (2022-09-23)
### Features
- 修改构建格式,入口链接 ([e9506e4](https://gitlab.shencom.cn/web/tools/shencom-request/commit/e9506e47e4e8369b22af011840ca4b9a5c33ce15))
### [1.0.1](https://gitlab.shencom.cn/web/tools/shencom-request/compare/v1.0.0...v1.0.1) (2022-08-26)
## 1.0.0 (2022-08-26)
### Features
- 修改构建格式 ([b2ec33b](https://gitlab.shencom.cn/web/tools/shencom-request/commit/b2ec33b6f6b02770f379fe09bb5d16db7c3bd224))
- 移除 node_modules ([d89bf6e](https://gitlab.shencom.cn/web/tools/shencom-request/commit/d89bf6e9be8110abc51a8dd7a6ad05bd5f1ae503))