From 699997786ba455af9e566a6d0bf906b17099b5b5 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 29 Jul 2025 23:43:52 +0800 Subject: [PATCH] . --- php_pc/nuxt.config.ts | 12 +++++------ php_pc/package.json | 2 +- php_pc/src/utils/http/index.ts | 8 +++---- php_pc/src/utils/http/request.ts | 36 ++++++++++++++++---------------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/php_pc/nuxt.config.ts b/php_pc/nuxt.config.ts index d30b843..7c6d502 100644 --- a/php_pc/nuxt.config.ts +++ b/php_pc/nuxt.config.ts @@ -78,12 +78,12 @@ export default defineNuxtConfig({ devServer: { host: '0.0.0.0' }, - appConfig: { - pageIgnorePatterns: [ - '**/_*/**', - '**/_*.*' - ] - }, + // appConfig: { + // pageIgnorePatterns: [ + // '**/_*/**', + // '**/_*.*' + // ] + // }, // ignore: [ // 'src/pages/**/_*/**', // 'src/pages/**/_*.*' diff --git a/php_pc/package.json b/php_pc/package.json index c626480..2778766 100644 --- a/php_pc/package.json +++ b/php_pc/package.json @@ -21,7 +21,7 @@ "@vue/eslint-config-typescript": "^11.0.2", "eslint": "^8.25.0", "eslint-plugin-nuxt": "^4.0.0", - "nuxt": "3.18.0", + "nuxt": "3.6.5", "prettier": "^2.7.1", "sass-loader": "^16.0.5", "swiper": "^11.0.3", diff --git a/php_pc/src/utils/http/index.ts b/php_pc/src/utils/http/index.ts index 05d9c28..640cf0d 100644 --- a/php_pc/src/utils/http/index.ts +++ b/php_pc/src/utils/http/index.ts @@ -1,7 +1,7 @@ -// import { FetchOptions, $fetch } from "ofetch"; -import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入 -import type { FetchOptions } from "ofetch"; // ✅ 类型也正确 -const $fetch = ofetch; +import { FetchOptions, $fetch } from "ofetch"; +// import { ofetch } from "ofetch"; // ✅ 正确,没有 default,只能这样导入 +// import type { FetchOptions } from "ofetch"; // ✅ 类型也正确 +// const $fetch = ofetch; import { RequestCodeEnum, RequestMethodsEnum } from "@/enums/requestEnums"; import feedback from "@/utils/feedback"; import { merge } from "lodash-es"; diff --git a/php_pc/src/utils/http/request.ts b/php_pc/src/utils/http/request.ts index 9353a7d..8d8a026 100644 --- a/php_pc/src/utils/http/request.ts +++ b/php_pc/src/utils/http/request.ts @@ -2,26 +2,26 @@ * HTTP请求封装模块 * 基于ofetch库实现的HTTP请求封装,支持拦截器、取消请求、上传文件和事件流等功能 */ -// import { -// FetchOptions, -// $fetch, -// $Fetch, -// FetchResponse, -// RequestOptions, -// FileParams, -// RequestEventStreamOptions, -// } from "ofetch"; - -import { ofetch } from "ofetch"; // ✅ 没有 default export -import type { - FetchOptions, - FetchResponse, - RequestOptions, - FileParams, - RequestEventStreamOptions, +import { + FetchOptions, + $fetch, + $Fetch, + FetchResponse, + RequestOptions, + FileParams, + RequestEventStreamOptions, } 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 { isFunction } from "../validate";