diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a160d90..b460002 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -15,6 +15,7 @@ module.exports = { {allowConstantExport: true}, ], // 去除any报错 - '@typescript-eslint/no-explicit-any': ['off'] + '@typescript-eslint/no-explicit-any': ['off'], + }, } diff --git a/package-lock.json b/package-lock.json index 5c7ac48..07a6876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,8 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "typescript": "^5.2.2", - "vite": "^5.1.4" + "vite": "^5.1.4", + "vite-plugin-eslint": "^1.8.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1278,6 +1279,19 @@ "node": ">=14.0.0" } }, + "node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.12.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz", @@ -1488,6 +1502,16 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/eslint": { + "version": "8.56.12", + "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -2502,6 +2526,12 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4495,6 +4525,36 @@ } } }, + "node_modules/vite-plugin-eslint": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/vite-plugin-eslint/-/vite-plugin-eslint-1.8.1.tgz", + "integrity": "sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^4.2.1", + "@types/eslint": "^8.4.5", + "rollup": "^2.77.2" + }, + "peerDependencies": { + "eslint": ">=7", + "vite": ">=2" + } + }, + "node_modules/vite-plugin-eslint/node_modules/rollup": { + "version": "2.79.2", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index df10110..e4e4d2a 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "typescript": "^5.2.2", - "vite": "^5.1.4" + "vite": "^5.1.4", + "vite-plugin-eslint": "^1.8.1" } } diff --git a/src/components/CouponModal/SelectCouponModal.tsx b/src/components/CouponModal/SelectCouponModal.tsx index 5b1f993..ea2249f 100644 --- a/src/components/CouponModal/SelectCouponModal.tsx +++ b/src/components/CouponModal/SelectCouponModal.tsx @@ -43,7 +43,7 @@ export default function SelectCouponModal(props: any) { }, onSuccess(data: any) { setTotal(data.data.total) - console.log(data.data.rows); + // console.log(data.data.rows); setCouponArray(data.data.rows) }, onFinally() { diff --git a/src/components/ai/AiHelper.tsx b/src/components/ai/AiHelper.tsx index 2d5da64..bcfef1b 100644 --- a/src/components/ai/AiHelper.tsx +++ b/src/components/ai/AiHelper.tsx @@ -92,7 +92,7 @@ export default function AiHelper(props: PropsType) { // const [openModal ,setOpenModal] = useState(false) //是提示替换弹框 // const height = window.innerHeight - 280; const globalContext = useContext(GlobalContext); - const pingTimeout = useRef(-1); + const pingTimeout = useRef(-1); const ws = useRef(null); const [messageApi, messageApiHolder] = useMessage(); diff --git a/src/components/card/CardProj.tsx b/src/components/card/CardProj.tsx index 8786056..a8bee66 100644 --- a/src/components/card/CardProj.tsx +++ b/src/components/card/CardProj.tsx @@ -361,19 +361,19 @@ export default function CardProj(props: any) { const [displayOrderShowOpen, setDisplayOrderShowOpen] = useState(false) - const pkg = data.pay.chargeAdditionals.match(/PKG:(\d+)/); - const video = data.pay.chargeAdditionals.match(/VIDEO_DEMO:(\d+)/); + // const pkg = data.pay.chargeAdditionals.match(/PKG:(\d+)/); + // const video = data.pay.chargeAdditionals.match(/VIDEO_DEMO:(\d+)/); const URGENT = data.pay.chargeAdditionals.match(/URGENT:(\d+)/); // 基础服务费 // const basics = data.pay.charge.match(/:(\d+)/); - const pkgValue: number | null = pkg ? parseInt(pkg[1], 10) / 100 : null; - const videoDemoValue: number | null = video ? parseInt(video[1], 10) / 100 : null; + // const pkgValue: number | null = pkg ? parseInt(pkg[1], 10) / 100 : null; + // const videoDemoValue: number | null = video ? parseInt(video[1], 10) / 100 : null; const URGENTvalue: number | null = URGENT ? parseInt(URGENT[1], 10) / 100 : null; // const basicsValue: number | null = basics ? parseInt(basics[1], 10)/100 : null; const [projId] = useState(data.projId) // 修改 - const isShow = data.pay.chargeAdditionals.includes('PKG') || data.pay.chargeType == 'ALL' + // const isShow = data.pay.chargeAdditionals.includes('PKG') || data.pay.chargeType == 'ALL' const [messageApi, messageContext] = useMessage(); diff --git a/src/components/payment/Payment.tsx b/src/components/payment/Payment.tsx index 09007b4..0410b91 100644 --- a/src/components/payment/Payment.tsx +++ b/src/components/payment/Payment.tsx @@ -188,7 +188,7 @@ export default function Payment(props: IPaymentProps) { width: 100, dataIndex: 'operate', key: 'packageInfoId', - render: (value, record) => { + render: (_value, record) => { return (
(); + const countdownIntervalRef = useRef(); const [refreshQrCodeCount, setRefreshQrCodeCount] = useState(0); /** diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 15b7df6..f0ea146 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -34,7 +34,9 @@ import { CloseOutlined } from '@ant-design/icons'; import { useLocation } from 'react-router-dom'; -import { get, downloadUrl, post, getCouponUrl } from '../../util/AjaxUtils.ts' +import { get, + // downloadUrl, + post, getCouponUrl } from '../../util/AjaxUtils.ts' import { setMenuActive } from '../../util/cache.ts' import gpsImg from '../../static/right/gps.png' import backImg from '../../static/right/back.png' @@ -263,7 +265,7 @@ export default function Index() { setrefunKeywords('') setapplyStatus(null) // 刷新当前页面 - + } // 补正页面搜索条件初始化 const correctionInit = () => { @@ -899,7 +901,7 @@ export default function Index() { keywords: refunKeywords, applyStatus: applyStatus, authorId: authorId, - + } }) } @@ -912,7 +914,7 @@ export default function Index() { applyStatus: correctionApplyStatus, authorId: authorId, tagCor: tagCor, - + } }) } @@ -972,7 +974,7 @@ export default function Index() { keywords: value, applyStatus: applyStatus, authorId: authorId, - + } }) } @@ -986,7 +988,7 @@ export default function Index() { keywords: '', applyStatus: applyStatus, authorId: authorId, - + } }) } @@ -1003,7 +1005,7 @@ export default function Index() { applyStatus: correctionApplyStatus, authorId: authorId, tagCor: tagCor, - + } }) } @@ -1020,7 +1022,7 @@ export default function Index() { applyStatus: correctionApplyStatus, authorId: authorId, tagCor: tagCor, - + } }) } @@ -1509,7 +1511,7 @@ export default function Index() { keywords: refunKeywords, applyStatus: value, authorId: authorId, - + } }) }} @@ -1581,7 +1583,7 @@ export default function Index() { applyStatus: correctionApplyStatus, authorId: authorId, tagCor: tagCor, - + } }) }} @@ -1607,7 +1609,7 @@ export default function Index() { applyStatus: correctionApplyStatus, authorId: authorId, tagCor: tagCor, - + } }) }} @@ -1635,7 +1637,7 @@ export default function Index() { applyStatus: value, authorId: authorId, tagCor: tagCor, - + } }) }} @@ -1663,7 +1665,7 @@ export default function Index() { applyStatus: applyStatus, authorId: authorId, tagCor: value, - + } }) }} @@ -1963,9 +1965,16 @@ export default function Index() {
- { + {/* { }} + + className='testImg' + /> */} + { + + }} + className='testImg' />
{ diff --git a/vite.config.ts b/vite.config.ts index 8929d1a..4ebb3ca 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,6 +1,6 @@ import {defineConfig} from 'vite' import react from '@vitejs/plugin-react' - +// import eslintPlugin from 'vite-plugin-eslint'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()],