mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-05-23 06:59:18 +08:00
chore: request 添加运行时升级指引
This commit is contained in:
parent
32e221f150
commit
46e42d4344
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fesjs/plugin-request",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"description": "@fesjs/plugin-request",
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
|
@ -49,6 +49,17 @@ function getRequestInstance() {
|
||||
initialValue: {},
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
if (typeof errorHandler === 'object') {
|
||||
console.error('[plugin-request]: errorHandler 更改为函数了,具体请看文档 https://fesjs.mumblefe.cn/reference/plugin/plugins/request.html');
|
||||
}
|
||||
if (otherConfigs.responseDataAdaptor) {
|
||||
console.warn(
|
||||
'[plugin-request]: responseDataAdaptor 在 3.x 已经被移除,请改用 dataHandler 实现,具体请看文档 https://fesjs.mumblefe.cn/reference/plugin/plugins/request.html',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const defaultConfig = Object.assign(
|
||||
{
|
||||
timeout: 10000,
|
||||
|
@ -1,52 +1,52 @@
|
||||
{
|
||||
"name": "@fesjs/template-h5",
|
||||
"version": "2.0.0",
|
||||
"description": "fes 移动端项目模版",
|
||||
"scripts": {
|
||||
"prod": "FES_ENV=prod fes build",
|
||||
"dev": "fes dev"
|
||||
},
|
||||
"keywords": [
|
||||
"管理端",
|
||||
"fes",
|
||||
"fast",
|
||||
"easy",
|
||||
"strong"
|
||||
],
|
||||
"files": [
|
||||
".eslintrc.js",
|
||||
".gitignore",
|
||||
".fes.js",
|
||||
".fes.prod.js",
|
||||
"mock.js",
|
||||
"package.json",
|
||||
"README.md",
|
||||
"tsconfig.json",
|
||||
"/src",
|
||||
"/config"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
|
||||
"directory": "packages/fes-template-h5"
|
||||
},
|
||||
"author": "qlin",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/WeBankFinTech/fes.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ttou/postcss-px-to-viewport": "^2.0.3",
|
||||
"@fesjs/fes": "workspace:*",
|
||||
"@fesjs/plugin-icon": "workspace:*",
|
||||
"@fesjs/plugin-request": "workspace:*",
|
||||
"@fesjs/builder-vite": "workspace:*",
|
||||
"core-js": "^3.29.1",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
"name": "@fesjs/template-h5",
|
||||
"version": "2.0.0",
|
||||
"description": "fes 移动端项目模版",
|
||||
"scripts": {
|
||||
"build": "FES_ENV=prod fes build",
|
||||
"dev": "fes dev"
|
||||
},
|
||||
"keywords": [
|
||||
"管理端",
|
||||
"fes",
|
||||
"fast",
|
||||
"easy",
|
||||
"strong"
|
||||
],
|
||||
"files": [
|
||||
".eslintrc.js",
|
||||
".gitignore",
|
||||
".fes.js",
|
||||
".fes.prod.js",
|
||||
"mock.js",
|
||||
"package.json",
|
||||
"README.md",
|
||||
"tsconfig.json",
|
||||
"/src",
|
||||
"/config"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/WeBankFinTech/fes.js.git",
|
||||
"directory": "packages/fes-template-h5"
|
||||
},
|
||||
"author": "qlin",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/WeBankFinTech/fes.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/WeBankFinTech/fes.js#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ttou/postcss-px-to-viewport": "^2.0.3",
|
||||
"@fesjs/fes": "workspace:*",
|
||||
"@fesjs/plugin-icon": "workspace:*",
|
||||
"@fesjs/plugin-request": "workspace:*",
|
||||
"@fesjs/builder-vite": "workspace:*",
|
||||
"core-js": "^3.29.1",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
"private": true
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ import { defineRuntimeConfig } from '@fesjs/fes';
|
||||
export default defineRuntimeConfig({
|
||||
request: {
|
||||
baseURL: '/ras-mas',
|
||||
responseDataAdaptor() {},
|
||||
dataHandler(data) {
|
||||
console.log('data', data);
|
||||
if (data?.code !== '0') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user