This commit is contained in:
parent
4c3df301a0
commit
699997786b
|
|
@ -78,12 +78,12 @@ export default defineNuxtConfig({
|
||||||
devServer: {
|
devServer: {
|
||||||
host: '0.0.0.0'
|
host: '0.0.0.0'
|
||||||
},
|
},
|
||||||
appConfig: {
|
// appConfig: {
|
||||||
pageIgnorePatterns: [
|
// pageIgnorePatterns: [
|
||||||
'**/_*/**',
|
// '**/_*/**',
|
||||||
'**/_*.*'
|
// '**/_*.*'
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
// ignore: [
|
// ignore: [
|
||||||
// 'src/pages/**/_*/**',
|
// 'src/pages/**/_*/**',
|
||||||
// 'src/pages/**/_*.*'
|
// 'src/pages/**/_*.*'
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
"@vue/eslint-config-typescript": "^11.0.2",
|
"@vue/eslint-config-typescript": "^11.0.2",
|
||||||
"eslint": "^8.25.0",
|
"eslint": "^8.25.0",
|
||||||
"eslint-plugin-nuxt": "^4.0.0",
|
"eslint-plugin-nuxt": "^4.0.0",
|
||||||
"nuxt": "3.18.0",
|
"nuxt": "3.6.5",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"sass-loader": "^16.0.5",
|
"sass-loader": "^16.0.5",
|
||||||
"swiper": "^11.0.3",
|
"swiper": "^11.0.3",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// import { FetchOptions, $fetch } from "ofetch";
|
import { FetchOptions, $fetch } from "ofetch";
|
||||||
import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入
|
// import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入
|
||||||
import type { FetchOptions } from "ofetch"; // ✅ 类型也正确
|
// import type { FetchOptions } from "ofetch"; // ✅ 类型也正确
|
||||||
const $fetch = ofetch;
|
// const $fetch = ofetch;
|
||||||
import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums";
|
import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums";
|
||||||
import feedback from "@/utils/feedback";
|
import feedback from "@/utils/feedback";
|
||||||
import { merge } from "lodash-es";
|
import { merge } from "lodash-es";
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,26 @@
|
||||||
* HTTP请求封装模块
|
* HTTP请求封装模块
|
||||||
* 基于ofetch库实现的HTTP请求封装,支持拦截器、取消请求、上传文件和事件流等功能
|
* 基于ofetch库实现的HTTP请求封装,支持拦截器、取消请求、上传文件和事件流等功能
|
||||||
*/
|
*/
|
||||||
// import {
|
import {
|
||||||
// FetchOptions,
|
|
||||||
// $fetch,
|
|
||||||
// $Fetch,
|
|
||||||
// FetchResponse,
|
|
||||||
// RequestOptions,
|
|
||||||
// FileParams,
|
|
||||||
// RequestEventStreamOptions,
|
|
||||||
// } from "ofetch";
|
|
||||||
|
|
||||||
import { ofetch } from "ofetch"; // ✅ 没有 default export
|
|
||||||
import type {
|
|
||||||
FetchOptions,
|
FetchOptions,
|
||||||
|
$fetch,
|
||||||
|
$Fetch,
|
||||||
FetchResponse,
|
FetchResponse,
|
||||||
RequestOptions,
|
RequestOptions,
|
||||||
FileParams,
|
FileParams,
|
||||||
RequestEventStreamOptions,
|
RequestEventStreamOptions,
|
||||||
} from "ofetch";
|
} from "ofetch";
|
||||||
|
|
||||||
const $fetch = ofetch; // ✅ 手动绑定
|
// import { ofetch } from "ofetch"; // ✅ 没有 default export
|
||||||
|
// import type {
|
||||||
|
// FetchOptions,
|
||||||
|
// FetchResponse,
|
||||||
|
// RequestOptions,
|
||||||
|
// FileParams,
|
||||||
|
// RequestEventStreamOptions,
|
||||||
|
// } from "ofetch";
|
||||||
|
|
||||||
|
// const $fetch = ofetch; // ✅ 手动绑定
|
||||||
|
|
||||||
import { merge } from "lodash-es";
|
import { merge } from "lodash-es";
|
||||||
import { isFunction } from "../validate";
|
import { isFunction } from "../validate";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue