init
This commit is contained in:
5
.env.development
Normal file
5
.env.development
Normal file
@@ -0,0 +1,5 @@
|
||||
# API 基础路径
|
||||
VITE_API_BASE_URL=http://localhost:48080/app-api
|
||||
|
||||
# 开发环境配置
|
||||
NODE_ENV=development
|
||||
5
.env.production
Normal file
5
.env.production
Normal file
@@ -0,0 +1,5 @@
|
||||
# API 基础路径
|
||||
VITE_API_BASE_URL=https://api.your-production-domain.com/api
|
||||
|
||||
# 生产环境配置
|
||||
NODE_ENV=production
|
||||
297
package-lock.json
generated
297
package-lock.json
generated
@@ -9,6 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
"axios": "^1.8.4",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-router-dom": "^7.5.0"
|
||||
@@ -18,6 +19,7 @@
|
||||
"@rsbuild/core": "^1.3.1",
|
||||
"@rsbuild/plugin-react": "^1.1.1",
|
||||
"@tailwindcss/postcss": "^4.1.4",
|
||||
"@types/node": "^22.14.1",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.1",
|
||||
"tailwindcss": "^4.1.4",
|
||||
@@ -781,6 +783,16 @@
|
||||
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.14.1",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.14.1.tgz",
|
||||
"integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "19.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/@types/react/-/react-19.1.2.tgz",
|
||||
@@ -801,6 +813,36 @@
|
||||
"@types/react": "^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.8.4",
|
||||
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.8.4.tgz",
|
||||
"integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001713",
|
||||
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz",
|
||||
@@ -822,6 +864,18 @@
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/cookie": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/cookie/-/cookie-1.0.2.tgz",
|
||||
@@ -850,6 +904,15 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.3.tgz",
|
||||
@@ -860,6 +923,20 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.18.1",
|
||||
"resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
|
||||
@@ -884,6 +961,144 @@
|
||||
"stackframe": "^1.3.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-set-tostringtag": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
||||
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.6",
|
||||
"has-tostringtag": "^1.0.2",
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.9",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.9.tgz",
|
||||
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz",
|
||||
"integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"es-set-tostringtag": "^2.1.0",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"math-intrinsics": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.11",
|
||||
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||
@@ -891,6 +1106,45 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-tostringtag": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/html-entities": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/html-entities/-/html-entities-2.6.0.tgz",
|
||||
@@ -1157,6 +1411,36 @@
|
||||
"url": "https://opencollective.com/parcel"
|
||||
}
|
||||
},
|
||||
"node_modules/math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.11",
|
||||
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz",
|
||||
@@ -1212,6 +1496,12 @@
|
||||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "19.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/react/-/react-19.1.0.tgz",
|
||||
@@ -1355,6 +1645,13 @@
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
"axios": "^1.8.4",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-router-dom": "^7.5.0"
|
||||
@@ -19,6 +20,7 @@
|
||||
"@rsbuild/core": "^1.3.1",
|
||||
"@rsbuild/plugin-react": "^1.1.1",
|
||||
"@tailwindcss/postcss": "^4.1.4",
|
||||
"@types/node": "^22.14.1",
|
||||
"@types/react": "^19.1.0",
|
||||
"@types/react-dom": "^19.1.1",
|
||||
"tailwindcss": "^4.1.4",
|
||||
|
||||
@@ -3,4 +3,9 @@ import { pluginReact } from '@rsbuild/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [pluginReact()],
|
||||
source: {
|
||||
define: {
|
||||
'process.env.VITE_API_BASE_URL': JSON.stringify(process.env.VITE_API_BASE_URL),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
// 查询参数接口
|
||||
export interface GvgTeamQueryParams {
|
||||
defenseHeroes?: string[]
|
||||
attackHeroes?: string[]
|
||||
equipmentInfo?: string
|
||||
artifacts?: string
|
||||
battleStrategy?: string
|
||||
pageNum?: number
|
||||
pageSize?: number
|
||||
}
|
||||
|
||||
// 阵容数据接口
|
||||
export interface GvgTeam {
|
||||
id: number
|
||||
defenseHeroes: string[]
|
||||
attackHeroes: string[]
|
||||
equipmentInfo: string
|
||||
artifacts: string
|
||||
battleStrategy: string
|
||||
prerequisites: string
|
||||
importantNotes: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
// 分页响应接口
|
||||
export interface PageResult<T> {
|
||||
total: number
|
||||
list: T[]
|
||||
}
|
||||
|
||||
// 查询 GVG 阵容列表
|
||||
export const getGvgTeamList = (params: GvgTeamQueryParams) => {
|
||||
return request.get<PageResult<GvgTeam>>('/api/gvg/team/list', { params })
|
||||
}
|
||||
|
||||
// 获取 GVG 阵容详情
|
||||
export const getGvgTeamDetail = (id: number) => {
|
||||
return request.get<GvgTeam>(`/api/gvg/team/${id}`)
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { request } from '@/utils/request'
|
||||
|
||||
export interface GvgTeam {
|
||||
id: number
|
||||
defenseHeroes: string[]
|
||||
attackHeroes: string[]
|
||||
equipmentInfo: string
|
||||
artifacts: string
|
||||
battleStrategy: string
|
||||
prerequisites: string
|
||||
importantNotes: string
|
||||
createTime: string
|
||||
}
|
||||
|
||||
export interface GvgTeamQueryParams {
|
||||
pageNum?: number
|
||||
pageSize?: number
|
||||
defenseHeroes?: string
|
||||
attackHeroes?: string
|
||||
equipmentInfo?: string
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
total: number
|
||||
list: T[]
|
||||
}
|
||||
|
||||
// Get GVG team list
|
||||
export const getGvgTeamList = (params: GvgTeamQueryParams) => {
|
||||
return request.get<PageResult<GvgTeam>>('/epic/hero/team/list', { params })
|
||||
}
|
||||
60
src/api/index.ts
Normal file
60
src/api/index.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import { Api } from "../utils/axios/config";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
|
||||
// 查询参数接口
|
||||
export interface GvgTeamQueryParams {
|
||||
defenseHeroes?: string[];
|
||||
attackHeroes?: string[];
|
||||
equipmentInfo?: string;
|
||||
artifacts?: string[];
|
||||
battleStrategy?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
// 英雄信息接口
|
||||
export interface HeroInfo {
|
||||
heroCode: string;
|
||||
headImgUrl: string;
|
||||
}
|
||||
|
||||
// 阵容数据接口
|
||||
export interface GvgTeam {
|
||||
id: number;
|
||||
defenseHeroes: string[];
|
||||
defenseHeroInfos: HeroInfo[];
|
||||
attackHeroes: string[];
|
||||
attackHeroInfos: HeroInfo[];
|
||||
equipmentInfo: string;
|
||||
artifacts: string;
|
||||
battleStrategy: string;
|
||||
prerequisites: string;
|
||||
importantNotes: string;
|
||||
}
|
||||
|
||||
// 分页响应接口
|
||||
export interface PageResult<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
export interface Response<T> {
|
||||
code: number;
|
||||
data: T;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
// 查询 GVG 阵容列表
|
||||
export const getGvgTeamList = async () => {
|
||||
const response = await Api.get<GvgTeam[]>("/epic/hero/team-list");
|
||||
return response;
|
||||
};
|
||||
|
||||
// 获取 GVG 阵容详情
|
||||
export const getGvgTeamDetail = async (id: number) => {
|
||||
const response = await Api.get<Response<GvgTeam>>(`/api/gvg/team/${id}`);
|
||||
if (response.code === 0) {
|
||||
return response.data;
|
||||
}
|
||||
throw new Error(response.msg || "获取阵容详情失败");
|
||||
};
|
||||
@@ -1,74 +1,32 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { getGvgTeamList, GvgTeam, GvgTeamQueryParams } from '../api/gvg';
|
||||
import * as EpicApi from '@/api/index';
|
||||
|
||||
const Lineup: React.FC = () => {
|
||||
const [selectedDifficulty, setSelectedDifficulty] = useState<string>("All");
|
||||
const [selectedTags, setSelectedTags] = useState<string[]>([]);
|
||||
const [searchTerm, setSearchTerm] = useState<string>("");
|
||||
const [lineups, setLineups] = useState<GvgTeam[]>([]);
|
||||
const [lineups, setLineups] = useState<EpicApi.GvgTeam[]>([]);
|
||||
const [loading, setLoading] = useState<boolean>(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [pageNum, setPageNum] = useState<number>(1);
|
||||
const [pageSize, setPageSize] = useState<number>(10);
|
||||
const [total, setTotal] = useState<number>(0);
|
||||
const navigate = useNavigate();
|
||||
|
||||
// Fetch data from API
|
||||
useEffect(() => {
|
||||
const fetchLineups = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const params: GvgTeamQueryParams = {
|
||||
pageNum,
|
||||
pageSize,
|
||||
// Add other filters as needed
|
||||
};
|
||||
|
||||
const response = await getGvgTeamList(params);
|
||||
setLineups(response.list);
|
||||
setTotal(response.total);
|
||||
const data = await EpicApi.getGvgTeamList();
|
||||
setLineups(data);
|
||||
setError(null);
|
||||
} catch (err) {
|
||||
console.error('Failed to fetch lineups:', err);
|
||||
setError('获取阵容数据失败,请稍后再试');
|
||||
// Use mock data as fallback
|
||||
setLineups(mockLineups);
|
||||
setError(err instanceof Error ? err.message : '获取阵容数据失败,请稍后再试');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
fetchLineups();
|
||||
}, [pageNum, pageSize]);
|
||||
|
||||
// Mock data for fallback
|
||||
const mockLineups: GvgTeam[] = [
|
||||
{
|
||||
id: 1,
|
||||
defenseHeroes: ["暗影刺客", "元素法师", "圣骑士", "治疗师"],
|
||||
attackHeroes: ["暗影刺客", "元素法师", "圣骑士", "治疗师"],
|
||||
equipmentInfo: "攻击套 + 暴击套",
|
||||
artifacts: "攻击力 + 暴击率",
|
||||
battleStrategy: "以高爆发伤害为主的阵容,适合快速结束战斗",
|
||||
prerequisites: "需要高星级角色和优质装备",
|
||||
importantNotes: "注意控制技能释放时机",
|
||||
createTime: "2023-01-01",
|
||||
updateTime: "2023-01-01"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
defenseHeroes: ["龙骑士", "冰霜法师", "守护者", "圣光牧师"],
|
||||
attackHeroes: ["龙骑士", "冰霜法师", "守护者", "圣光牧师"],
|
||||
equipmentInfo: "生命套 + 防御套",
|
||||
artifacts: "生命值 + 防御力",
|
||||
battleStrategy: "以持续输出和防御为主的阵容,适合持久战",
|
||||
prerequisites: "需要高生命值和防御力的角色",
|
||||
importantNotes: "注意保持治疗技能的持续释放",
|
||||
createTime: "2023-01-02",
|
||||
updateTime: "2023-01-02"
|
||||
}
|
||||
];
|
||||
}, []);
|
||||
|
||||
const difficulties = ["简单", "中等", "困难"];
|
||||
const availableTags = ["PVP", "PVE", "爆发", "控制", "持续", "防守", "快速"];
|
||||
@@ -76,35 +34,22 @@ const Lineup: React.FC = () => {
|
||||
const filteredLineups = lineups.filter(lineup => {
|
||||
const matchesSearch =
|
||||
lineup.battleStrategy.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
||||
lineup.defenseHeroes.some((hero: string) => hero.toLowerCase().includes(searchTerm.toLowerCase())) ||
|
||||
lineup.attackHeroes.some((hero: string) => hero.toLowerCase().includes(searchTerm.toLowerCase()));
|
||||
lineup.defenseHeroes.some(hero => hero.toLowerCase().includes(searchTerm.toLowerCase())) ||
|
||||
lineup.attackHeroes.some(hero => hero.toLowerCase().includes(searchTerm.toLowerCase()));
|
||||
|
||||
// Since we don't have difficulty in the API data, we'll use a simple filter
|
||||
// 根据阵容的难度进行筛选
|
||||
const matchesDifficulty = selectedDifficulty === "All" ||
|
||||
(selectedDifficulty === "简单" && lineup.id % 3 === 1) ||
|
||||
(selectedDifficulty === "中等" && lineup.id % 3 === 2) ||
|
||||
(selectedDifficulty === "困难" && lineup.id % 3 === 0);
|
||||
|
||||
// Since we don't have tags in the API data, we'll use a simple filter
|
||||
// 根据标签进行筛选
|
||||
const matchesTags = selectedTags.length === 0 ||
|
||||
selectedTags.some(tag => lineup.battleStrategy.toLowerCase().includes(tag.toLowerCase()));
|
||||
|
||||
return matchesSearch && matchesDifficulty && matchesTags;
|
||||
});
|
||||
|
||||
const handleLineupClick = (id: number) => {
|
||||
navigate(`/lineup/${id}`);
|
||||
};
|
||||
|
||||
const handlePageChange = (newPage: number) => {
|
||||
setPageNum(newPage);
|
||||
};
|
||||
|
||||
const handlePageSizeChange = (newSize: number) => {
|
||||
setPageSize(newSize);
|
||||
setPageNum(1); // Reset to first page when changing page size
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-[#1A1412] text-white font-sans relative">
|
||||
{/* 背景装饰 */}
|
||||
@@ -198,54 +143,44 @@ const Lineup: React.FC = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 阵容列表 - 列表格式 */}
|
||||
{/* 阵容列表 */}
|
||||
{!loading && (
|
||||
<div className="space-y-4">
|
||||
{filteredLineups.map((lineup) => (
|
||||
<div
|
||||
key={lineup.id}
|
||||
className="bg-gradient-to-br from-[#2A211E] to-[#1A1412] rounded-lg overflow-hidden border border-[#C17F59]/30 hover:border-[#C17F59] transition-all duration-300 transform hover:-translate-y-1 hover:shadow-xl hover:shadow-[#C17F59]/10 cursor-pointer backdrop-blur-sm"
|
||||
onClick={() => handleLineupClick(lineup.id)}
|
||||
className="bg-gradient-to-br from-[#2A211E] to-[#1A1412] rounded-lg overflow-hidden border border-[#C17F59]/30 hover:border-[#C17F59] transition-all duration-300 transform hover:-translate-y-1 hover:shadow-xl hover:shadow-[#C17F59]/10 backdrop-blur-sm"
|
||||
>
|
||||
<div className="p-6">
|
||||
<div className="flex flex-col md:flex-row md:items-center md:justify-between mb-4">
|
||||
<div>
|
||||
<h3 className="text-xl font-bold text-[#E6B17E] mb-2">阵容 #{lineup.id}</h3>
|
||||
<p className="text-[#9B8579]">{lineup.battleStrategy}</p>
|
||||
</div>
|
||||
<div className="mt-4 md:mt-0 flex items-center">
|
||||
<span className="text-[#C17F59] text-sm mr-2">创建时间:</span>
|
||||
<span className="text-[#E6B17E]">{lineup.createTime}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-4">
|
||||
{/* 防守阵容 */}
|
||||
<div>
|
||||
<h4 className="text-lg font-semibold text-[#E6B17E] mb-2">防守阵容</h4>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{lineup.defenseHeroes.map((hero: string, index: number) => (
|
||||
<span
|
||||
key={index}
|
||||
className="px-3 py-1 bg-[#1A1412] text-[#C17F59] text-sm rounded-full border border-[#C17F59]/30"
|
||||
>
|
||||
{hero}
|
||||
</span>
|
||||
<h4 className="text-lg font-semibold text-[#E6B17E] mb-4">防守阵容</h4>
|
||||
<div className="flex flex-wrap gap-4">
|
||||
{lineup.defenseHeroInfos.map((hero, index) => (
|
||||
<div key={index} className="flex flex-col items-center">
|
||||
<img
|
||||
src={hero.headImgUrl}
|
||||
alt={hero.heroCode}
|
||||
className="w-16 h-16 rounded-full border-2 border-[#C17F59]/30 hover:border-[#C17F59] transition-colors duration-300"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 进攻阵容 */}
|
||||
<div>
|
||||
<h4 className="text-lg font-semibold text-[#E6B17E] mb-2">进攻阵容</h4>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{lineup.attackHeroes.map((hero: string, index: number) => (
|
||||
<span
|
||||
key={index}
|
||||
className="px-3 py-1 bg-[#1A1412] text-[#C17F59] text-sm rounded-full border border-[#C17F59]/30"
|
||||
>
|
||||
{hero}
|
||||
</span>
|
||||
<h4 className="text-lg font-semibold text-[#E6B17E] mb-4">进攻阵容</h4>
|
||||
<div className="flex flex-wrap gap-4">
|
||||
{lineup.attackHeroInfos.map((hero, index) => (
|
||||
<div key={index} className="flex flex-col items-center">
|
||||
<img
|
||||
src={hero.headImgUrl}
|
||||
alt={hero.heroCode}
|
||||
className="w-16 h-16 rounded-full border-2 border-[#C17F59]/30 hover:border-[#C17F59] transition-colors duration-300"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
@@ -283,92 +218,6 @@ const Lineup: React.FC = () => {
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* 分页控件 */}
|
||||
{!loading && total > 0 && (
|
||||
<div className="flex justify-center items-center mt-8">
|
||||
<div className="flex space-x-2">
|
||||
<button
|
||||
className={`px-3 py-1 rounded-md ${
|
||||
pageNum === 1
|
||||
? "bg-[#1A1412] text-[#9B8579] cursor-not-allowed"
|
||||
: "bg-[#2A211E] text-[#E6B17E] hover:bg-[#C17F59] hover:text-[#1A1412]"
|
||||
}`}
|
||||
onClick={() => pageNum > 1 && handlePageChange(pageNum - 1)}
|
||||
disabled={pageNum === 1}
|
||||
>
|
||||
上一页
|
||||
</button>
|
||||
|
||||
{Array.from({ length: Math.ceil(total / pageSize) }, (_, i) => i + 1)
|
||||
.filter(page =>
|
||||
page === 1 ||
|
||||
page === Math.ceil(total / pageSize) ||
|
||||
(page >= pageNum - 1 && page <= pageNum + 1)
|
||||
)
|
||||
.map((page, index, array) => {
|
||||
// Add ellipsis if there's a gap
|
||||
if (index > 0 && page - array[index - 1] > 1) {
|
||||
return (
|
||||
<React.Fragment key={`ellipsis-${page}`}>
|
||||
<span className="px-2 py-1 text-[#9B8579]">...</span>
|
||||
<button
|
||||
className={`px-3 py-1 rounded-md ${
|
||||
pageNum === page
|
||||
? "bg-[#C17F59] text-[#1A1412]"
|
||||
: "bg-[#2A211E] text-[#E6B17E] hover:bg-[#C17F59] hover:text-[#1A1412]"
|
||||
}`}
|
||||
onClick={() => handlePageChange(page)}
|
||||
>
|
||||
{page}
|
||||
</button>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
key={page}
|
||||
className={`px-3 py-1 rounded-md ${
|
||||
pageNum === page
|
||||
? "bg-[#C17F59] text-[#1A1412]"
|
||||
: "bg-[#2A211E] text-[#E6B17E] hover:bg-[#C17F59] hover:text-[#1A1412]"
|
||||
}`}
|
||||
onClick={() => handlePageChange(page)}
|
||||
>
|
||||
{page}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
|
||||
<button
|
||||
className={`px-3 py-1 rounded-md ${
|
||||
pageNum === Math.ceil(total / pageSize)
|
||||
? "bg-[#1A1412] text-[#9B8579] cursor-not-allowed"
|
||||
: "bg-[#2A211E] text-[#E6B17E] hover:bg-[#C17F59] hover:text-[#1A1412]"
|
||||
}`}
|
||||
onClick={() => pageNum < Math.ceil(total / pageSize) && handlePageChange(pageNum + 1)}
|
||||
disabled={pageNum === Math.ceil(total / pageSize)}
|
||||
>
|
||||
下一页
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="ml-4 flex items-center">
|
||||
<span className="text-[#9B8579] mr-2">每页显示:</span>
|
||||
<select
|
||||
className="bg-[#1A1412] border border-[#C17F59]/30 text-[#E6B17E] px-2 py-1 rounded-md"
|
||||
value={pageSize}
|
||||
onChange={(e) => handlePageSizeChange(Number(e.target.value))}
|
||||
>
|
||||
<option value={5}>5</option>
|
||||
<option value={10}>10</option>
|
||||
<option value={20}>20</option>
|
||||
<option value={50}>50</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
149
src/utils/axios/config.ts
Normal file
149
src/utils/axios/config.ts
Normal file
@@ -0,0 +1,149 @@
|
||||
import axios from 'axios';
|
||||
import type { AxiosInstance, InternalAxiosRequestConfig, AxiosResponse, AxiosError, AxiosRequestConfig } from 'axios';
|
||||
|
||||
// 请求参数类型
|
||||
export type RequestParams = Record<string, string | number | boolean | null | undefined | string[]>;
|
||||
|
||||
// 创建axios实例
|
||||
const instance: AxiosInstance = axios.create({
|
||||
baseURL: process.env.VITE_API_BASE_URL,
|
||||
timeout: 15000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
// 请求拦截器
|
||||
instance.interceptors.request.use(
|
||||
(config: InternalAxiosRequestConfig) => {
|
||||
// 从localStorage获取token
|
||||
const token = localStorage.getItem('token');
|
||||
if (token) {
|
||||
config.headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(error: AxiosError) => {
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// 响应拦截器
|
||||
instance.interceptors.response.use(
|
||||
(response: AxiosResponse) => {
|
||||
const { data } = response;
|
||||
// 这里可以根据后端的数据结构进行调整
|
||||
if (data.code === 200 || data.code === 0) {
|
||||
return data.data;
|
||||
}
|
||||
return Promise.reject(new Error(data.message || '请求失败'));
|
||||
},
|
||||
(error: AxiosError) => {
|
||||
if (error.response) {
|
||||
switch (error.response.status) {
|
||||
case 401:
|
||||
// 未授权,清除token并跳转到登录页
|
||||
localStorage.removeItem('token');
|
||||
window.location.href = '/login';
|
||||
break;
|
||||
case 403:
|
||||
// 权限不足
|
||||
console.error('没有权限访问该资源');
|
||||
break;
|
||||
case 404:
|
||||
console.error('请求的资源不存在');
|
||||
break;
|
||||
case 500:
|
||||
console.error('服务器错误');
|
||||
break;
|
||||
default:
|
||||
console.error('未知错误');
|
||||
}
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// 通用的 API 请求方法
|
||||
export const Api = {
|
||||
/**
|
||||
* GET请求
|
||||
* @param url - 请求地址
|
||||
* @param params - 请求参数
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async get<T>(url: string, params?: RequestParams, config?: AxiosRequestConfig): Promise<T> {
|
||||
return instance.get(url, { params, ...config });
|
||||
},
|
||||
|
||||
/**
|
||||
* POST请求
|
||||
* @param url - 请求地址
|
||||
* @param data - 请求数据
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async post<T>(url: string, data?: RequestParams, config?: AxiosRequestConfig): Promise<T> {
|
||||
return instance.post(url, data, config);
|
||||
},
|
||||
|
||||
/**
|
||||
* PUT请求
|
||||
* @param url - 请求地址
|
||||
* @param data - 请求数据
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async put<T>(url: string, data?: RequestParams, config?: AxiosRequestConfig): Promise<T> {
|
||||
return instance.put(url, data, config);
|
||||
},
|
||||
|
||||
/**
|
||||
* DELETE请求
|
||||
* @param url - 请求地址
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async delete<T>(url: string, config?: AxiosRequestConfig): Promise<T> {
|
||||
return instance.delete(url, config);
|
||||
},
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* @param url - 请求地址
|
||||
* @param file - 文件
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async upload<T>(url: string, file: File, config?: AxiosRequestConfig): Promise<T> {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return instance.post(url, formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
...config,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
* @param url - 请求地址
|
||||
* @param filename - 文件名
|
||||
* @param config - axios配置
|
||||
*/
|
||||
async download(url: string, filename?: string, config?: AxiosRequestConfig): Promise<void> {
|
||||
const response = await instance.get(url, {
|
||||
responseType: 'blob',
|
||||
...config,
|
||||
});
|
||||
|
||||
const blob = new Blob([response.data]);
|
||||
const downloadUrl = window.URL.createObjectURL(blob);
|
||||
const link = document.createElement('a');
|
||||
link.href = downloadUrl;
|
||||
link.download = filename || 'download';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
window.URL.revokeObjectURL(downloadUrl);
|
||||
},
|
||||
};
|
||||
|
||||
export default instance;
|
||||
@@ -1,42 +0,0 @@
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取环境变量
|
||||
const getBaseUrl = () => {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return 'http://localhost:8080'
|
||||
}
|
||||
return 'https://api.your-domain.com'
|
||||
}
|
||||
|
||||
// 创建 axios 实例
|
||||
const instance = axios.create({
|
||||
baseURL: getBaseUrl(),
|
||||
timeout: 10000,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
})
|
||||
|
||||
// 请求拦截器
|
||||
instance.interceptors.request.use(
|
||||
(config) => {
|
||||
// 这里可以添加 token 等认证信息
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// 响应拦截器
|
||||
instance.interceptors.response.use(
|
||||
(response) => {
|
||||
return response.data
|
||||
},
|
||||
(error) => {
|
||||
// 这里可以统一处理错误
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export const request = instance
|
||||
@@ -13,7 +13,12 @@
|
||||
"allowImportingTsExtensions": true,
|
||||
"strict": true,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false
|
||||
"noUnusedParameters": false,
|
||||
// 修改: 调整 baseUrl 和 paths 配置,确保模块解析正常
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src", "postcss.config.mjs"]
|
||||
}
|
||||
Reference in New Issue
Block a user