diff --git a/demo_module/index.html b/demo_module/index.html index 0c589eccd4d48e270e161a1ab91baee5e5f4b4bc..27f1519a9d8292a948b26bd87566975933560bfa 100644 --- a/demo_module/index.html +++ b/demo_module/index.html @@ -9,5 +9,6 @@
+ diff --git a/demo_module/package-lock.json b/demo_module/package-lock.json index ab61ffad9f8bed981506c47f8dcae2e73812e6b6..3e1c9b00c730c041a034f0d8b7e994c1bc5f489a 100644 --- a/demo_module/package-lock.json +++ b/demo_module/package-lock.json @@ -8,6 +8,7 @@ "name": "diyi", "version": "0.0.0", "dependencies": { + "@nutui/nutui-react": "^3.0.0-beta.6", "@reduxjs/toolkit": "^2.3.0", "antd": "^5.22.3", "antd-mobile": "^5.38.1", @@ -19,6 +20,7 @@ "react-dom": "^18.3.1", "react-redux": "^9.1.2", "react-router-dom": "^6.28.0", + "react-vant": "^3.3.5", "redux": "^5.0.1", "redux-persist": "^6.0.0" }, @@ -1081,6 +1083,81 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@nutui/icons-react": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/@nutui/icons-react/-/icons-react-1.0.5.tgz", + "integrity": "sha512-0TYl3Fk+sVz95DKqn/7isYAvaK5YGnaBwMMib4rqYLoqi9GGFwgU9rp2hYXu/X5IYdWgshj0xiuGMK75/vUYbQ==", + "license": "MIT" + }, + "node_modules/@nutui/jdesign-icons-react-taro": { + "version": "1.0.6-beta.2", + "resolved": "https://registry.npmmirror.com/@nutui/jdesign-icons-react-taro/-/jdesign-icons-react-taro-1.0.6-beta.2.tgz", + "integrity": "sha512-2Scz5c9o14gA7Mw5JdiEkc/KEbNlNWMcJMuqVyFVipYeeYN/118N/fvHVpocmJviN0Gc4P+u3ZB3dIQSA2j4Fw==", + "license": "MIT" + }, + "node_modules/@nutui/nutui-react": { + "version": "3.0.0-beta.6", + "resolved": "https://registry.npmmirror.com/@nutui/nutui-react/-/nutui-react-3.0.0-beta.6.tgz", + "integrity": "sha512-mj2PuFjiDLu/7kT6WgW+p/gPxelmQKjlLQKAoX8IuLWERygk/HgKZdDZl24YaNW6ly9H/ka3XOD04zarQ9cddQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@nutui/icons-react": "^1.0.5", + "@nutui/jdesign-icons-react-taro": "1.0.6-beta.2", + "@nutui/touch-emulator": "^1.0.0", + "@react-spring/web": "~9.6.1", + "@swc/helpers": "^0.5.7", + "@use-gesture/react": "10.2.20", + "async-validator": "^4.2.5", + "classnames": "^2.5.1", + "lodash.isequal": "^4.5.0", + "lodash.kebabcase": "^4.1.1", + "react-transition-group": "^4.4.5" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@nutui/nutui-react/node_modules/@use-gesture/core": { + "version": "10.2.20", + "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.2.20.tgz", + "integrity": "sha512-4lFhHc8so4yIHkBEs641DnEsBxPyhJ5GEjB4PURFDH4p/FcZriH6w99knZgI63zN/MBFfylMyb8+PDuj6RIXKQ==", + "license": "MIT" + }, + "node_modules/@nutui/nutui-react/node_modules/@use-gesture/react": { + "version": "10.2.20", + "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.2.20.tgz", + "integrity": "sha512-KnJq9ZSqprWA6uNhWTUHZqTCh+rfa0j8ehTzqeBhktUPrmTj7yVOBvEQ/vSFU/7d72cGgWSsJ0f5T6GQCHXnvg==", + "license": "MIT", + "dependencies": { + "@use-gesture/core": "10.2.20" + }, + "peerDependencies": { + "react": ">= 16.8.0" + } + }, + "node_modules/@nutui/nutui-react/node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmmirror.com/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/@nutui/touch-emulator": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/@nutui/touch-emulator/-/touch-emulator-1.0.0.tgz", + "integrity": "sha512-k2hvI/9LlRA7Ph1Chni27pTuvPmKPt+/I10sWWd2sWzqiCOYRerD79eIwCMRGUF/q6WVDEKVnv00t9CEUL4sPA==", + "license": "MIT" + }, "node_modules/@rc-component/async-validator": { "version": "5.0.4", "resolved": "https://registry.npmmirror.com/@rc-component/async-validator/-/async-validator-5.0.4.tgz", @@ -1303,6 +1380,15 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/@react-vant/icons": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/@react-vant/icons/-/icons-0.1.0.tgz", + "integrity": "sha512-slDFBZPN0QIQHDAMoWXE7nilbo3XXFi4p/2IjSSRH4HRm9BxocJ6Y/LIaI+bRX8nru+RzZ49PM26blrNuyxj2A==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.14.0" + } + }, "node_modules/@reduxjs/toolkit": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/@reduxjs/toolkit/-/toolkit-2.3.0.tgz", @@ -1542,6 +1628,15 @@ "win32" ] }, + "node_modules/@swc/helpers": { + "version": "0.5.15", + "resolved": "https://registry.npmmirror.com/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmmirror.com/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -1643,6 +1738,12 @@ "react": ">= 16.8.0" } }, + "node_modules/@vant/popperjs": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", + "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==", + "license": "MIT" + }, "node_modules/@vitejs/plugin-react": { "version": "4.3.3", "resolved": "https://registry.npmmirror.com/@vitejs/plugin-react/-/plugin-react-4.3.3.tgz", @@ -2200,6 +2301,15 @@ "wrap-ansi": "^6.2.0" } }, + "node_modules/clsx": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/clsx/-/clsx-1.2.1.tgz", + "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", @@ -2430,6 +2540,16 @@ "node": ">=0.10.0" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.43", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.43.tgz", @@ -3847,6 +3967,18 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "license": "MIT" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "license": "MIT" + }, + "node_modules/lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "license": "MIT" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmmirror.com/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -3950,7 +4082,6 @@ "version": "4.1.1", "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -4199,7 +4330,6 @@ "version": "15.8.1", "resolved": "https://registry.npmmirror.com/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -4889,8 +5019,7 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmmirror.com/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-redux": { "version": "9.1.2", @@ -4953,6 +5082,71 @@ "react-dom": ">=16.8" } }, + "node_modules/react-transition-group": { + "version": "4.4.2", + "resolved": "https://registry.npmmirror.com/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/react-vant": { + "version": "3.3.5", + "resolved": "https://registry.npmmirror.com/react-vant/-/react-vant-3.3.5.tgz", + "integrity": "sha512-Uzod3tMmFdL5/W2CH75NI2q02gTgNCsAJ8ons2nPhVxDX1eC92HqxVLzK5QUNEcJaubnjWMX/BEMo4U5A6c0yQ==", + "license": "MIT", + "dependencies": { + "@react-spring/web": "^9.4.5", + "@react-vant/icons": "latest", + "@use-gesture/react": "10.2.17", + "@vant/popperjs": "^1.1.0", + "clsx": "1.2.1", + "rc-field-form": "^1.26.4", + "react-is": "^18.2.0", + "react-transition-group": "4.4.2", + "tslib": "^2.4.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/react-vant" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, + "node_modules/react-vant/node_modules/@use-gesture/core": { + "version": "10.2.17", + "resolved": "https://registry.npmmirror.com/@use-gesture/core/-/core-10.2.17.tgz", + "integrity": "sha512-62hCybe4x6oGZ1/JA9gSYIdghV1FqxCdvYWt9SqCEAAikwT1OmVl2Q/Uu8CP636L57D+DfXtw6PWM+fdhr4oJQ==", + "license": "MIT" + }, + "node_modules/react-vant/node_modules/@use-gesture/react": { + "version": "10.2.17", + "resolved": "https://registry.npmmirror.com/@use-gesture/react/-/react-10.2.17.tgz", + "integrity": "sha512-Vfrp1KgdYn/kOEUAYNXtGBCl2dr38s3G6rru1TOPs+cVUjfNyNxvJK56grUyJ336N3rQLK8F9G7+FfrHuc3g/Q==", + "license": "MIT", + "dependencies": { + "@use-gesture/core": "10.2.17" + }, + "peerDependencies": { + "react": ">= 16.8.0" + } + }, + "node_modules/react-vant/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, "node_modules/redux": { "version": "5.0.1", "resolved": "https://registry.npmmirror.com/redux/-/redux-5.0.1.tgz", diff --git a/demo_module/package.json b/demo_module/package.json index 97e4dda42a891474a44a18fff245b667deb3f592..962f164c727383c088304a8cf19a19e5250836e9 100644 --- a/demo_module/package.json +++ b/demo_module/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@nutui/nutui-react": "^3.0.0-beta.6", "@reduxjs/toolkit": "^2.3.0", "antd": "^5.22.3", "antd-mobile": "^5.38.1", @@ -21,6 +22,7 @@ "react-dom": "^18.3.1", "react-redux": "^9.1.2", "react-router-dom": "^6.28.0", + "react-vant": "^3.3.5", "redux": "^5.0.1", "redux-persist": "^6.0.0" }, diff --git a/demo_module/public/img/1.jpg b/demo_module/public/img/1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..547e20cb639fa12813f13ea774168cb6168aae18 Binary files /dev/null and b/demo_module/public/img/1.jpg differ diff --git a/demo_module/public/img/1.png b/demo_module/public/img/1.png new file mode 100644 index 0000000000000000000000000000000000000000..340c883e74a22581c8b5f9707670a21d83fb6a16 Binary files /dev/null and b/demo_module/public/img/1.png differ diff --git a/demo_module/public/img/1.webp b/demo_module/public/img/1.webp new file mode 100644 index 0000000000000000000000000000000000000000..378aca83f7c29089c4fb14c32c20662803a850ef Binary files /dev/null and b/demo_module/public/img/1.webp differ diff --git a/demo_module/public/img/2.jpg b/demo_module/public/img/2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..60bc33de6c2c0dee12bf724c24181385c8b03b27 Binary files /dev/null and b/demo_module/public/img/2.jpg differ diff --git a/demo_module/public/img/2.png b/demo_module/public/img/2.png new file mode 100644 index 0000000000000000000000000000000000000000..16578fd1c2f4ec31399aa6960bd1ce103e696752 Binary files /dev/null and b/demo_module/public/img/2.png differ diff --git a/demo_module/public/img/3.jpg b/demo_module/public/img/3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ea5f57f64bc61a64250bb376b76048ade22c704c Binary files /dev/null and b/demo_module/public/img/3.jpg differ diff --git a/demo_module/public/img/3.png b/demo_module/public/img/3.png new file mode 100644 index 0000000000000000000000000000000000000000..25955f76d38de158d3a63a95632ffaa394c10e01 Binary files /dev/null and b/demo_module/public/img/3.png differ diff --git a/demo_module/public/img/4.jpg b/demo_module/public/img/4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..81dad1a01488b618c980146d1fd3fac5514f4212 Binary files /dev/null and b/demo_module/public/img/4.jpg differ diff --git a/demo_module/public/img/4.png b/demo_module/public/img/4.png new file mode 100644 index 0000000000000000000000000000000000000000..f4e42730b2adc5100baa7216344b567b0235ab9d Binary files /dev/null and b/demo_module/public/img/4.png differ diff --git a/demo_module/public/rem/rem.js b/demo_module/public/rem/rem.js new file mode 100644 index 0000000000000000000000000000000000000000..de875fb76ae7115bfd64c17a49acacbadb944d26 --- /dev/null +++ b/demo_module/public/rem/rem.js @@ -0,0 +1,29 @@ +(function (d, c) { +     var e = d.documentElement, +       b = "orientationchange" in window ? "orientationchange" : "resize", +       a = function () { +         var f = e.clientWidth; +         if (!f) { +           return; +         } +         if ( +           !/Android|webOS|iPhone|iPod|BlackBerry|SymbianOS|Windows Phone/i.test( +             navigator.userAgent +           ) +         ) { +           // PC端不设置 +           e.style.fontSize = "100px"; +           return; +         } +         // 根据屏幕宽度动态设置font-size iphone pro max 14的屏幕宽度,可以根据设计稿定义 +         e.style.fontSize = 100 * (f / 430) + "px"; +       }; +     if (!d.addEventListener) { +       return; +     } +     c.addEventListener(b, a, false); +     d.addEventListener("DOMContentLoaded", a, false); +   })(document, window); +   /* +    1rem=100px +     */ \ No newline at end of file diff --git a/demo_module/src/router/index.jsx b/demo_module/src/router/index.jsx index 5dbe8976de7455b1215367d5f09419d513c7605f..6b381139a88634f2dc4be828c6c81491f2612090 100644 --- a/demo_module/src/router/index.jsx +++ b/demo_module/src/router/index.jsx @@ -1,6 +1,45 @@ import { lazy } from "react" import { Navigate } from "react-router-dom" -//主页 + +//唐帅磊和康峰容负责的 项目首页 + +//kfr首页 +import Index from '../view/kfr/index.jsx' +import Test from '../view/kfr/test.jsx' +import Capacity from '../view/kfr/capacity.jsx' +import Interview from '../view/kfr/interview.jsx' +import Topic from '../view/kfr/topic.jsx' +import Answer from '../view/kfr/answer.jsx' +import Simula from '../view/kfr/simula.jsx' +import Sheet from '../view/kfr/sheet.jsx' +import Jiaojuan from '../view/kfr/jiaojuan.jsx' +import Testreport from '../view/kfr/testreport.jsx' +import Parse from '../view/kfr/parse.jsx' +import Realexam from '../view/kfr/realexam.jsx' + + +//tsl首页 +const Index1 = lazy(() => import('../view/Shouye_tsl/Index')) +const Shenlun = lazy(() => import('../view/Shouye_tsl/Shenlun')) +const Mianshi = lazy(() => import('../view/Shouye_tsl/Mianshi')) +const Xianshang = lazy(() => import('../view/Shouye_tsl/Xianshang')) +const Xianxia = lazy(() => import('../view/Shouye_tsl/Xianxia')) +const Ziliao = lazy(() => import('../view/Shouye_tsl/Ziliao')) +const Cate = lazy(() => import('../view/Shouye_tsl/ShenlunCate')) +const Test1 = lazy(() => import('../view/Shouye_tsl/Test')) +const Question = lazy(() => import('../view/Shouye_tsl/Question')); +const Card = lazy(() => import('../view/Shouye_tsl/Card')) +const Buy = lazy(() => import('../view/Shouye_tsl/Buy')) +const Abuy = lazy(() => import('../view/Shouye_tsl/ABuy')) +const Hand = lazy(() => import('../view/Shouye_tsl/Hand')) +const Gift = lazy(() => import('../view/Shouye_tsl/Gift')) +const Find = lazy(() => import('../view/Shouye_tsl/Find')) +const Zhaokao = lazy(() => import('../view/Shouye_tsl/Zhaokao')) +const Findxiang = lazy(() => import('../view/Shouye_tsl/Findxiang')) +const Zhaoxiang = lazy(() => import('../view/Shouye_tsl/Zhaoxiang')) + + +// 杨章富和王卓岩负责的 我的主页 const MineView = lazy(() => import("../view/Mine")) //我的荣誉 const My_honor = lazy(() => import("../view/Mine/MyHonor")) @@ -56,7 +95,99 @@ const Mylev = lazy(() => import("../view/Mine/Mylev")) // 路由设置 const routes = [ - { path: '/', element: }, + { path: '/', element: }, + // 唐帅磊和康峰容负责的 首页路由 + + //KFR + // 首页路由 + { + path: '/homepage', element: , children: [ + // 行测路由 + { path: '/homepage/test', element: }, + // 申论路由 + { path: '/homepage/capacity', element: }, + // 面试路由 + { path: '/homepage/interview', element: }, + { path: "/homepage", element: } + ] + }, + //真题路由 + { path: '/topic', element: }, + //真题答题卡路由 + { path: '/answer', element: }, + + + //模拟题路由 + { path: '/simula', element: }, + // 模拟题答题卡路由 + { path: 'sheet', element: }, + // 交卷成功 + { path: '/jiaojuan', element: }, + // 考试报告 + { path: '/testreport', element: }, + //解析 + { path: '/parse', element: }, + //真题 + { path: '/realexam', element: }, + + //TSL 首页路由 + { path: '/index1', element: }, + { path: "/shenlun", element: }, + { path: '/mianshi', element: }, + { path: '/xianshang', element: }, + { path: '/xianxia', element: }, + { path: 'ziliao', element: }, + { path: '/cate', element: }, + { path: '/test1', element: }, + { path: '/question', element: }, + { path: '/card', element: }, + { path: '/buy', element: }, + { path: '/abuy', element: }, + { path: "/hand", element: }, + { path: "/gift", element: }, + { path: "/find", element: }, + { path: '/findxiang', element: }, + { path: '/zhaokao', element: }, + { path: 'zhaoxiang', element: }, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // 杨章富和王卓岩负责的 我的主页路由 { path: '/mine', element: < MineView />, }, // 用户资料包含的路由 { path: '/mine/personal', element: < PersonalData /> }, @@ -79,25 +210,25 @@ const routes = [ { path: '/mine/withdrawalrecord', element: < WithdrawalRecord /> }, { path: '/mine/yes', element: < Yes /> }, -//我的学习包含的路由 -{ path: '/mine/mycourse', element: < Mycourse /> }, -{ path: '/mine/mymock', element: < Mymock /> }, -{ path: '/mine/myexercise', element: < MyExercise /> }, - -//收货地址 -{ path: '/mine/address', element: < Address /> }, - -//我的练习 -{ path: '/mine/myreal', element: < MyReal /> }, -//我的面试 -{ path: '/mine/myinterview', element: < MyInterview /> }, -//我的批阅 -{ path: '/mine/myread', element: < MyRead /> }, -{ path: '/mine/myresult', element: < MyResult /> }, -//我的勋章 -{ path: '/mine/mymedal', element: < MyMedal /> }, -//我的等级 -{ path: '/mine/mylev', element: < Mylev /> }, + //我的学习包含的路由 + { path: '/mine/mycourse', element: < Mycourse /> }, + { path: '/mine/mymock', element: < Mymock /> }, + { path: '/mine/myexercise', element: < MyExercise /> }, + + //收货地址 + { path: '/mine/address', element: < Address /> }, + + //我的练习 + { path: '/mine/myreal', element: < MyReal /> }, + //我的面试 + { path: '/mine/myinterview', element: < MyInterview /> }, + //我的批阅 + { path: '/mine/myread', element: < MyRead /> }, + { path: '/mine/myresult', element: < MyResult /> }, + //我的勋章 + { path: '/mine/mymedal', element: < MyMedal /> }, + //我的等级 + { path: '/mine/mylev', element: < Mylev /> }, ] diff --git a/demo_module/src/view/Mine.jsx b/demo_module/src/view/Mine.jsx index 01b1591758eb13fb133f369fc3432dddfe28bd13..a71d8fa8f688ec564d906536b22b45f87cafa351 100644 --- a/demo_module/src/view/Mine.jsx +++ b/demo_module/src/view/Mine.jsx @@ -1,14 +1,17 @@ // 页面样式 import './Mine.css' // 页面组件 -import React, { useState,useEffect } from 'react' +import React, { useState, useEffect } from 'react' import { Outlet, useNavigate } from 'react-router-dom' import { Link } from 'react-router-dom' import axios from 'axios' +import { Tabbar, Sticky } from 'react-vant' +import { WapHomeO, OrdersO, BrowsingHistoryO, Contact, UserO } from '@react-vant/icons' export default function Mine() { // 设置 navigate功能 跳转页面 const navigate = useNavigate() + const [name, setName] = useState('wodo') //用户资料 const [user, setUser] = useState({ @@ -111,8 +114,8 @@ export default function Mine() { const userData = response.data.data[0]; // 假设返回的数据是一个用户数组 setUser({ name: userData.nickname, // 根据后端的实际字段名调整 - img: userData.avatar, - signa:userData.signa, // 根据后端的实际字段名调整 + img: userData.avatar, + signa: userData.signa, // 根据后端的实际字段名调整 path: '/mine/personal' }); } @@ -131,18 +134,18 @@ export default function Mine() { {/* 用户信息 */}
-
{ goPage(user.path) }}> +
{ goPage(user.path) }}>
-

{user.name}

-

{user.signa}

+

{user.name}

+

{user.signa}

- +

-
{ goPage('/mine/settings') }} style={{width:"70px",marginTop:"20px"}}>设置
+
{ goPage('/mine/settings') }} style={{ width: "70px", marginTop: "20px" }}>设置
-
+
我的荣誉
@@ -219,9 +222,13 @@ export default function Mine() { {/* 导航栏路由 */} -
-
- + + } onClick={() => { navigate('/homepage') }} >首页 + }>课程 + } onClick={() => { navigate('/find') }}>发现 + } onClick={() => { navigate('/mine') }}>我的 + + {/* */} ) diff --git a/demo_module/src/view/Shouye_tsl/ABuy.jsx b/demo_module/src/view/Shouye_tsl/ABuy.jsx new file mode 100644 index 0000000000000000000000000000000000000000..152cb508dbce0b90dd1375ad759637464aeaf319 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/ABuy.jsx @@ -0,0 +1,26 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; +import { ArrowLeft } from '@react-vant/icons' +import { useSearchParams } from "react-router-dom"; +import b1 from './imgs/b1.png' +import './CSS/abuy.css' +export default function ABuy() { + const navigate = useNavigate() + const [searchParams, setSearchParams] = useSearchParams() + const num = searchParams.get('num') + return ( +
+
+ navigate('/buy')} /> +

购买成功

+
+
+

购买成功!

+

剩余批阅次数:{num}

+ + +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Buy.jsx b/demo_module/src/view/Shouye_tsl/Buy.jsx new file mode 100644 index 0000000000000000000000000000000000000000..184983d57ba97df61b3ea347a0a3351219e6f3ed --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Buy.jsx @@ -0,0 +1,41 @@ +import React, { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { ArrowLeft } from '@react-vant/icons' +import './CSS/buy.css' +export default function Buy() { + const navigate = useNavigate() + + return ( +
+
+ navigate('/question1')} /> +

购买名师批阅

+
+
+

0

+

剩余批阅次数

+
+
+
+

5次批阅服务

+ +
+
+

10次批阅服务 + +

+ +
+
+

20次批阅服务 + +

+ +
+
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/abuy.css b/demo_module/src/view/Shouye_tsl/CSS/abuy.css new file mode 100644 index 0000000000000000000000000000000000000000..a2d0386bb58a9b6bdf08fed7c42697aab2c45179 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/abuy.css @@ -0,0 +1,28 @@ +.abuy{ + width: 100vw; +} +.abuy .abuy_top{ + width: 100vw; + height: 50px; + display: flex; + background-color: gainsboro; + line-height: 50px; +} +.abuy_content{ + width: 100vw; + text-align: center; +} +img{ + width: 90vw; + margin: 50px auto; +} +button{ + width: 70%; + height: 36px; + margin: 50px auto; + background-color: red; + color: white; + border: none; + border-radius: 10px; + line-height: 36px; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/buy.css b/demo_module/src/view/Shouye_tsl/CSS/buy.css new file mode 100644 index 0000000000000000000000000000000000000000..8b3fe6ba8b1c036c36db08d80692fdbe22b09b75 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/buy.css @@ -0,0 +1,43 @@ +.buy{ + width: 100vw; +} +.buy .buy_top{ + width: 100vw; + height: 50px; + display: flex; + background-color: gainsboro; + line-height: 50px; +} +.buy_content{ + width: 100vw; + height: 20vh; + text-align: center; +} +.buy_bottom{ + width: 100vw; + border-top: 1px solid gainsboro; +} +.buy_bottom1{ + width: 100vw; + height: 50px; + display: flex; + justify-content: space-between; + line-height: 50px; + border-bottom: 1px solid gainsboro; +} +.buy_bottom1 button{ + width: 100px; + height: 30px; + border-radius: 10px; + margin-top: 10px; + background-color: red; + color: white; + border: none; +} +.buy_bottom2{ + width: 100vw; + height: 50px; + display: flex; + justify-content: space-around; + background-color: gainsboro; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/card.css b/demo_module/src/view/Shouye_tsl/CSS/card.css new file mode 100644 index 0000000000000000000000000000000000000000..cf735c8f8c7d967e9c95164839d2d64a3ecf5da9 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/card.css @@ -0,0 +1,97 @@ +.card{ + width: 100vw; +} +.top{ + width: 100%; + height: 50px; + background-color: gainsboro; + display: flex; + line-height: 50px; +} +.main{ + width: 100%; +} +.main1{ + width: 100%; + margin-top: 20px; + display: flex; +} +.main2{ + width: 20%; + height: 80px; + margin-left: 20px; +} +.main3{ + width: 30px; + height: 30px; + border-radius: 50%; + text-align: center; + background-color: rgb(15,142,243); + margin: auto; + color: white; +} +.main3Act{ + width: 30px; + height: 30px; + border-radius: 50%; + text-align: center; + background-color: white; + color: black; + border: 1px solid black; + margin: auto; +} +.tishi{ + width: 80%; + height: 150px; + border: 1px solid black; + border-radius: 10px; + margin: auto; +} +.tishi1{ + width: 100%; + height: 60%; + border-bottom: 1px solid black; + text-align: center; + line-height: 90px; + font-size: large; + font-weight: bold; +} +.tishi2{ + width: 100%; + height: 40%; + display: flex; +} +.tishi3{ + width: 50%; + height: 100%; + border-right: 1px solid black; + text-align: center; + line-height: 60px; + font-size: large; +} +.tishi4{ + width: 50%; + height: 100%; + text-align: center; + line-height: 60px; + font-size: large; + color: rgb(15,142,243); + font-weight: bold; +} + +.footer{ + width: 100%; + height: 50px; + position: fixed; + bottom: 0; +} +.footer button{ + width: 50%; + height: 30px; + margin-left: 25%; + margin-top: 10px; + background-color: red; + color: white; + border: none; + border-radius: 5px; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/find.css b/demo_module/src/view/Shouye_tsl/CSS/find.css new file mode 100644 index 0000000000000000000000000000000000000000..d93d245cf549449376da6250cdf936e6d67ddda0 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/find.css @@ -0,0 +1,29 @@ +*{ + margin: 0; + padding: 0; +} +.find{ + width: 100vw; +} +.navf{ + width: 100%; + display: flex; + margin-top: 20px; +} +.navf1{ + width: 30%; + text-align: center; +} +.contentf{ + width: 100%; + height: 150px; + display: flex; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} +.contentf>img{ + width: 40%; + height: 80%; + margin-top: 5%; +} + diff --git a/demo_module/src/view/Shouye_tsl/CSS/gift.css b/demo_module/src/view/Shouye_tsl/CSS/gift.css new file mode 100644 index 0000000000000000000000000000000000000000..1054b3ab4ff4ee322bfe200b103d23a0ad60850b --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/gift.css @@ -0,0 +1,31 @@ +.gift{ + width: 100vw; +} +.gift_top{ + width: 100%; + height: 50px; + border-top: 1px solid gainsboro; + border-bottom: 1px solid gainsboro; + display: flex; + font-size: 26px; + line-height: 50px; +} +.gift_bottom{ + width: 100vw; +} +img{ + width: 60%; + height: 70px; + margin-left: 20%; + margin-top: 20px; +} +.wexin{ + width:90%; + height: 300px; + background-color: #fff; + border-radius: 10px; + text-align: center; +} +.wexin p{ + margin-top: 20px; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/hand.css b/demo_module/src/view/Shouye_tsl/CSS/hand.css new file mode 100644 index 0000000000000000000000000000000000000000..60eac1aeb69cf49ea2526659f1759d2de9cc2281 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/hand.css @@ -0,0 +1,18 @@ +.hand{ + width: 100vw; +} +.hand_top{ + width: 100%; + height: 50px; + display: flex; + background-color: gainsboro; + line-height: 50px; +} +.hand_content{ + width: 100vw; + text-align: center; +} +img{ + width: 90vw; + margin: 20px auto; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/index.css b/demo_module/src/view/Shouye_tsl/CSS/index.css new file mode 100644 index 0000000000000000000000000000000000000000..3ccf234e11da113468c5bf298371b497ea916d3e --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/index.css @@ -0,0 +1,26 @@ +.index{ + width: 100vw; +} +.top{ + width: 100%; + height: 50px; + line-height: 50px; + background-color: red; + color: white; +} +ul{ + width: 60vw; + height: 50px; + margin: auto; + display: flex; + justify-content: space-between; +} +ul li{ + list-style: none; + width:30%; + line-height: 50px; + font-size: large; +} +.active{ + color: red; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/mianshi.css b/demo_module/src/view/Shouye_tsl/CSS/mianshi.css new file mode 100644 index 0000000000000000000000000000000000000000..da1f993d986edda3a4ac053709b5811552e69b6d --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/mianshi.css @@ -0,0 +1,55 @@ +*{ + margin: 0; + padding: 0; +} +.index{ + width: 100vw; +} +.top{ + width: 100%; + height: 50px; + line-height: 50px; + background-color: red; + color: white; +} +ul{ + width: 100vw; + height: 50px; + margin: auto; + display: flex; + justify-content: space-around; + background-color: white; +} +ul li{ + list-style: none; + width:30%; + line-height: 50px; + text-align: center; + font-size: large; +} +.active{ + color: red; +} +.mianshi{ + width: 100vw; +} +.ul1{ + width: 65vw; + height: 50px; + margin-top: 20px; + margin-left: 20px; + display: flex; + justify-content: space-around; +} +.ul1 li{ + height: 50px; + line-height: 50px; +} + +.contentm{ + width: 100%; + height: 150px; + font-size: small; + margin-top: 30px; + border-bottom: 1px solid gainsboro; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/mock-request.tsx b/demo_module/src/view/Shouye_tsl/CSS/mock-request.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b6161848a5702e7cf33578e38b4c35763f56d822 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/mock-request.tsx @@ -0,0 +1,21 @@ +import { sleep } from 'antd-mobile/es/utils/sleep' + +let count = 0 + +export async function mockRequest() { + if (count >= 5) { + return [] + } + await sleep(1000) + count++ + return [ + { name: '2020【各省公务员】面试班(线下课程)', bprice: 199, aprice: 96.00, num: 45343,status:"全部",state:'线上课程' }, + { name: '2020【各省公务员】面试班(线下课程)', bprice: 199, aprice: 96.00, num: 45343,status:"全部",state:'线下课程' }, + { name: '2020【各省公务员】面试资料', bprice: 199, aprice: 96.00, num: 45343,status:"全部",state:'面试资料' }, + { name: '2020【各省公务员】面试班(线下课程)', bprice: 199, aprice: 96.00, num: 45343,status:"结构化",state:'线下课程' }, + { name: '2020【各省公务员】面试班(线下课程)', bprice: 199, aprice: 96.00, num: 45343,status:"非结构化",state:'面试资料' }, + { name: '2020【各省公务员】面试资料', bprice: 199, aprice: 96.00, num: 45343,status:"结构化",state:'面试资料' }, + { name: '2020【各省公务员】面试班(线下课程)', bprice: 199, aprice: 96.00, num: 45343,status:"非结构化",state:'线下课程' }, + { name: '2020【各省公务员】面试资料', bprice: 199, aprice: 96.00, num: 45343,status:"结构化",state:'线下课程' } + ] +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/question.css b/demo_module/src/view/Shouye_tsl/CSS/question.css new file mode 100644 index 0000000000000000000000000000000000000000..73df8a0bb00503228aa11f9da80412fbb24157d5 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/question.css @@ -0,0 +1,64 @@ +.top{ + width: 100vw; + height: 50px; + border-bottom: 1px solid gray; + display: flex; + justify-content: space-between; + line-height: 50px; +} +.quest{ + width: 100%; + border-bottom: 1px solid black; +} +.answer{ + width: 100%; + height: 440px; + margin-top: 20px; + background-color: white; +} +.answer>P{ + height: 26px; + border-left: 5px solid red; + line-height: 26px; + font-weight: bold; + margin-left: 10px; + font-size: large; +} +.jindou{ + width: 80%; + height: 300px; + background-color: #fff; + border-radius: 10px; + text-align: center; +} +.jindou>button{ + width: 100px; + height: 40px; + border: none; + border-radius: 20px; + font-size: large; +} + +.footer{ + width: 100vw; + height: 50px; + position: fixed; + bottom: 0px; + left:0; + background-color: white; + border-top: 1px solid black; + display: flex; + justify-content: space-between; +} +.footer p{ + width: 40%; + font-size: large; +} +.footer button{ + margin-left: 20px; + height: 30px; + width: 50px; + margin-top: 10px; + border-radius: 15px; + border: 1px solid red; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/shenlun.css b/demo_module/src/view/Shouye_tsl/CSS/shenlun.css new file mode 100644 index 0000000000000000000000000000000000000000..aeb174398128c402872ecb8e5ba7a5e5232aae98 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/shenlun.css @@ -0,0 +1,67 @@ +.index{ + width: 100vw; +} +.top{ + width: 100%; + height: 50px; + line-height: 50px; + background-color: red; + color: white; +} +ul{ + width: 100vw; + height: 50px; + margin: auto; + display: flex; + justify-content: space-around; +} +ul li{ + list-style: none; + width:33%; + line-height: 50px; + font-size: large; + text-align: center; + background-color: white; +} +.active{ + color: red; +} +.shenlun{ + width: 100vw; +} +.shenlun1{ + width: 98vw; + background-color: rgb(245,245,245); + margin: 50px auto; + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} +.content2{ + width: 30%; + height: 100px; + background-color: white; + margin-top: 10px; + text-align: center; + font-size: large; +} +.content2 button{ + width: 40%; + height: 26px; + line-height: 26px; + border-radius: 13px; + border: none; + color: blue; + background-color: rgb(238,245,253); +} +.teacher{ + width: 100%; + height: 50px; + background-color: white; + position: fixed; + bottom: 50px; + left:0; + text-align: center; + font-size:40px; + display: flex; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/shenluncate.css b/demo_module/src/view/Shouye_tsl/CSS/shenluncate.css new file mode 100644 index 0000000000000000000000000000000000000000..79ab30a1aa333c54984ebfa57d93d6c86e77902e --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/shenluncate.css @@ -0,0 +1,32 @@ +*{ + margin: 0; + padding: 0; +} +.tops{ + width: 100%; + height: 50px; + border-bottom: 1px solid gray; + font-size: x-large; + line-height: 50px; + font-weight: bolder; +} +.contents{ + width: 100%; + height: 60px; + display: flex; + justify-content: space-between; +} +.left{ + width: 70%; + height: 100%; + border-bottom: 1px solid #76c6b8; +} + +.right{ + width: 20%; + height: 100%; + border-bottom: 1px solid #76c6b8; + text-align: center; + font-size: small; + color: #76c6b8; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/test.css b/demo_module/src/view/Shouye_tsl/CSS/test.css new file mode 100644 index 0000000000000000000000000000000000000000..c05059ccf6fa84178e02e5e114782a286b48034a --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/test.css @@ -0,0 +1,29 @@ +.test{ + width: 100vw; +} +.topt{ + width: 100%; + height: 50px; + border-bottom: 1px solid gray; + background-color: white; + line-height: 50px; + display: flex; +} +.footer1{ + width: 100%; + height: 50px; + background-color: white; + position: fixed; + bottom: 0; + left:0; +} +.footer1 button{ + width: 100px; + height: 30px; + margin-top: 10px; + margin-left: 20px; + border-radius: 15px; + border: 1px solid red; + color: red; + background-color: rgb(241,241,241); +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/xianshang.css b/demo_module/src/view/Shouye_tsl/CSS/xianshang.css new file mode 100644 index 0000000000000000000000000000000000000000..e2f4cdd5e904485840ba076b5f7a8ad62948e963 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/xianshang.css @@ -0,0 +1,26 @@ +.xianshang{ + width: 100vw; +} +img{ + width: 100%; +} +.commit{ + width: 100vw; + height: 100px; + display: flex; +} +.left{ + width: 30%; + height: 100%; +} +.left>img{ + width: 80px; + height: 80px; + border-radius: 50%; + margin-top: 10px; +} +.right{ + width: 70%; + height: 100%; + font-size: large; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/CSS/zhaokao.css b/demo_module/src/view/Shouye_tsl/CSS/zhaokao.css new file mode 100644 index 0000000000000000000000000000000000000000..982936c7154f8b70b452347d78d48d7fd95287f8 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/CSS/zhaokao.css @@ -0,0 +1,15 @@ +.nav{ + width: 100vw; + display: flex; + margin-top: 20px; +} +.nav1{ + width: 30%; + text-align: center; +} +.list{ + width: 100vw; + height: 100px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Card.jsx b/demo_module/src/view/Shouye_tsl/Card.jsx new file mode 100644 index 0000000000000000000000000000000000000000..f1e8dac65c9f2c99b11b4e31d542a109f4295faf --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Card.jsx @@ -0,0 +1,119 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import { useSearchParams } from "react-router-dom"; +import { ArrowLeft } from '@react-vant/icons' +import axios from "axios"; +import './CSS/card.css' +export default function Card() { + const [flag, setFlag] = useState(false) + const [searchParams, setSearchParams] = useSearchParams() + const id = searchParams.get('id') + const navigate = useNavigate(); + const [questions, setQuestions] = useState([]) + const [aname, setAname] = useState([]) + + useEffect(() => { + getArea() + getQuestions() + }, []) + + const getArea = () => { + axios.post(`http://localhost:3000/areacate?id=${id}`).then(res => { + setAname(res.data.data) + }) + } + const getQuestions = () => { + axios.post(`http://localhost:3000/question?id=${id}`).then(res => { + setQuestions(res.data.data) + }) + } + console.log(questions) + return ( +
+
+ navigate('/question')} /> +

答题卡

+ +
+
+

{aname.name}

+
+
+ {questions.map(item => { + return ( + <> +
0?'main3':'main3Act'}> +

1

+
+

{item.myAnswer1.length}个字

+ + ) + })} +
+
+ {questions.map(item => { + return ( + <> +
0?'main3':'main3Act'}> +

1

+
+

{item.myAnswer2.length}个字

+ + ) + })} +
+
+ {questions.map(item => { + return ( + <> +
0?'main3':'main3Act'}> +

1

+
+

{item.myAnswer3.length}个字

+ + ) + })} +
+
+ {questions.map(item => { + return ( + <> +
0?'main3':'main3Act'}> +

1

+
+

{item.myAnswer4.length}个字

+ + ) + })} +
+
+ {questions.map(item => { + return ( + <> +
0?'main3':'main3Act'}> +

1

+
+

{item.myAnswer5.length}个字

+ + ) + })} +
+
+
+ {flag ? (
+
+

名师批阅次数不足

+
+
+
暂不续费
+
navigate('/buy')}>去续费
+
+
) : (
)} +
+ {flag ? (<>) : ()} + +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Find.jsx b/demo_module/src/view/Shouye_tsl/Find.jsx new file mode 100644 index 0000000000000000000000000000000000000000..b4be2b10a1e79b2090a59162b9521a329fbdf345 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Find.jsx @@ -0,0 +1,46 @@ +import React, { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import f1 from './imgs/f1.png' +import { Tabbar, Sticky } from 'react-vant' +import { WapHomeO, OrdersO, BrowsingHistoryO, Contact } from '@react-vant/icons' +import { EyeOutline } from 'antd-mobile-icons' +import './CSS/find.css' +export default function Find() { + const navigate = useNavigate() + const [name, setName] = useState('find') + const [list, setList] = useState([ + { id: 1, name: "不断提升完善的秘密之习惯七招考的密码...", num: '5000', time: '2020-07-13' }, + { id: 2, name: "情绪管理--你要学会的几件事", num: '5000', time: '2020-07-13' }, + { id: 3, name: "不断提升完善的秘密之习惯七招考的密码...", num: '5000', time: '2020-07-13' }, + { id: 4, name: "情绪管理--你要学会的几件事", num: '5000', time: '2020-07-13' }, + { id: 5, name: "不断提升完善的秘密之习惯七招考的密码...", num: '5000', time: '2020-07-13' }, + ]) + return ( +
+

发现

+
+
推荐
+
{ navigate('/zhaokao') }}>招考
+
分类名称
+
+
+ {list.map(item => { + return
{ navigate('/findxiang') }}> + +
+

{item.name}

+

{item.num}|{item.time}

+
+
+ })} +
+ + + } onClick={() => { navigate('/homepage') }}>首页 + }>课程 + } onClick={() => { navigate('/find') }}>发现 + } onClick={() => { navigate('/mine') }} >我的 + +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Findxiang.jsx b/demo_module/src/view/Shouye_tsl/Findxiang.jsx new file mode 100644 index 0000000000000000000000000000000000000000..2eeacc9b21a17468c34115e34430b6170181306d --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Findxiang.jsx @@ -0,0 +1,23 @@ +import React from "react"; +import f1 from './imgs/f1.png' +import { useNavigate } from "react-router-dom"; +import { LeftOutline,EyeOutline } from 'antd-mobile-icons' +export default function Findxiang() { + const navigate = useNavigate() + return( +
+
+ < LeftOutline style={{fontSize:"30px",marginTop:"10px"}} onClick={()=>{navigate('/find')}}/> +

发现

+
+
+

不断提升完善的秘密之习惯七 招考的密码...

+

5000|2020.07.13

+

        引导语:没有完美的人生,也没有完美的社会,更没有完美的自己,我们要以平和的心态,宽容的对待人生,用美好的眼 + 光看待世界,世界就是美好的。我们要坚定的相信,你能多拯救自己!要自信、自强,如果不能自己拯救自己,将永远摆脱 + 不了自己失败的阴影。

+ +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Gift.jsx b/demo_module/src/view/Shouye_tsl/Gift.jsx new file mode 100644 index 0000000000000000000000000000000000000000..3420325a8f4cd2124ac59cfe2ff419b6d39c487d --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Gift.jsx @@ -0,0 +1,69 @@ +import React, { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { ArrowLeft } from "@react-vant/icons"; +import { Overlay } from 'react-vant'; +import g1 from './imgs/g1.png' +import g2 from './imgs/g2.png' +import g3 from './imgs/g3.png' +import './CSS/gift.css' + +export default function Gift() { + const navigate = useNavigate(); + const [num, setNum] = useState(2008568) + const [flag, setFlag] = useState(false) + const [visible, setVisible] = useState(false) + const next = () => { + setNum(2008569) + setFlag(true) + } + const addwei = () => { + setVisible(false) + setFlag(false) + } + + return ( +
+
+ {navigate('/homepage')}} /> +

辅导老师帮你高效提分

+
+ {!flag ? (
+ +

+ +

+ +

+ +

+
) : (
+ +

你的辅导员微信号:fdy334455

+

+ +

+ setVisible(false)} + style={{ + height: '100%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }}> +
+

已复制微信号

+

①点击微信右上角添加朋友

+

  粘贴微信号  并申请添加

+

+ +

+
+
+
)} + +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Hand.jsx b/demo_module/src/view/Shouye_tsl/Hand.jsx new file mode 100644 index 0000000000000000000000000000000000000000..fabb862242ad7fbf29e6a142405ae21f8fc063ca --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Hand.jsx @@ -0,0 +1,25 @@ +import React from "react"; +import { useNavigate } from "react-router-dom"; +import { ArrowLeft } from '@react-vant/icons' +import b1 from './imgs/b1.png' +import "./CSS/hand.css"; +export default function Hand() { + const navigate = useNavigate(); + return ( +
+
+ navigate('/buy')} /> +

交卷

+
+
+ +

提交成功!

+

请等待教师批阅,批阅结果可在“我的”-“我的批阅”里面查看

+ +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Index.jsx b/demo_module/src/view/Shouye_tsl/Index.jsx new file mode 100644 index 0000000000000000000000000000000000000000..3e696c1e4f2c1c64273499fc14c7f164968960ce --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Index.jsx @@ -0,0 +1,31 @@ +import React, { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import './CSS/index.css' +export default function Index() { + let navigate = useNavigate() + const [flag,setFlag] = useState('hangce') + const goHangce=()=>{ + setFlag('hangce') + navigate('/index') + } + const goShenlun=()=>{ + setFlag('shenlun') + navigate('/shenlun') + } + const goMianshi=()=>{ + setFlag('mianshi') + navigate('/mianshi') + } + return ( +
+
+ 恩师教育 +
+
    +
  • 行测
  • +
  • 申论
  • +
  • 面试
  • +
+
+ ) +} diff --git a/demo_module/src/view/Shouye_tsl/Mianshi.jsx b/demo_module/src/view/Shouye_tsl/Mianshi.jsx new file mode 100644 index 0000000000000000000000000000000000000000..05a18271047445a048ac46b55856dc3d0a6c4589 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Mianshi.jsx @@ -0,0 +1,133 @@ +import React, { useState } from "react"; +import p1 from './imgs/p1.png' +import p2 from './imgs/p2.png' +import p3 from './imgs/p3.png' +import p4 from './imgs/p4.png' +import { useNavigate } from "react-router-dom"; +import { Tabbar, Sticky } from 'react-vant' +import { WapHomeO, OrdersO, BrowsingHistoryO, Contact } from '@react-vant/icons' +import { InfiniteScroll } from 'antd-mobile' +import { mockRequest } from './CSS/mock-request' +import './CSS/mianshi.css' +export default function Mianshi() { + let navigate = useNavigate() + const [list, setList] = useState([]) + const [key, setKey] = useState('全部') + const [hasMore, setHasMore] = useState(true) + async function loadMore() { + const append = await mockRequest() + setList(val => [...val, ...append]) + setHasMore(append.length > 0) + } + const [flag, setFlag] = useState('mianshi') + const goHangce = () => { + setFlag('hangce') + navigate('/homepage/test') + } + const goShenlun = () => { + setFlag('shenlun') + navigate('/shenlun') + } + const goMianshi = () => { + setFlag('mianshi') + navigate('/mianshi') + } + const goxiang = (item)=>{ + if(item=='线上课程'){ + navigate('/xianshang') + }else if(item=='线下课程'){ + navigate('/xianxia') + }else if(item=='面试资料'){ + navigate('/ziliao') + } + } + return ( + <> + +
+
+ 恩师教育 +
+
    +
  • 行测
  • +
  • 申论
  • +
  • 面试
  • +
+
+
+ +
+ +
+
    +
  • {setKey('全部')}} className={key==='全部'?'active':''}>全部
  • +
  • {setKey('结构化')}} className={key==='结构化'?'active':''}>结构化
  • +
  • {setKey('非结构化')}} className={key==='非结构化'?'active':''}>非结构化
  • +
+
{navigate('/xianshang')}}> +

2020年【各省公务员】面试全程班合集(线上课程)

+

+ + + 免费 +

+
+
+ +

苏晓宇

+
+
+ +

吕雪飞

+
+
+ +

刘俊堂

+
+

限领取3000人 已领2589人

+
+
+ {list.filter(item1=>item1.status==key).map((item, index) => ( +
{goxiang(item.state)}}> +

{item.name}

+

+ + + ¥{item.bprice} + ¥{item.aprice} +

+
+
+
+ +

苏晓宇

+
+
+ +

吕雪飞

+
+
+ +

刘俊堂

+
+
+

剩余29天19:56:49结束

+

45343购买

+
+ +
+
+
+ ))} + +
+ + }>首页 + }>课程 + } onClick={()=>{navigate('/find')}}>发现 + } onClick={()=>{navigate('/mine')}}>我的 + +
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Question.jsx b/demo_module/src/view/Shouye_tsl/Question.jsx new file mode 100644 index 0000000000000000000000000000000000000000..c4d05ed8ba3658b2d0853ebcc3b6f260a71968ec --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Question.jsx @@ -0,0 +1,254 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import { useSearchParams } from "react-router-dom"; +import { ArrowLeft } from '@react-vant/icons' +import { Tabs } from 'antd-mobile' +import { FillinOutline } from 'antd-mobile-icons' +import { ArrowDown, ArrowUp } from '@react-vant/icons'; +import { Overlay } from 'react-vant'; +import axios from "axios"; +import './CSS/question.css' +export default function Question() { + const [timeLeft, setTimeLeft] = useState(1800) + const [flag5, setFlag5] = useState(false) + const [flag1, setFlag1] = useState(false) + const [flag2, setFlag2] = useState(false) + const [flag3, setFlag3] = useState(false) + const [flag4, setFlag4] = useState(false) + const [status, setStatus] = useState(false) + const [visible, setVisible] = useState(false) + const [num,setNum] = useState(4) + const [searchParams, setSearchParams] = useSearchParams() + const [questions, setQuestions] = useState([]) + const [text1,setText1] = useState('') + const [text2,setText2] = useState('') + const id = searchParams.get('id') + const navigate = useNavigate() + useEffect(() => { + getQuestions() + },[]) + useEffect(() => { + if(timeLeft<0){ + console.log('考试时间结束,请立即交卷') + navigate('/card') + return + } + const timer = setTimeout(() => { + setTimeLeft(timeLeft - 1) + },1000) + return () => clearTimeout(timer) + }, [timeLeft]) + const formatTime = (seconds)=>{ + const minutes = Math.floor(seconds / 60) + const secs = seconds % 60 + return `${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}` + } + + const getQuestions = () => { + axios.post(`http://localhost:3000/question?id=${id}`).then(res => { + setQuestions(res.data.data) + }) + } + const isShow1 = ()=>{ + setFlag1(!flag1) + setNum(num-1) + if(num<0){ + setVisible(true) + } + } + const isShow2 = ()=>{ + setFlag2(!flag2) + setNum(num-1) + } + const isShow3 = ()=>{ + setFlag3(!flag3) + setNum(num-1) + } + const isShow4 = ()=>{ + setFlag4(!flag4) + setNum(num-1) + } + const isShow5 = ()=>{ + setFlag5(!flag5) + setNum(num-1) + } + const jia = ()=>{ + setNum(4) + setVisible(false) + } + const submit=()=>{ + axios.post(`http://localhost:3000/answer1?id=${id}`,{text1,text2}).then(res=>{ + getQuestions() + setStatus(false) + setTimeLeft(1800) + navigate(`/card?id=${id}`) + setText1('') + setFlag1(false) + setFlag2(false) + setFlag3(false) + setFlag4(false) + setFlag5(false) + }) + + } + return ( +
+
+ +

{formatTime(timeLeft)}

+

{ submit()}}>提交

+
+
+ + + {questions.map((item) => { + return

+ {item.question1} +

+ }) + } + {status?(<> + ):(<> +
+

{isShow1()}}>  参考答案 + {flag1?(<>):(<>)} +

+ {flag1?(
+ {questions.map((item) => { + return

+ {item.answer1} +

+ }) + } +
):(
)} +
+ )} + +
+ + {questions.map((item) => { + return

+ {item.question2} +

+ }) + } + {status?(<> + ):(<> +
+

{isShow2()}}>  参考答案 + {flag2?(<>):(<>)} +

+ {flag2?(
+ {questions.map((item) => { + return

+ {item.answer2} +

+ }) + } +
):(
)} +
+ )} + +
+ + {questions.map((item) => { + return

+ {item.question3} +

+ }) + } +
+

{isShow3()}}>  参考答案 + {flag3?(<>):(<>)} +

+ {flag3?(
+ {questions.map((item) => { + return

+ {item.answer3} +

+ }) + } +
):(
)} +
+
+ + {questions.map((item) => { + return

+ {item.question4} +

+ }) + } +
+

{isShow4()}}>  参考答案 + {flag4?(<>):(<>)} +

+ {flag4?(
+ {questions.map((item) => { + return

+ {item.answer4} +

+ }) + } +
):(
)} +
+
+ + {questions.map((item) => { + return

+ {item.question5} +

+ }) + } +
+

{isShow5()}}>  参考答案 + {flag5?(<>):(<>)} +

+ {flag5?(
+ {questions.map((item) => { + return

+ {item.answer5} +

+ }) + } +
):(
)} +
+
+
+ setVisible(false)} + style={{ + height: '100%', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }}> +
+

免费次数已用完,是否使用状元豆进行次数抵扣

+ + +
+
+
+
+

+ + +

+

{ setStatus(true) }}> + {status?(<>):(<>输入答案)} +      + +      + A +

+ +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Shenlun.jsx b/demo_module/src/view/Shouye_tsl/Shenlun.jsx new file mode 100644 index 0000000000000000000000000000000000000000..309dc4bc0e5968c54f7ac21c72286384522ed285 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Shenlun.jsx @@ -0,0 +1,72 @@ +import React, { useState,useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import axios from "axios"; +import p1 from './imgs/p1.png' +import { Tabbar, Sticky } from 'react-vant' +import { WapHomeO, OrdersO, BrowsingHistoryO, Contact, UserO } from '@react-vant/icons' +import './CSS/shenlun.css' +export default function Shenlun() { + const navigate = useNavigate() + const [flag, setFlag] = useState('shenlun') + const goHangce = () => { + setFlag('hangce') + navigate('/homepage') + } + const goShenlun = () => { + setFlag('shenlun') + navigate('/shenlun') + } + const goMianshi = () => { + setFlag('mianshi') + navigate('/mianshi') + } + const [list, setList] = useState([]) + useEffect(() => { + getArea() + },[]) + const getArea=()=>{ + axios.get('http://localhost:3000/area').then(res => { + setList(res.data.data) + }) + } + return ( + <> + +
+
+ 恩师教育 +
+
    +
  • 行测
  • +
  • 申论
  • +
  • 面试
  • +
+
+
+ +
+ +
+ {list.map(item => ( +
navigate(`/cate?id=${item._id}`)}> +

{item.name}

+ +
+ ))} +
+
+ navigate('/gift')} /> + +
+ + }>首页 + }>课程 + } onClick={()=>{navigate('/find')}}>发现 + } onClick={()=>{navigate('/mine')}}>我的 + +
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/ShenlunCate.jsx b/demo_module/src/view/Shouye_tsl/ShenlunCate.jsx new file mode 100644 index 0000000000000000000000000000000000000000..47924fa6099b81a4f69b82619dbaca2de6f9c78c --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/ShenlunCate.jsx @@ -0,0 +1,43 @@ +import React,{useState,useEffect} from "react"; +import { useNavigate } from "react-router-dom"; + +import axios from "axios"; + +import { TextOutline,LeftOutline } from 'antd-mobile-icons' +import './CSS/shenluncate.css' + +export default function Cate() { + const navigate = useNavigate() + const [list,setList] = useState([]) + + useEffect(()=>{ + getareaCate() + },[]) + const getareaCate =()=>{ + axios.get('http://localhost:3000/areaCate').then(res=>{ + setList(res.data.data) + } + ) + } + + return ( +
+
+ navigate('/shenlun')}/> +
+
+ {list.map(item=>( +
+
+

  {item.name}

+
+
+ +

navigate(`/test1?id=${item._id}`)}>查看真题

+
+
+ ))} +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Test.jsx b/demo_module/src/view/Shouye_tsl/Test.jsx new file mode 100644 index 0000000000000000000000000000000000000000..7034728518f5e5e4c87ba746a175e1b376390205 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Test.jsx @@ -0,0 +1,92 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import { useSearchParams } from "react-router-dom"; +import { Sticky } from 'react-vant' +import { Tabs } from 'antd-mobile' +import { TextOutline, LeftOutline } from 'antd-mobile-icons' +import './CSS/test.css' +import axios from "axios"; + +export default function Test() { + const navigate = useNavigate() + const [searchParams, setSearchParams] = useSearchParams() + const id = searchParams.get('id') + const [aname, setAname] = useState([]) + const [questions, setQuestions] = useState([]) + useEffect(() => { + getArea() + getQuestions() + }, []) + const getArea = () => { + axios.post(`http://localhost:3000/areacate?id=${id}`).then(res => { + setAname(res.data.data) + }) + } + const getQuestions = () => { + axios.post(`http://localhost:3000/question?id=${id}`).then(res => { + setQuestions(res.data.data) + }) + } + return ( +
+ +
+ navigate('/shenlun')} style={{ marginTop: '10px', fontSize: "26px" }} /> +

{aname.name}

+
+
+ + + + {questions.map((item) => { + return

+          + {item.cai1} +

+ }) + } +
+ + {questions.map((item) => { + return

+          + {item.cai2} +

+ }) + } +
+ + {questions.map((item) => { + return

+          + {item.cai3} +

+ }) + } +
+ + {questions.map((item) => { + return

+          + {item.cai4} +

+ }) + } +
+ + {questions.map((item) => { + return

+          + {item.cai5} +

+ }) + } +
+
+
+ + +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Xianshang.jsx b/demo_module/src/view/Shouye_tsl/Xianshang.jsx new file mode 100644 index 0000000000000000000000000000000000000000..951f566b7603d1eb5356a908e53dc6059a69da9f --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Xianshang.jsx @@ -0,0 +1,69 @@ +import React, { useState } from "react"; +import { Toast, NavBar } from 'react-vant' +import { useNavigate } from "react-router-dom"; +import { SendOutline } from 'antd-mobile-icons' +import x1 from './imgs/x1.png' +import x2 from './imgs/x2.png' +import p2 from './imgs/p2.png' +import p3 from './imgs/p3.png' +import p4 from './imgs/p4.png' +import { CartO, ServiceO } from '@react-vant/icons' +import { ActionBar } from 'react-vant' +import './CSS/xianshang.css' +export default function Xiang() { + const navigate = useNavigate() + return ( +
+ navigate('/mianshi')} + rightText={} + onClickRight={() => Toast('按钮')} + /> + + +
+

课程评价

+
+
+ +
+
+

吕赵琨

+

2020.07.07 19:58

+

干货满满的课堂

+
+
+
+
+ +
+
+

周小米

+

2020.07.09 19:40

+

谢谢老师,收获很大!

+
+
+
+
+ +
+
+

Troy

+

2020.07.09 09:47

+

课程超赞,强烈推荐!

+
+
+

到底了~~

+
+ + + } text='购物车' /> + } text='客服' /> + + + +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Xianxia.jsx b/demo_module/src/view/Shouye_tsl/Xianxia.jsx new file mode 100644 index 0000000000000000000000000000000000000000..dc86c5d630cd3e084ed4d451f8e84029e162a6c4 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Xianxia.jsx @@ -0,0 +1,71 @@ +import React, { useState } from "react"; +import { Toast, NavBar } from 'react-vant' +import { useNavigate } from "react-router-dom"; +import { SendOutline } from 'antd-mobile-icons' +import x1 from './imgs/x1.png' +import x2 from './imgs/x2.png' +import p2 from './imgs/p2.png' +import p3 from './imgs/p3.png' +import p4 from './imgs/p4.png' +import { CartO, ServiceO } from '@react-vant/icons' +import { ActionBar } from 'react-vant' +import './CSS/xianshang.css' +export default function Xianxia() { + const navigate = useNavigate() + return ( +
+ navigate('/mianshi')} + rightText={} + onClickRight={() => Toast('按钮')} + /> + +

+ 此处的课程介绍,由后台上传,若是线下课程,可告诉学员线下授课时间、地点 +

+
+

课程评价

+
+
+ +
+
+

吕赵琨

+

2020.07.07 19:58

+

干货满满的课堂

+
+
+
+
+ +
+
+

周小米

+

2020.07.09 19:40

+

谢谢老师,收获很大!

+
+
+
+
+ +
+
+

Troy

+

2020.07.09 09:47

+

课程超赞,强烈推荐!

+
+
+

到底了~~

+
+ + + } text='购物车' /> + } text='客服' /> + + + +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Zhaokao.jsx b/demo_module/src/view/Shouye_tsl/Zhaokao.jsx new file mode 100644 index 0000000000000000000000000000000000000000..9a0a897ec96038bffe139b049a3e19d3640f72bd --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Zhaokao.jsx @@ -0,0 +1,32 @@ +import React,{useState} from "react"; +import { useNavigate } from "react-router-dom"; +import { FilterOutline } from 'antd-mobile-icons' +import './CSS/zhaokao.css' +export default function Find() { + const navigate = useNavigate(); + const [list,setList] = useState([ + {id:1,name:"2020年沈阳市事业单位公开招聘人员869人公告",num:'1136',cate:'事业单位'}, + {id:2,name:"2020年沈阳示范大学招聘高层次人才和工作人员197人公告(第一批)",num:'1136',cate:'事业单位'}, + {id:3,name:"2020年沈阳师范大学招聘高层次人才和工作人员256人公告(第一批)",num:'1136',cate:'事业单位'}, + ]) + return( +
+

发现

+
+
{navigate('/find')}}>推荐
+
招考
+
分类名称
+
+

筛选

+ {list.map(item=>{ + return
{navigate('/zhaoxiang')}}> +

{item.name}

+

{item.cate}|浏览{item.num} + +

+
+ }) + } +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Zhaoxiang.jsx b/demo_module/src/view/Shouye_tsl/Zhaoxiang.jsx new file mode 100644 index 0000000000000000000000000000000000000000..5bbc30bd761b2648ebd71c5e66033c3b69ceb5d9 --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Zhaoxiang.jsx @@ -0,0 +1,20 @@ +import React from "react"; +import z1 from './imgs/z1.png' +import z2 from './imgs/z2.png' +import { useNavigate } from "react-router-dom"; +import { LeftOutline} from 'antd-mobile-icons' +export default function Findxiang() { + const navigate = useNavigate() + return( +
+
+ < LeftOutline style={{fontSize:"30px",marginTop:"10px"}} onClick={()=>{navigate('/zhaokao')}}/> +

招考

+
+
+ + +
+
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/Ziliao.jsx b/demo_module/src/view/Shouye_tsl/Ziliao.jsx new file mode 100644 index 0000000000000000000000000000000000000000..2135f42c7bbf7ae7de0839bd01f82df24783ccbe --- /dev/null +++ b/demo_module/src/view/Shouye_tsl/Ziliao.jsx @@ -0,0 +1,78 @@ +import React, { useState } from "react"; +import { Toast, NavBar } from 'react-vant' +import { useNavigate } from "react-router-dom"; +import { SendOutline,DownlandOutline } from 'antd-mobile-icons' +import {Description } from '@react-vant/icons'; + +import x1 from './imgs/x1.png' +import p2 from './imgs/p2.png' +import p3 from './imgs/p3.png' +import p4 from './imgs/p4.png' +import { CartO, ServiceO } from '@react-vant/icons' +import { ActionBar } from 'react-vant' +import './CSS/xianshang.css' +export default function Ziliao() { + const navigate = useNavigate() + return ( +
+ navigate('/mianshi')} + rightText={} + onClickRight={() => Toast('按钮')} + /> + +
+ +
+

2020年公务员面试技巧合计

+

下载次数:2780万

+
+ {Toast("请先报名")}} + style={{fontSize:"50px",color:"blue",marginTop:"25px",marginLeft:"30px"}}/> +
+
+

  课程评价

+
+
+ +
+
+

吕赵琨

+

2020.07.07 19:58

+

干货满满的课堂

+
+
+
+
+ +
+
+

周小米

+

2020.07.09 19:40

+

谢谢老师,收获很大!

+
+
+
+
+ +
+
+

Troy

+

2020.07.09 09:47

+

课程超赞,强烈推荐!

+
+
+

到底了~~

+
+ + + } text='购物车' /> + } text='客服' /> + + + +
+ ) +} \ No newline at end of file diff --git a/demo_module/src/view/Shouye_tsl/imgs/b1.png b/demo_module/src/view/Shouye_tsl/imgs/b1.png new file mode 100644 index 0000000000000000000000000000000000000000..53e27f7b60fa14f6db4ba0dc86a175494223e439 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/b1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/f1.png b/demo_module/src/view/Shouye_tsl/imgs/f1.png new file mode 100644 index 0000000000000000000000000000000000000000..fa6ef87609227784359db74b8a56982c70a2a994 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/f1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/g1.png b/demo_module/src/view/Shouye_tsl/imgs/g1.png new file mode 100644 index 0000000000000000000000000000000000000000..11497426ae84620bc5912ede9be4ec938dd85b57 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/g1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/g2.png b/demo_module/src/view/Shouye_tsl/imgs/g2.png new file mode 100644 index 0000000000000000000000000000000000000000..2c0902f87776f86d91b7f53b370a3f418a15a3ab Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/g2.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/g3.png b/demo_module/src/view/Shouye_tsl/imgs/g3.png new file mode 100644 index 0000000000000000000000000000000000000000..115b4642d3a53c427fbb6e8d75da61685f27888c Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/g3.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/p1.png b/demo_module/src/view/Shouye_tsl/imgs/p1.png new file mode 100644 index 0000000000000000000000000000000000000000..6cf4b840a6779d3071fbd5d4480d63c7dc4a4626 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/p1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/p2.png b/demo_module/src/view/Shouye_tsl/imgs/p2.png new file mode 100644 index 0000000000000000000000000000000000000000..d017412d21a12b3e9105fc18bfb871f279de51b6 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/p2.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/p3.png b/demo_module/src/view/Shouye_tsl/imgs/p3.png new file mode 100644 index 0000000000000000000000000000000000000000..4476ee3822bb5b300e3b1f3f93b11791a23add12 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/p3.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/p4.png b/demo_module/src/view/Shouye_tsl/imgs/p4.png new file mode 100644 index 0000000000000000000000000000000000000000..10613069431ccfb2a2123c8dfa16159cf0214e43 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/p4.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/x1.png b/demo_module/src/view/Shouye_tsl/imgs/x1.png new file mode 100644 index 0000000000000000000000000000000000000000..c059da261069b9d5b5ef080382f2c35e7bc15876 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/x1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/x2.png b/demo_module/src/view/Shouye_tsl/imgs/x2.png new file mode 100644 index 0000000000000000000000000000000000000000..a18c2ad82a6c596a2ec162ab8f732ea320ee48c1 Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/x2.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/z1.png b/demo_module/src/view/Shouye_tsl/imgs/z1.png new file mode 100644 index 0000000000000000000000000000000000000000..da4b8ce3354dcf1e76b8cd174de527b3c3aff33f Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/z1.png differ diff --git a/demo_module/src/view/Shouye_tsl/imgs/z2.png b/demo_module/src/view/Shouye_tsl/imgs/z2.png new file mode 100644 index 0000000000000000000000000000000000000000..b58e29dcafb847dfd1117ff3e26a0a46c16c7aef Binary files /dev/null and b/demo_module/src/view/Shouye_tsl/imgs/z2.png differ diff --git a/demo_module/src/view/countdown/countdown.jsx b/demo_module/src/view/countdown/countdown.jsx new file mode 100644 index 0000000000000000000000000000000000000000..86c96a92293205f033c1fc93cc620fba74033157 --- /dev/null +++ b/demo_module/src/view/countdown/countdown.jsx @@ -0,0 +1,17 @@ +import React, { useState, useRef } from "react"; +import { } from 'react-router-dom' +import { Cell, CountDown } from '@nutui/nutui-react' + +export default function Countdown(props) { + const stateRef = useRef(props.time) + return ( + <> + + + + + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/answer.css b/demo_module/src/view/kfr/answer.css new file mode 100644 index 0000000000000000000000000000000000000000..cab624889c6ab211592387610358a074d3660a63 --- /dev/null +++ b/demo_module/src/view/kfr/answer.css @@ -0,0 +1,129 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.an_bo1{ + width: 100%; + height: 0.5rem; + background-color: rgb(235, 235, 235); +} +.an_bo2{ + width: 100%; + height: 6.5rem; + /* background-color: aquamarine; */ +} +.an_b2b1{ + width: 100%; + height: 3rem; + /* background-color: blueviolet; */ + display: flex; + justify-content: space-around; + align-items: center; + flex-wrap: wrap; +} +.an_b2b1b1{ + width: 0.8rem; + height: 0.7rem; + /* background-color: aqua; */ + display: flex; + justify-content: center; + align-items: center; + /* border-radius: 50%; */ +} +.an_b2b1b1 div{ + width: 0.4rem; + height: 0.4rem; + /* background-color: antiquewhite; */ + border-radius: 50%; + text-align: center; + line-height: 0.4rem; + border: 2px solid rgb(207, 207, 207); +} +.active1{ + color: white; + background-color: #4bcf68; +} +.active2{ + color: white; + background-color: red; +} +.an_bo3{ + width: 100%; + height: 0.65rem; + /* background-color: antiquewhite; */ + line-height: 0.65rem; + text-align: center; +} +.btn1{ + width: 3.6rem; + height: 0.43rem; + color: white; + background-color: red; + border: 0; + border-radius: 6px; +} +.overlayContent4 { + position: absolute; + top: 35%; + left: 50%; + display: flex; + flex-direction: column; + justify-content: space-around; + width: 3.8rem; + height: 3.6rem; + margin-top: -0.75rem; + margin-left: -1.90rem; + background: white; + /* border-radius: 16px; */ + } +.over4_bo1{ + width: 100%; + height: 0.6rem; + /* background-color: #4bcf68; */ +} +.over4_bo2{ + width: 100%; + height: 2.9rem; + /* background-color: aqua; */ + display: flex; + flex-direction: column; + justify-content: space-around; +} +.over4_bo2b1{ + width: 100%; + height: 0.7rem; + /* background-color: antiquewhite; */ + font-size: 0.3rem; + font-weight: 600; + text-align: center; + line-height: 0.7rem; +} +.over4_bo2b2{ + width: 100%; + height: 0.8rem; + /* background-color: blue; */ + font-size: 0.18rem; + font-weight: 600; +} +.over4_bo2b3{ + width: 100%; + height: 0.9rem; + /* background-color: blueviolet; */ + display: flex; + justify-content: space-around; +} +.btn2{ + width: 48%; + height: 0.6rem; + background-color: white; + color: red; + border: 3px solid red; +} +.btn3{ + width: 45%; + height: 0.6rem; + background-color: red; + color: white; + border: 0; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/answer.jsx b/demo_module/src/view/kfr/answer.jsx new file mode 100644 index 0000000000000000000000000000000000000000..22d53d72843e90fcb3d68a3819469cc85959e3a7 --- /dev/null +++ b/demo_module/src/view/kfr/answer.jsx @@ -0,0 +1,56 @@ +import React, { useState, useMemo } from "react"; +import { useNavigate, useLocation } from 'react-router-dom' +import './answer.css' +import { NavBar, Space, Toast } from 'antd-mobile' +import { Button, Mask } from 'antd-mobile' + +export default function Answer() { + const navigate = useNavigate() + const location = useLocation() + const list = location.state?.list || [] + const list1 = location.state?.list1 || [] + const [visible, setVisible] = useState(false) + const handleclick1=()=>{ + setVisible(false) + navigate('/topic') + } + return ( + <> +
{ navigate('/topic') }}> + 答题卡 +
+
+
+ { + list.map((ele, index) => { + return
+
{index + 1}
+ +
+ }) + } +
+
+
+ + setVisible(false)}> +
+
+
+
+ 您要重新练习吗? +
+
+ 重新练习会覆盖之前的练习进度呦~ +
+
+ + +
+
+
+
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/capacity.jsx b/demo_module/src/view/kfr/capacity.jsx new file mode 100644 index 0000000000000000000000000000000000000000..a40b155dc4770eb9e0d058d624647b596ccada85 --- /dev/null +++ b/demo_module/src/view/kfr/capacity.jsx @@ -0,0 +1,10 @@ +import React from "react"; +import {useNavigate} from 'react-router-dom' + +export default function Capacity(){ + return( + <> +

capacity

+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/index.css b/demo_module/src/view/kfr/index.css new file mode 100644 index 0000000000000000000000000000000000000000..83a79d6e9d07b4f80ce8061281ffec74890ea713 --- /dev/null +++ b/demo_module/src/view/kfr/index.css @@ -0,0 +1,79 @@ +*{ + margin: 0; + padding: 0; + list-style: none; + /* font-size: 18px; */ +} +.box1{ + width: 100%; + height: 0.8rem; + background-color: white; + position: -webkit-sticky; + position: sticky; + top: 0; + /* padding: 10px 0; */ + /* z-index: 1000; */ +} +.b1_top{ + width: 100%; + height: 0.4rem; + background-color:#e64240; +} +.b1_b1{ + width: 1rem; + height: 0.4rem; + /* background-color: rgb(51, 255, 0); */ + margin-left: 0.25rem; + font-size: 0.2rem; + display: flex; + flex-direction: column; + justify-content: space-around; +} +.b1b1b1{ + width: 1rem; + height: 0.3rem; + /* background-color: rgb(255, 255, 255); */ + text-align: left; + line-height: 0.3rem; + color: white; + font-weight: 600; +} +.b1b1b2{ + width: 0.2rem; + height: 0.03rem; + background-color: rgb(255, 255, 255); +} +.b1_bottom{ + width: 100%; + height: 0.4rem; + /* background-color: aqua; */ + display: flex; + justify-content: center; + align-items: center; + background-color: white; +} +.b1_bottom ul{ + width: 50%; + height: 0.4rem; + /* background-color: blueviolet; */ + display: flex; + justify-content: space-around; + align-items: center; + font-size: 0.18rem; +} +.box2{ + width: 100%; + /* background-color:rgb(3, 7, 245); */ +} +.active{ + color: red; +} +.content { + height: 120px; + color: #ffffff; + display: flex; + justify-content: center; + align-items: center; + font-size: 48px; + user-select: none; + } \ No newline at end of file diff --git a/demo_module/src/view/kfr/index.jsx b/demo_module/src/view/kfr/index.jsx new file mode 100644 index 0000000000000000000000000000000000000000..4fa52f2748a5b9ff2d32899561f656b5bbdc0cd8 --- /dev/null +++ b/demo_module/src/view/kfr/index.jsx @@ -0,0 +1,100 @@ +import React, { useState } from "react"; +import { useNavigate, Outlet } from 'react-router-dom' +import { Button, Space, Swiper, Toast } from 'antd-mobile' +import { Tabbar, Sticky } from 'react-vant' +import { WapHomeO, OrdersO, BrowsingHistoryO, Contact } from '@react-vant/icons' +// import { SwiperRef } from 'antd-mobile/es/components/swiper' +import './index.css' + +export default function Index() { + const navigate = useNavigate() + const [num, setnum] = useState(0) + const [list, setlist] = useState([ + { id: 1, name: "行测", path: '/homepage/test' }, + { id: 2, name: "申论", path: '/shenlun' }, + { id: 3, name: "面试", path: '/mianshi' } + ]) + const handleclick = (ele, index) => { + setnum(index) + navigate(ele.path) + } + + const colors = [ + { + id:1, + img:'/img/1.jpg' + }, + { + id:2, + img:'/img/3.jpg' + }, + { + id:3, + img:'/img/2.jpg' + }, + { + id:4, + img:'/img/4.jpg' + } + ] + + const items = colors.map((color, index) => ( + +
+ +
+
+ )) + + return ( + <> +
+
+
+
+ 恩师教育 +
+ +
+
+
+
    + { + list.map((ele, index) => { + return
  • handleclick(ele, index)} + className={num == index ? "active" : ""} + > + {ele.name} +
  • + }) + } +
+
+
+ + +
+ + {items} + +
+ + +
+ +
+ + }>首页 + }>课程 + } onClick={()=>{navigate('/find')}}>发现 + } onClick={()=>{navigate('/mine')}}>我的 + + + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/interview.jsx b/demo_module/src/view/kfr/interview.jsx new file mode 100644 index 0000000000000000000000000000000000000000..021ded246c1fd3924e91c20673aac5e3a3040d2f --- /dev/null +++ b/demo_module/src/view/kfr/interview.jsx @@ -0,0 +1,10 @@ +import React from "react"; +import {useNavigate} from 'react-router-dom' + +export default function Interview(){ + return ( + <> +

interview

+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/jiaojuan.css b/demo_module/src/view/kfr/jiaojuan.css new file mode 100644 index 0000000000000000000000000000000000000000..2e6a11dc8c4e5d20fe9602d86827b367e1db6bf7 --- /dev/null +++ b/demo_module/src/view/kfr/jiaojuan.css @@ -0,0 +1,39 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.ji_bo1b1{ + width: 100%; + height: 3.2rem; + /* background-color: antiquewhite; */ + margin-top: 0.4rem; +} +.ji_bo1b1 img{ + width: 100%; +} +.ji_bo1b2{ + width: 100%; + height: 1rem; + /* background-color: rgb(153, 153, 153); */ + margin-top: 0.3rem; + text-align: center; + line-height: 0.5rem; + font-size: 0.22rem; +} +.ji_bo1b3{ + width: 100%; + height: 1rem; + /* background-color: brown; */ + margin-top: 0.3rem; + text-align: center; + line-height: 0.8rem; +} +.ji_bo1b3 .bt8{ + width: 1.4rem; + height: 0.4rem; + border-radius: 5px; + border: 0; + background-color: red; + color: white; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/jiaojuan.jsx b/demo_module/src/view/kfr/jiaojuan.jsx new file mode 100644 index 0000000000000000000000000000000000000000..6ec679d0c2a7e2c77128a0a21efe202d691d1c74 --- /dev/null +++ b/demo_module/src/view/kfr/jiaojuan.jsx @@ -0,0 +1,28 @@ +import React,{useState} from "react"; +import {useNavigate,useLocation} from 'react-router-dom' +import './jiaojuan.css' +export default function Jiaojuan(){ + const navigate=useNavigate() + const location = useLocation() + const list = location.state?.list || [] + const arr = location.state?.arr || [] + // console.log(list) + const handleclick=()=>{ + navigate('/testreport',{state:{list,arr}}) + } + return ( + <> +
+
+ +
+
+ 您已经答完这套试题,太棒了! +
+
+ +
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/parse.css b/demo_module/src/view/kfr/parse.css new file mode 100644 index 0000000000000000000000000000000000000000..e30ebc15ba698a16e4478f4bc25b139c0dbefac3 --- /dev/null +++ b/demo_module/src/view/kfr/parse.css @@ -0,0 +1,164 @@ +*{ + margin: 0; + padding: 0; + list-style: none; +} +.pa_bo1{ + width: 100%; + height: 0.45rem; + background-color: rgb(231, 231, 231); +} + + +.pa_bo2{ + width: 100%; + height: 6.5rem; + /* background-color: antiquewhite; */ + display: flex; + flex-direction: column; + justify-content: space-between; +} +.pa_bo2b1{ + width: 100%; + height: 0.6rem; + /* background-color: aqua; */ + font-size: 0.16rem; + line-height: 0.4rem; + padding-left: 0.2rem 0rem; +} +.pa_bo2b1 span:nth-child(1){ + color: red; +} +.pa_bo2b2{ + width: 100%; + height: 2.3rem; + /* background-color: blue; */ +} +.pa_bo2b2 ul{ + width: 100%; + height: 2.4rem; + /* background-color: aqua; */ + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; +} +.pa_bo2b2 ul li{ + width: 96%; + height: 0.51rem; + /* background-color: blue; */ + display: flex; + justify-content: space-between; +} +.pa_bo2b2 ul li div:nth-child(1){ + width: 12%; + height: 0.48rem; + /* background-color: rgb(228, 58, 58); */ + line-height: 0.51rem; + text-align: center; + border-radius: 50%; + border: 2px solid rgb(202, 202, 202); +} +.active55{ + color: white; + background-color: #4bcf68; +} +.pa_bo2b2 ul li div:nth-child(2){ + width: 85%; + height: 0.51rem; + /* background-color: rgb(184, 184, 184); */ + line-height: 0.51rem; +} +.pa_bo2b3{ + width: 100%; + height: 3.1rem; + /* background-color: blueviolet; */ + display: flex; + flex-direction: column; + justify-content: space-around; + align-items: center; +} +.pa_bo2b3b1{ + width: 96%; + height: 0.4rem; + /* background-color: rgb(133, 133, 133); */ + line-height: 0.4rem; + font-size: 0.16rem; + font-weight: 600; +} +/* .pa_bo2b3b1 span:nth-child(1){ + font-weight: 600; +} */ +.pa_bo2b3b1 span:nth-child(2){ + color: red; +} +.pa_bo2b3b2{ + width: 96%; + height: 0.4rem; + /* background-color: aliceblue; */ + font-size: 0.16rem; + font-weight: 600; + line-height: 0.4rem; +} +/* .pa_bo2b3b2 span:nth-child(1){ + +} */ +.pa_bo2b3b2 span:nth-child(2){ + color: rgb(199, 199, 199); +} +.pa_bo2b3b3{ + width: 96%; + height: 2.2rem; + /* background-color: burlywood; */ + display: flex; + justify-content: center; + align-items: center; +} +.pa_bo2b3b3 textarea{ + width: 99%; + height: 2rem; + border: 1px solid rgb(170, 170, 170); + +} + + +.pa_bo3{ + width: 100%; + height: 0.7rem; + /* background-color: aqua; */ + display: flex; + justify-content: space-between; +} +.pa_bo3b1{ + width: 40%; + height: 0.7rem; + /* background-color: antiquewhite; */ + display: flex; + justify-content: space-between; + align-items: center; +} +.pa_bo3b1 .bt1{ + width: 45%; + height: 0.3rem; + color: red; + background-color: white; + border: 2px solid red; + border-radius: 12%; +} +.pa_bo3b1 .bt2{ + width: 45%; + height: 0.3rem; + color: rgb(255, 255, 255); + background-color: rgb(255, 0, 0); + border: 0; + border-radius: 12%; +} +.pa_bo3b2{ + width: 18%; + height: 0.7rem; + /* background-color: antiquewhite; */ + color: red; + display: flex; + justify-content: space-around; + align-items: center; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/parse.jsx b/demo_module/src/view/kfr/parse.jsx new file mode 100644 index 0000000000000000000000000000000000000000..aaa79d1837185027e20c81889b3b4dc1f25da8e7 --- /dev/null +++ b/demo_module/src/view/kfr/parse.jsx @@ -0,0 +1,96 @@ +import React, { useState,useMemo } from "react"; +import { useNavigate, useLocation } from 'react-router-dom' +import { NavBar, Space, Toast } from 'antd-mobile' +import './parse.css' + +export default function Parse() { + const navigate = useNavigate() + const location = useLocation() + const list = location.state?.list || [] + const arr = location.state?.arr || [] + console.log(list) + console.log(arr) + + const [num, setnum] = useState(0) + const shang = () => { + setnum(num - 1) + if (num == 0) { + setnum(0) + } + } + const xia = () => { + setnum(num + 1) + if (num == list.length - 1) { + setnum(list.length - 1) + } + } + const count1 = useMemo(() => { + return list.length + }) + const count = useMemo(() => { + return num + 1 + }) + return ( + <> +
{ navigate('/testreport') }}> + 解析 +
+ +
+
+ (单选) + {list[num].timu} +
+
+
    + { + list[num].xuan.map((ele, index) => { + return
  • +
    + { + ele.danci == list[num].daan ? ( + <>√ + ) : ( + <>{ele.danci} + ) + } +
    +
    {ele.name}
    +
  • + }) + } + +
+
+
+
+ 正确答案: + {list[num].daan} +
+
+ 习题解析 + ————————————————————— +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+ + {count}/{count1} +
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/realexam.css b/demo_module/src/view/kfr/realexam.css new file mode 100644 index 0000000000000000000000000000000000000000..349bd2bf6ddb1e667dc61f952809ee5fb307c02f --- /dev/null +++ b/demo_module/src/view/kfr/realexam.css @@ -0,0 +1,82 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.re_bo1{ + width: 100%; + height: 0.5rem; + background-color: rgb(245, 245, 245); + position: sticky; + top: 0; +} +.re_bo2{ + width: 100%; + height: 0.6rem; + /* background-color: aqua; */ + display: flex; + justify-content: center; + align-items: center; +} +.re_bo2 input{ + width: 94%; + height: 0.3rem; + border-radius: 0.1rem; + padding: 0rem 0.2rem; +} +/* .adm-search-bar{ + width: 96%; + height: 0.4rem; +} */ +.re_bo3{ + width: 100%; + /* background-color: antiquewhite; */ +} +.re_bo3 ul{ + width: 100%; + height: 10rem; + /* background-color: blue; */ + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; +} +.re_bo3 ul li{ + width: 96%; + height: 0.7rem; + /* background-color: blueviolet; */ + border: 2px dashed rgb(177, 177, 177); + display: flex; + flex-direction: column; + justify-content: space-around; +} +.re_bo3 ul li p:nth-child(1){ + width: 100%; + height: 0.3rem; + /* background-color: antiquewhite; */ + display: flex; + align-items: center; + font-weight: 600; + display: flex; + justify-content: space-around; +} +/* .re_bo3 ul li p:nth-child(1) span{ + margin-left: 0.1rem; +} */ +.re_bo3 ul li p:nth-child(1) svg{ + /* display: flex; */ + width: 0.2rem; + height: 0.2rem; + /* margin-left: 0.4rem; */ +} +.re_bo3 ul li p:nth-child(2){ + width: 100%; + height: 0.3rem; + /* background-color: antiquewhite; */ + font-size: 0.14rem; + line-height: 0.3rem; + color: rgb(128, 128, 128); +} +.re_bo3 ul li p:nth-child(2) span{ + margin-left: 0.15rem; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/realexam.jsx b/demo_module/src/view/kfr/realexam.jsx new file mode 100644 index 0000000000000000000000000000000000000000..b5f02a641f9d2dd66a428ee1c0f1d46e008961c4 --- /dev/null +++ b/demo_module/src/view/kfr/realexam.jsx @@ -0,0 +1,82 @@ +import React, { useMemo, useState } from "react"; +import { useNavigate, useLocation } from 'react-router-dom' +import { NavBar, Space, Toast, ProgressBar,SearchBar} from 'antd-mobile' +import './realexam.css' + +export default function Realexam() { + const navigate = useNavigate() + const [searchvalue,setsearchvalue]=useState('') + // const [percent, setPercent] = useState(20) + const [list,setlist]=useState([ + {id:1,title:"2020年 【公共基础知识+综合写作】 第十二期真题",cishu:0}, + {id:2,title:"2021年 【公共基础知识+综合写作】 第十一期真题",cishu:1}, + {id:3,title:"2022年 【公共基础知识+综合写作】 第十期真题",cishu:2}, + {id:4,title:"2023年 【公共基础知识+综合写作】 第九期真题",cishu:3}, + {id:5,title:"2024年 【公共基础知识+综合写作】 第八期真题",cishu:4}, + {id:6,title:"1999年 【公共基础知识+综合写作】 第七期真题",cishu:5}, + {id:7,title:"1998年 【公共基础知识+综合写作】 第十三期真题",cishu:6}, + {id:8,title:"2001年 【公共基础知识+综合写作】 第十四真题",cishu:7}, + {id:9,title:"2002年 【公共基础知识+综合写作】 第六真题",cishu:8}, + {id:10,title:"2003年 【公共基础知识+综合写作】 第十五期真题",cishu:9}, + {id:11,title:"2000年 【公共基础知识+综合写作】 第三期真题",cishu:10}, + ]) + const handlechange1=(e)=>{ + setsearchvalue(e.target.value) + } + const handlechange2=(e)=>{ + // let list1=[...list] + if(e.key==="Enter"){ + console.log(searchvalue) + let list1=[...list] + console.log(list1) + let arr=list1.filter(ele=>ele.title.includes(searchvalue)) + console.log(arr) + // list1.push(arr) + // console.log(list1) + setlist(arr) + setsearchvalue('') + if(searchvalue==''){ + setlist(list1) + } + } + } + return ( + <> +
{ navigate('/homepage/test') }}> + 真题试卷 +
+
+ + handlechange1(e)} + onKeyDown={(e)=>handlechange2(e)} + /> + + {/* handlechange2(e)} + /> */} +
+
+
    + { + list.map((ele,index)=>{ + return
  • +

    + {ele.title} + {navigate('/simula')}} t="1733554604150" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4370" width="200" height="200"> +

    +

    + 已完成{ele.cishu}次,本次进度 +

    +
  • + }) + } +
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/sheet.css b/demo_module/src/view/kfr/sheet.css new file mode 100644 index 0000000000000000000000000000000000000000..f788cf88698d1d678306c6c4ca8b36f56df604ae --- /dev/null +++ b/demo_module/src/view/kfr/sheet.css @@ -0,0 +1,163 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.sh_bo1{ + width: 100%; + height: 0.5rem; + background-color: rgb(240, 240, 240); + display: flex; + justify-content: space-around; +} +.sh_bo1b1{ + width: 15%; + height: 0.5rem; + /* background-color: blue; */ + text-align: center; + line-height: 0.7rem; +} +.sh_bo1b1 svg{ + width: 0.23rem; + height: 0.23rem; +} +.sh_bo1b2{ + width: 57%; + height: 0.5rem; + /* background-color: blueviolet; */ + text-align: center; + line-height: 0.6rem; + font-size: 0.26rem; +} +.sh_bo1b3{ + width: 20%; + height: 0.5rem; + /* background-color: brown; */ + text-align: center; + line-height: 0.6rem; + font-size: 0.18rem; +} + + +.sh_bo2{ + width: 100%; + height: 6.2rem; + /* background-color: antiquewhite; */ + margin-top: 0.3rem; +} +.sh_bo2b1{ + width: 100%; + height: 3rem; + /* background-color: blue; */ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items:center ; +} +.sh_bo2b1b1{ + width: 18%; + height: 0.5rem; + /* background-color: aqua; */ + display: flex; + justify-content: center; + align-items: center; + position: relative; +} +.sh_bo2b1b1 svg{ + width: 0.18rem; + height: 0.18rem; + position: absolute; + top: 0rem; + right: 0.05rem; +} +.sh_bo2b1b1 div{ + width: 60%; + height: 0.45rem; + /* background-color: chocolate; */ + border-radius: 50%; + border: 2px solid rgb(219, 219, 219); + text-align: center; + line-height: 0.45rem; +} +.actived11{ + background-color: #0f8eea; + color: white; +} + + +.sh_bo3{ + width: 100%; + height: 0.65rem; + /* background-color: blue; */ + text-align: center; + line-height: 0.65rem; +} +.sh_bo3 .bt1{ + width: 90%; + height: 0.45rem; + background-color: red; + color: white; + border: 0; + border-radius: 10px; +} +.overlayContent7{ + position: absolute; + top: 40%; + left: 50%; + display: flex; + flex-direction: column; + justify-content: space-around; + /* align-items: center; + justify-content: center; */ + width: 340px; + height: 270px; + margin-top: -75px; + margin-left: -170px; + background: white; + /* border-radius: 10px; */ +} +.over7_b1{ + width: 100%; + height: 1.2rem; + /* background-color: antiquewhite; */ + text-align: center; + line-height: 1.8rem; + font-size: 0.28rem; + color: red; +} +.over7_b2{ + width: 100%; + height: 0.5rem; + /* background-color: aqua; */ + /* text-align: center; */ + line-height: 0.5rem; +} +.over7_b2 p{ + display: flex; + justify-content: center; + align-items: center; + font-size: 0.18rem; + font-weight: 600; +} +.over7_b3{ + width: 100%; + height: 1.5rem; + /* background-color: blue; */ + display: flex; + justify-content: space-around; + padding-top: 0.3rem; +} +.over7_b3 .bt2{ + width: 42%; + height: 0.55rem; + border: 2px solid red; + background-color: white; + color: red; +} +.over7_b3 .bt3{ + width: 42%; + height: 0.55rem; + background-color: red; + color: white; + border: 0; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/sheet.jsx b/demo_module/src/view/kfr/sheet.jsx new file mode 100644 index 0000000000000000000000000000000000000000..36608c1cd91a80cabd02c91de3177f33aa14442e --- /dev/null +++ b/demo_module/src/view/kfr/sheet.jsx @@ -0,0 +1,79 @@ +import React, { useState, useRef } from "react"; +import { useNavigate, useLocation } from 'react-router-dom' +import './sheet.css' +// import { Cell, CountDown } from '@nutui/nutui-react' +import CountDown from "../countdown/countdown.jsx"; +import { Button, Mask, Space } from 'antd-mobile' + +export default function Sheet() { + const navigate = useNavigate() + const location = useLocation() + const list = location.state?.list || [] + const arr = location.state?.arr || [] + // console.log(list) + const [time, settime] = useState({ endTime: Date.now() + 7200 * 1000 }) + + const [visible7, setVisible7] = useState(false) + const handleclick=()=>{ + navigate('/jiaojuan',{state:{list,arr}}) + } + + return ( + <> +
+
+ { navigate('/simula') }} t="1733464449096" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4334" width="200" height="200"> +
+
+ 答题卡 +
+
+ + +
+
+ + +
+
+ + { + list.map((ele, index) => { + return
+
{index + 1}
+ { + ele.biao == true ? ( + <> + + + ) : ( + <> + ) + } +
+ }) + } + +
+
+ + +
+ + {/* */} + setVisible7(false)}> +
+
现在交卷?
+
+

剩余时间

+
+
+ + +
+
+
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/simula.css b/demo_module/src/view/kfr/simula.css new file mode 100644 index 0000000000000000000000000000000000000000..cc77975cc5a6743f85f404061dd5c99ef1b61391 --- /dev/null +++ b/demo_module/src/view/kfr/simula.css @@ -0,0 +1,333 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.si_bo1{ + width: 100%; + height: 0.5rem; + background-color: rgb(245, 245, 245); + display: flex; + justify-content: space-around; +} +.si_bo1b1{ + width: 16%; + height: 0.5rem; + /* background-color: antiquewhite; */ + text-align: center; + line-height: 0.7rem; +} +.si_bo1b1 svg{ + width: 0.25rem; + height: 0.25rem; +} +.si_bo1b2{ + width: 60%; + height: 0.5rem; + /* background-color: blueviolet; */ + text-align: center; + line-height: 0.5rem; + font-size: 0.3rem; +} +.si_bo1b3{ + width: 18%; + height: 0.5rem; + /* background-color: brown; */ + line-height: 0.5rem; +} +.si_bo1b3 button{ + width: 100%; + height:0.3rem; + border: 2px solid red; + background-color: white; + color: red; + border-radius: 5px; +} + +/* .si_bo1b1{ + width: 10rem; + height: 0.5rem; + background-color: antiquewhite; + margin-left: 0.8rem; + display: flex; + justify-content: space-between; +} +.si_bo1b1b1{ + width: 24%; + height: 0.5rem; + background-color: blue; + line-height: 0.5rem; + font-size: 0.26rem; +} +.si_bo1b1b2{ + width: 9%; + height: 0.5rem; + background-color: rgb(255, 0, 191); + margin-left: 0.07rem; + line-height: 0.5rem; +} +.si_bo1b1b2 button{ + width: 100%; + height: 0.32rem; + background-color: white; + border: 2px solid red; + color: red; + border-radius: 5px; +} */ + +.si_bo2{ + width: 100%; + height: 0.3rem; + /* background-color: antiquewhite; */ +} +.si_bo2b1{ + width: 15%; + height: 0.3rem; + /* background-color: blue; */ + margin-left: 85%; + display: flex; + justify-content: space-around; + align-items: center; + color: red; +} +.si_bo2b1 svg{ + width: 0.2rem; + height: 0.2rem; +} +.overlayContent6 { + position: absolute; + top: 33%; + left: 50%; + display: flex; + flex-direction: column; + justify-content: space-between; + /* align-items: center; + justify-content: center; */ + width: 3.5rem; + height: 3rem; + margin-top: -75px; + margin-left: -155px; + background: white; + /* border-radius: 16px; */ + } +.over6_bo1{ + width: 100%; + height: 1.6rem; + /* background-color: antiquewhite; */ + display: flex; + justify-content: center; + align-items: center; +} +.over6_bo1b1{ + width: 27%; + height: 0.8rem; + border: 6px solid red; +} +.over6_bo1b1 svg{ + width: 100%; + height: 100%; +} +.over6_bo2{ + width: 100%; + height: 0.6rem; + /* background-color: aqua; */ + text-align: center; + font-size: 0.16rem; + font-weight: 600; + line-height: 0.4rem; +} +.over6_bo3{ + width: 100%; + height: 0.5rem; + /* background-color: blue; */ +} +.over6_bo3 .bt6{ + width: 100%; + height: 0.5rem; + background-color: red; + border: 0; + color: white; +} + +.si_bo3{ + width: 100%; + height: 6.2rem; + /* background-color: aquamarine; */ + display: flex; + flex-direction: column; + justify-content: space-between; +} +.si_bo3b1{ + width: 100%; + height: 0.6rem; + /* background-color: blue; */ + line-height: 0.3rem; +} +.si_bo3b1 p{ + margin-left: 5%; + font-size: 0.2rem; +} +.si_bo3b1 p .sp1{ + color: red; +} +.si_bo3b2{ + width: 100%; + height: 2.8rem; + /* background-color: blueviolet; */ +} +.si_bo3b2 ul{ + width: 100%; + height: 2.8rem; + /* background-color: cadetblue; */ + display: flex; + flex-direction: column; + justify-content:space-around; + align-items: center; +} +.si_bo3b2 ul li{ + width: 93%; + height: 0.5rem; + /* background-color: aqua; */ + font-size: 0.18rem; + display: flex; + justify-content: space-between; +} +.si_bo3b2 ul li div:nth-child(1){ + width: 0.5rem; + height: 0.47rem; + /* background-color: antiquewhite; */ + text-align: center; + line-height: 0.47rem; + border-radius: 50%; + border: 2px solid rgb(212, 212, 212); +} +.si_bo3b2 ul li div:nth-child(2){ + width: 3.35rem; + height: 0.5rem; + /* background-color: beige; */ + /* text-align: center; */ + line-height: 0.5rem; +} +.active11{ + background-color: #0f8eea; + color: white; +} +.si_bo3b3{ + width: 100%; + height: 2.5rem; + /* background-color: brown; */ + display: flex; + justify-content: space-around + ; +} +.si_bo3b3 .bt1{ + width: 43%; + height: 0.5rem; + color: red; + background-color: white; + border: 3px solid red; + border-radius: 7px; +} +.si_bo3b3 .bt2{ + width: 43%; + height: 0.5rem; + background-color: red; + border: 0; + color: white; + border-radius: 7px; +} + + +.si_bo4{ + width: 100%; + height: 0.62rem; + /* background-color: blueviolet; */ + display: flex; + justify-content: center; + align-items: center; +} +.si_bo4b1{ + width: 93%; + height: 0.62rem; + /* background-color: aqua; */ + display: flex; + justify-content: space-between; +} +.si_bo4b1b1{ + width: 23%; + height: 0.62rem; + /* background-color: antiquewhite; */ + line-height: 0.62rem; +} +.si_bo4b1b1 .bt3{ + width: 100%; + border: 0; + height: 0.3rem; + background-color: red; + color: white; + border-radius: 5px; +} +.si_bo4b1b2{ + width: 22%; + height: 0.62rem; + /* background-color: beige; */ + display: flex; + justify-content: space-around; + align-items: center; + color: red; +} +.overlayContent5 { + position: absolute; + top: 40%; + left: 50%; + display: flex; + flex-direction: column; + justify-content: space-between; + /* align-items: center; + justify-content: center; */ + width: 3.5rem; + height: 3.1rem; + margin-top: -75px; + margin-left: -155px; + background: white; + /* border-radius: 16px; */ + } +.over5_bo1{ + width: 100%; + height: 1.1rem; + /* background-color: antiquewhite; */ + text-align: center; + font-size: 0.26rem; + font-weight: 600; + line-height: 1.8rem; +} +.over5_bo2{ + width: 100%; + height: 0.6rem; + /* background-color: antiquewhite; */ + text-align: center; + font-size: 0.18rem; + font-weight: 600; + line-height: 0.4rem; +} +.over5_bo3{ + width: 100%; + height: 0.9rem; + /* background-color: antiquewhite; */ + display: flex; + justify-content: space-around; +} +.over5_bo3 .bt4{ + width: 45%; + height: 0.5rem; + border: 2px solid red; + background-color: white; + color: red; +} +.over5_bo3 .bt5{ + width: 45%; + height: 0.5rem; + border: 0; + background-color: red; + color: white; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/simula.jsx b/demo_module/src/view/kfr/simula.jsx new file mode 100644 index 0000000000000000000000000000000000000000..42532d701b1e402031338b3a324d6bbb1177e539 --- /dev/null +++ b/demo_module/src/view/kfr/simula.jsx @@ -0,0 +1,338 @@ +import React, { useState, useMemo, useRef } from "react"; +import { useNavigate } from 'react-router-dom' +// import CountDown from "../countdown/countdown.jsx"; +import './simula.css' +import { Button, Mask } from 'antd-mobile' +import { Cell, CountDown } from '@nutui/nutui-react' +export default function Simula() { + const navigate = useNavigate() + const [num, setnum] = useState(0) + const [type, settype] = useState() + const [time,settime]=useState({endTime: Date.now() + 7200 * 1000}) + const [list, setlist] = useState([ + { + id: 1, timu: "Typescript的主要特点是什么", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "静态类型检查" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'B', biao: false,finish:false,fenshu:5,xiangqing:"答案是B" + }, + { + id: 2, timu: "Typescript中interface和type的差别是什么", xuan: [ + { id: 11, danci: "A", name: "语法差异" }, + { id: 22, danci: "B", name: "我不太会" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'A', biao: false,finish:false,fenshu:5,xiangqing:"答案是A" + }, + { + id: 3, timu: "git常用命令都有哪些", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太清楚" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "git add file" }, + ], daan: 'D', biao: false,finish:false,fenshu:5,xiangqing:"答案是D" + }, + { + id: 4, timu: "BfC触发的条件都有哪些", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "position:absolute/fixed" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 5, timu: "Typescript数据类型都有哪些新增", xuan: [ + { id: 11, danci: "A", name: "我实在不会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "enum" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 6, timu: "Math常用方法有什么", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "rendom" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'B', biao: false,finish:false,fenshu:5,xiangqing:"答案是B" + }, + { + id: 7, timu: "盒模型的组成包括", xuan: [ + { id: 11, danci: "A", name: "内边距" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "我不太会" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'A', biao: false,finish:false,fenshu:5,xiangqing:"答案是A" + }, + { + id: 8, timu: "React组件的类型有", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "函数组件" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 9, timu: "js的作用域有什么", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "我不太清楚" }, + { id: 44, danci: "D", name: "全局作用域" }, + ], daan: 'D', biao: false,finish:false,fenshu:5,xiangqing:"答案是D" + }, + { + id: 10, timu: "CSS中隐藏元素用?", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "display:none;" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'B', biao: false,finish:false,fenshu:5,xiangqing:"答案是B" + }, + { + id: 11, timu: "常见的React Hooks有什么", xuan: [ + { id: 11, danci: "A", name: "useContext" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "我是真的不会" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'A', biao: false,finish:false,fenshu:5,xiangqing:"答案是A" + }, + { + id: 12, timu: "HTML5新增的特性?", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "我非常不清楚" }, + { id: 44, danci: "D", name: "视频和音频" }, + ], daan: 'D', biao: false,finish:false,fenshu:5,xiangqing:"答案是D" + }, + { + id: 13, timu: "JSX的语法规范有", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "class要用className" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 14, timu: "React改变this指向的方法", xuan: [ + { id: 11, danci: "A", name: "bind" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "我是真不会" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'A', biao: false,finish:false,fenshu:5,jxiangqing:"答案是A" + }, + { + id: 15, timu: "BfC触发的条件都有哪些", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "position:absolute/fixed" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 16, timu: "transition有的属性是", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "transition-property" }, + { id: 33, danci: "C", name: "不会" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'B', biao: false,finish:false,fenshu:5,xiangqing:"答案是B" + }, + { + id: 17, timu: "BfC触发的条件都有哪些", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "position:absolute/fixed" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + { + id: 18, timu: "JSX的语法规范有什么", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "只有一个根标签" }, + { id: 33, danci: "C", name: "我不太懂" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'B', biao: false,finish:false,fenshu:5,xiangqing:"答案是B" + }, + { + id: 19, timu: "css中隐藏元素的方法", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "不太清楚" }, + { id: 44, danci: "D", name: "visiblity:hidden" }, + ], daan: 'D', biao: false,finish:false,fenshu:5,xiangqing:"答案是D" + }, + { + id: 20, timu: "JS的作用域有什么", xuan: [ + { id: 11, danci: "A", name: "块级作用域" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "不会" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'A', biao: false,finish:false,fenshu:5,xiangqing:"答案是A" + }, + { + id: 21, timu: "JSX的语法规范有", xuan: [ + { id: 11, danci: "A", name: "我不太会" }, + { id: 22, danci: "B", name: "我不太懂" }, + { id: 33, danci: "C", name: "class要用className" }, + { id: 44, danci: "D", name: "我不太清除" }, + ], daan: 'C', biao: false,finish:false,fenshu:5,xiangqing:"答案是C" + }, + ]) + const [arr,setarr]=useState([]) + const [paused, setpaused] = useState(false) + const [format,setformat]=useState('mm:ss') + const stateRef = useRef({ + endTime: Date.now() + 7200 * 1000 + }) + const count = useMemo(() => { + return list.length + }) + const count1 = useMemo(() => { + return num + 1 + }) + const [visible, setVisible] = useState(false) + const [visible1, setVisible1] = useState(false) + const handleclick1 = () => { + setVisible(false) + setnum(0) + settype() + } + const handleclick2 = () => { + setVisible1(false) + list[num].biao = true + console.log(list) + } + const handleclick3 = () => { + navigate('/sheet', { state: { list,arr } }) + } + const handleclick4=(ele,index)=>{ + settype(index) + list[num].finish=true + let arr1=[...arr] + arr1.push(ele.danci) + console.log(ele) + setarr(arr1) + } + const shang = () => { + setnum(num - 1) + settype() + if (num == 0) { + setnum(0) + } + } + const xia = () => { + setnum(num + 1) + settype() + if (num == list.length - 1) { + setnum(list.length - 1) + } + } + return ( + <> +
+
+ (navigate('/homepage/test'))} t="1733360100825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4332" width="200" height="200"> +
+
+ + + + {/* */} +
+
+ { + paused == false ? ( + <> + + + ) : ( + <> + + + ) + } +
+
+ +
+
{ setVisible1(true) }}> + 标记 + +
+ setVisible1(false)}> +
+
+
+ +
+
+
+ 标记成功,可在有思路时,继续作答哦! +
+
+ +
+
+
+
+ +
+
+

+ (单选)   + {list[num].timu} +

+
+
+
    + { + list[num].xuan.map((ele, index) => { + return
  • +
    handleclick4(ele,index)} className={type == index ? "active11" : ""}>{ele.danci}
    +
    {ele.name}
    +
  • + }) + } + +
+
+
+ + +
+
+
+ +
+
+
+ + setVisible(false)}> +
+
+ 您要重新练习吗? +
+
+ 重新练习会覆盖之前的练习进度呦~ +
+
+ + +
+
+
+
+
+ handleclick3()} class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10060" width="200" height="200"> + {count1}/{count} +
+
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/test.css b/demo_module/src/view/kfr/test.css new file mode 100644 index 0000000000000000000000000000000000000000..2aed81e862a95a5bb45fdcbb214ff7a85e4315a1 --- /dev/null +++ b/demo_module/src/view/kfr/test.css @@ -0,0 +1,188 @@ +*{ + margin: 0; + padding: 0; + list-style: none; +} +.te_p1{ + width: 100%; + height: 0.4rem; + /* background-color: red; */ +} +.icon{ + width: 0.3rem; + height: 0.3rem; + margin-top: 0.05rem; +} +.te_bo1{ + width: 100%; + height: 0.7rem; + /* background-color: aqua; */ + margin-top: 0.1rem; + display: flex; + justify-content: space-around; +} +.bo1_b1{ + width: 18%; + height: 0.7rem; + /* background-color: antiquewhite; */ +} +.bo1_b1b1{ + width: 100%; + height: 0.5rem; + /* background-color: blue; */ + text-align: center; + line-height: 0.7rem; +} +.bo1_b1b1 img{ + width: 0.35rem; + height: 0.35rem; +} +.bo1_b1b2{ + width: 100%; + height: 0.2rem; + /* background-color: blueviolet; */ + text-align: center; + line-height: 0.1rem; +} +.te_bo2{ + width: 100%; + height: 1rem; + /* background-color: aqua; */ + margin-top: 0.19rem; + display: flex; + justify-content: center; + align-items: center; +} +.bo2_b1{ + width: 99%; + height: 0.9rem; + background-color: #ff6824; + display: flex; + justify-content: space-around; + align-items: center; + border-radius: 40px; +} +.bo2_b1b1{ + width:19%; + height: 1rem; + /* background-color: blue; */ + margin-bottom: 0.25rem; +} +.bo2_b1b1 img{ + width: 100%; + height: 1rem; +} +.bo2_b1b2{ + width:59%; + height: 0.85rem; + /* background-color: rgb(9, 255, 0); */ + display: flex; + justify-content: space-between; +} +.bo2_b1b2_b1{ + width: 20%; + height: 0.85rem; + /* background-color: burlywood; */ + line-height: 0.4rem; + text-align: center; + color: white; +} +.bo2_b1b2_b1 .p1{ + font-size: 18px; +} +.bo2_b1b2_b2{ + width: 20%; + height: 0.85rem; + /* background-color: burlywood; */ + line-height: 0.4rem; + text-align: center; + color: white; +} +.bo2_b1b2_b2 .p1{ + font-size: 18px; +} +.bo2_b1b2_b3{ + width: 54%; + height: 0.85rem; + /* background-color: burlywood; */ + font-size: 12px; + line-height: 0.85rem; + text-align: center; + color: white; +} +.bo2_b1b3{ + width:20%; + height: 0.8rem; + background-color: #fdda51; + border-radius: 50px; + text-align: center; + line-height: 0.8rem; + color: #ff6824; +} +.bo2_b1b3 .sp1{ + font-size: 36px; + font-weight: 600; +} +.bo2_b1b3 .sp2{ + font-size: 14px; + font-weight: 600; +} +.te_bo3{ + width: 100%; + height: 5rem; + /* background-color: rgb(209, 209, 209); */ + margin-top: 0.2rem; + border-top: 0rem; +} +.ant-collapse-expand-icon svg{ + display: none; +} +.ant-collapse-header{ + font-size: 0.18rem; + border-bottom: 1px solid rgb(224, 224, 224); + border-top: 0rem; +} +.te_ul li{ + width: 100%; + height: 0.5rem; + line-height: 0.5rem; + font-size: 0.16rem; + /* background-color: #ff6824; */ + border-bottom: 1px solid rgb(224, 224, 224); + display: flex; + justify-content: space-between; +} +.te_ul li svg{ + width: 0.2rem; + height: 0.2rem; +} +.te_bo4{ + width: 57%; + height: 0.6rem; + /* background-color: #ff6824; */ + position: fixed; + bottom: 50px; + right: 0; + display: flex; + justify-content: space-between; + align-items: center; +} +.te_bo4b1{ + width: 20%; + height: 0.6rem; + /* background-color: #fdda51; */ +} +.te_bo4b1 svg{ + width: 100%; + height: 0.6rem; +} +.te_bo4b2{ + width: 78%; + height: 0.4rem; + background-color: #e94046; + border-radius: 20px; + text-align: center; + line-height: 0.4rem; + font-size: 0.16rem; + color: white; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/test.jsx b/demo_module/src/view/kfr/test.jsx new file mode 100644 index 0000000000000000000000000000000000000000..740975c836e162dfb63fc2357f9d8acb1e20d69b --- /dev/null +++ b/demo_module/src/view/kfr/test.jsx @@ -0,0 +1,139 @@ +import React, { useState } from "react"; +import { useNavigate } from 'react-router-dom' +import './test.css' +// import { Collapse } from 'nutui-react' +import { Collapse } from 'antd'; +import { EditOutlined } from '@ant-design/icons'; + +export default function Test() { + const navigate = useNavigate() + const [list, setlist] = useState([ + { id: 1, name: "练习题", img: '/img/1.png' ,path:"/topic"}, + { id: 2, name: "模拟题", img: '/img/2.png' ,path:"/simula"}, + { id: 3, name: "真题", img: '/img/3.png' ,path:'/realexam'} + ]) + + const text =
    +
  • + 科技 + {navigate('/topic')}}/> +
  • +
  • + 政治 + {navigate('/topic')}}/> +
  • +
  • + 历史 + {navigate('/topic')}}/> +
  • +
  • + 法律 + {navigate('/topic')}}/> +
  • +
; + const items = [ + { + key: '1', + label: '常识判断', + children:

{text}

, + }, + { + key: '2', + label: '言语理解与表达', + children:

{text}

, + }, + { + key: '3', + label: '数量关系', + children:

{text}

, + }, + { + key: '4', + label: '判断推理', + children:

{text}

, + }, + { + key: '5', + label: '资料分析', + children:

{text}

, + }, + ]; + + const onChange = (key) => { + console.log(key); + }; + const handleclick1=(ele)=>{ + navigate(ele.path) + } + + return ( + <> +
+

+ + + + +

+
+
+ { + list.map((ele, index) => { + return
+
+ handleclick1(ele)}/> +
+
+ {ele.name} +
+
+ }) + } +
+ +
+
+
+ +
+
+
+

50

+

预估分

+
+
+

80%

+

排在率

+
+
+ 公务员考试收到及时 +
+
+
+ 50 + +
+
+
+ +
+ ; +
+ +
+
+ +
+
+ 辅导员帮你,高效提分 +
+
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/testreport.css b/demo_module/src/view/kfr/testreport.css new file mode 100644 index 0000000000000000000000000000000000000000..129a407336b6bed11b8e84a67545257dd0957b02 --- /dev/null +++ b/demo_module/src/view/kfr/testreport.css @@ -0,0 +1,224 @@ +*{ + margin: 0; + padding: 0; + list-style: none; +} +.tes_bo1{ + width: 100%; + height: 0.5rem; + background-color: white; + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1000; +} + + +.tes_bo2{ + width: 100%; + height: 10rem; + /* background-color: aqua; */ + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; +} +.tes_bo2b1{ + width: 93%; + height: 0.7rem; + /* background-color: antiquewhite; */ + line-height: 0.35rem; +} +.tes_bo2b1 p:nth-child(1){ + font-weight: 600; + font-size: 0.16rem; +} +.tes_bo2b1 p:nth-child(2){ + color: rgb(139, 139, 139); +} +.tes_bo2b2{ + width: 93%; + height: 1.1rem; + /* background-color: antiquewhite; */ + border: 2px solid rgb(175, 175, 175); +} +.tes_bo2b2 div:nth-child(1){ + width: 100%; + height: 0.3rem; + /* background-color: blue; */ +} +.tes_bo2b2 div:nth-child(1) p{ + line-height: 0.3rem; + font-size: 0.18rem; + font-weight: 600; + margin-left: 0.08rem; +} +.tes_bo2b2 div:nth-child(2){ + width: 100%; + height: 0.5rem; + /* background-color: chartreuse; */ + text-align: center; + line-height: 0.5rem; +} +.tes_bo2b2 div:nth-child(2) span:nth-child(1){ + font-size: 0.38rem; +} +.tes_bo2b2 div:nth-child(3){ + width: 100%; + height: 0.3rem; + /* background-color: blueviolet; */ + line-height: 0.3rem; + text-align: center; + color: rgb(156, 156, 156); +} +.tes_bo2b3{ + width: 93%; + height: 3.8rem; + /* background-color: antiquewhite; */ + border: 2px solid rgb(185, 185, 185); +} +.tes_bo2b3b1{ + width: 100%; + height: 0.4rem; + /* background-color: blue; */ + display: flex; + justify-content: space-between; + align-items: center; +} +.tes_bo2b3b1 p:nth-child(1){ + font-size: 0.18rem; + font-weight: 600; +} +.tes_bo2b3b1 p:nth-child(2){ + color: rgb(109, 109, 109); +} +.tes_bo2b3b2{ + width: 100%; + height: 0.6rem; + /* background-color: blueviolet; */ + text-align: center; + line-height: 0.6rem; +} +.tes_bo2b3b2 span{ + font-size: 0.4rem; +} +.tes_bo2b3b3{ + width: 100%; + height: 2.8rem; + /* background-color: brown; */ +} +.tes_bo2b3b3 ul{ + width: 100%; + height: 2.8rem; + /* background-color: rgb(131, 131, 131); */ + display: flex; + flex-direction: column; + justify-content: space-around; +} +.tes_bo2b3b3 ul li{ + width: 100%; + height: 0.4rem; + /* background-color: antiquewhite; */ + display: flex; + justify-content: space-between; + align-items: center; +} +.tes_bo2b3b3 ul li p:nth-child(1){ + font-size: 0.18rem; + font-weight: 600; +} +.tes_bo2b3b3 ul li p:nth-child(2){ + font-size: 0.14rem; +} +.tes_bo2b3b3 ul li p:nth-child(2) span:nth-child(1){ + color: black; +} +.tes_bo2b3b3 ul li p:nth-child(2) span:nth-child(2){ + color: #4bcf68; +} +.tes_bo2b3b3 ul li p:nth-child(2) span:nth-child(3){ + color: red; +} + +.tes_bo2b4{ + width: 93%; + height: 3.1rem; + /* background-color: antiquewhite; */ + border: 2px solid rgb(175, 175, 175); +} +.tes_bo2b4 p{ + height: 0.4rem; + /* background-color: #4bcf68; */ + line-height: 0.4rem; + font-size: 0.18rem; + font-weight: 600; +} +.tes_bo2b4b1{ + width: 100%; + height: 2.7rem; + /* background-color: rgb(167, 167, 167); */ + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: center; +} +.tes_bo2b4b1b1{ + width: 17%; + height: 0.45rem; + /* background-color: aqua; */ + display: flex; + justify-content: center; + align-items: center; +} +.tes_bo2b4b1b1 div{ + width: 63%; + height: 0.42rem; + /* background-color: antiquewhite; */ + border-radius: 50%; + border: 2px solid rgb(189, 189, 189); + text-align: center; + line-height: 0.45rem; +} +.active22{ + color: white; + background-color: #4bcf68; +} +.active33{ + color: white; + background-color: red; +} +.tes_bo2b5{ + width: 93%; + height: 0.5rem; + /* background-color: antiquewhite; */ +} + + +.tes_bo3{ + width: 100%; + height: 0.7rem; + background-color: white; + display: flex; + justify-content: space-around; + align-items: center; + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 1000; +} +.tes_bo3 .bt1{ + width: 39%; + height: 0.5rem; + background-color: white; + border: 2px solid red; + border-radius: 5px; + color: red; +} +.tes_bo3 .bt2{ + width: 39%; + height: 0.5rem; + background-color: rgb(255, 0, 0); + border: 0; + border-radius: 5px; + color: rgb(255, 255, 255); +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/testreport.jsx b/demo_module/src/view/kfr/testreport.jsx new file mode 100644 index 0000000000000000000000000000000000000000..6eb69b4fdf336d9a5339335a254dee586b71a669 --- /dev/null +++ b/demo_module/src/view/kfr/testreport.jsx @@ -0,0 +1,153 @@ +import React, { useState,useMemo } from "react"; +import { useNavigate, useLocation } from 'react-router-dom' +import { NavBar, Space, Toast } from 'antd-mobile' +import './testreport.css' + +export default function Testreport() { + const navigate = useNavigate() + const location = useLocation() + const list = location.state?.list || [] + const arr = location.state?.arr || [] + // console.log(list) + // console.log(arr) + const score=useMemo(()=>{ + let num=0 + list.map((ele,index)=>{ + if(arr[index]==ele.daan){ + num+=ele.fenshu + } + }) + return num + }) + const rate=useMemo(()=>{ + let num=0 + let count=0 + list.map((ele,index)=>{ + if(arr[index]==ele.daan){ + count=count+1 + // console.log(count) + num=count/list.length*100 + } + }) + return num.toFixed(2) + }) + const count=useMemo(()=>{ + let num=0 + list.map((ele,index)=>{ + if(arr[index]==ele.daan){ + num=num+1 + } + }) + return num + }) + const count1=useMemo(()=>{ + let num=0 + list.map((ele,index)=>{ + if(arr[index]!==ele.daan){ + num=num+1 + } + }) + return num + }) + const handleclick=()=>{ + navigate('/parse',{state:{list,arr}}) + } + return ( + <> +
{navigate('/jiaojuan')}}> + 考试报告 +
+ + +
+
+

2019年【公共基础知识+综合写作】 第十二期真题

+

交卷时间:2024.12.09 16.30.23

+
+
+
+

你的成绩

+
+
+ {score} + +
+
作答时间:50:03
+
+
+
+

答题情况

+

正确率:{rate}%

+
+
+ 您共答对了 {count}道 共{list.length}道 +
+
+
    +
  • +

    常识判断:

    +

    + 共{list.length}道             + 正确{count}道             + 错误{count1}道 +

    +
  • +
  • +

    言语理解与表达:

    +

    + 共{list.length}道             + 正确{count}道             + 错误{count1}道 +

    +
  • +
  • +

    数量关系:

    +

    + 共{list.length}道             + 正确{count}道             + 错误{count1}道 +

    +
  • +
  • +

    判断推理:

    +

    + 共{list.length}道             + 正确{count}道             + 错误{count1}道 +

    +
  • +
  • +

    资料分析:

    +

    + 共{list.length}道             + 正确{count}道             + 错误{count1}道 +

    +
  • +
+
+
+
+

答题卡

+
+ { + list.map((ele,index)=>{ + return
+
{index+1}
+
+ }) + } + +
+
+
+
+ + +
+ + +
+ + ) +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/topic.css b/demo_module/src/view/kfr/topic.css new file mode 100644 index 0000000000000000000000000000000000000000..a7876a6b8186f3bbeb0b2de149195ba3dbd177c2 --- /dev/null +++ b/demo_module/src/view/kfr/topic.css @@ -0,0 +1,394 @@ +*{ + padding: 0; + margin: 0; + list-style: none; +} +.to_b1{ + height: 0.5rem; + /* background-color: aqua; */ +} +.to_b2{ + width: 100%; + height: 0.3rem; + /* background-color: antiquewhite; */ + display: flex; + justify-content: space-between; +} +.to_b2b1{ + width: 15%; + height: 0.3rem; + /* background-color: aqua; */ + line-height: 0.3rem; + text-align: center; + display: flex; + justify-content: space-between; + color: red; +} +.to_b2b1 svg{ + width: 0.3rem; + height: 0.23rem; +} +.to_b2b2{ + width: 14%; + height: 0.3rem; + /* background-color: aquamarine; */ + line-height: 0.3rem; + display: flex; + justify-content: space-between; + color: red; +} +.to_b2b2 svg{ + width: 0.2rem; + height: 0.2rem; +} +.to_b3{ + width: 100%; + height: 6rem; + /* background-color: aqua; */ + border-bottom: 2px solid rgb(197, 197, 197); + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; +} +.to_b3b1{ + width: 95%; + height: 0.5rem; + /* background-color: antiquewhite; */ + text-indent: 2em; + line-height: 0.5rem; +} +.to_b3b1 .sp1{ + color: red; +} +.to_b3b2{ + width: 95%; + height: 2.2rem; + /* background-color: rgb(209, 209, 209); */ +} +.to_b3b2 ul{ + width: 100%; + height: 100%; + /* background-color: antiquewhite; */ + display: flex; + flex-direction: column; + justify-content: space-around; +} +.to_b3b2 ul li{ + width: 100%; + height: 0.45rem; + /* background-color: aqua; */ + line-height: 0.45rem; + display: flex; + justify-content: space-between; +} +.to_b3b2 ul li div:nth-child(1){ + font-size: 0.22rem; + width: 10%; + height: 0.45rem; + /* background-color: antiquewhite; */ + /* line-height: 0.45rem; */ + text-align: center; + border-radius: 50%; + border: 1px solid rgb(196, 196, 196); +} +/* .to_b3b2 span{ + width: 100%; + height: 0.45rem; +} */ +.to_b3b2 ul li div:nth-child(2){ + font-size: 0.2rem; + /* margin-left: 0.12rem; */ + width: 88%; + height: 0.45rem; + /* background-color: antiquewhite; */ +} +.to_bo{ + width: 95%; + height: 3rem; + /* background-color: burlywood; */ + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.to_b3b3{ + width: 100%; + height: 0.8rem; + /* background-color: blueviolet; */ + text-align: center; + line-height: 0.8rem; +} +.to_b3b3 button{ + width: 3.2rem; + height: 0.45rem; + border: 0; + border-radius: 0.1rem; + background-color: red; + color: white; +} +.to_b3b4{ + width: 100%; + height: 2rem; + /* background-color: rgb(114, 114, 114); */ +} +.to_b3b4 p{ + display: flex; + justify-content: space-around; +} +.to_b3b4 p .btn1{ + width: 40%; + height: 0.45rem; + background-color: white; + color: red; + border: 2px solid red; + border-radius: 0.1rem; +} +.to_b3b4 p .btn2{ + width: 40%; + height: 0.45rem; + background-color: rgb(255, 0, 0); + color: rgb(255, 255, 255); + border: 2px solid red; + border-radius: 0.1rem; +} +.actived{ + background-color: #0f8eea; + color: white; +} + +.overlayContent { + position: absolute; + top: 30%; + left: 30%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + width: 3.3rem; + height: 2.7rem; + margin-top: -75px; + margin-left: -76px; + background: white; + border-radius: 16px; + } +.overlayContent p{ + width: 95%; + height: 0.4rem; + /* background-color: #0f8eea; */ + color: black; + font-size: 0.2rem; +} +.overlayContent textarea{ + width: 94%; + height: 1.4rem; +} +.overlayContent button{ + width: 95%; + height: 0.45rem; + background-color: red; + border: 0; + border-radius: 0.1rem; + color: white; +} +.overlayContent1{ + position: absolute; + top: 30%; + left: 30%; + /* display: flex; + flex-direction: column; + align-items: center; */ + justify-content: space-around; + width: 3.3rem; + height: 2.7rem; + margin-top: -75px; + margin-left: -76px; + background: white; + /* border-radius: 16px; */ +} +.over_b1{ + width: 100%; + height: 60%; + /* background-color: #0f8eea; */ + display: flex; + justify-content: center; + align-items: center; +} +.over_b1 div{ + width: 25%; + height: 45%; + border: 6px solid red; + text-align: center; + /* font-size: 0.24rem; */ + /* font-weight: 800; */ + line-height: 1rem; +} +.over_b1 div svg{ + width: 0.7rem; + height: 0.7rem; + /* font-weight: 600; */ +} +.over_b2{ + width: 100%; + height: 20%; + /* background-color: aqua; */ + color: black; + text-align: center; +} +.over_b3{ + width: 100%; + height: 20%; + /* background-color: bisque; */ + display: flex; + align-items: center; + justify-content: center; +} +.over_b3 button{ + width: 99%; + height: 100%; + background-color: red; + color: white; + border: 0; + border-radius: 5px; +} + +.to_bo1{ + width: 95%; + height: 3rem; + /* background-color: burlywood; */ + /* display: flex; + flex-direction: column; + justify-content: space-between; */ +} +.to_bo1b1{ + width: 100%; + height: 0.3rem; + /* background-color: #0f8eea; */ + line-height: 0.3rem; +} +.to_bo1b2{ + width: 100%; + height: 0.3rem; + /* background-color: #ff9900; */ + line-height: 0.3rem; +} +.to_bo1b2 span:nth-child(2){ + color: rgb(255, 0, 0); +} +.to_bo1b3{ + width: 100%; + height: 2.1rem; + /* background-color: #7700ff; */ +} +.to_bo1b3 textarea{ + width: 99.5%; + height: 99.5%; + border: 0.5px solid rgb(212, 212, 212); + +} +.activeds{ + color: white; + background-color:#4bcf68 ; +} +.to_b4{ + width: 100%; + height: 0.82rem; + /* background-color: #0f8eea; */ + display: flex; + justify-content: space-between; + align-items: center; +} +.to_b4b1{ + width: 22%; + height: 0.4rem; + /* background-color: #4bcf68; */ + text-align: center; + line-height: 0.4rem; + background-color: red; +} +.to_b4b1 p{ + color: white; +} +.to_b4b2{ + width: 20%; + height: 0.4rem; + /* background-color: aqua; */ + display: flex; + justify-content: space-around; + align-items: center; +} +.to_b4b2 svg{ + width: 0.3rem; + height: 0.4rem; +} +.to_b4b2 div:nth-child(2){ + font-size: 0.16rem; + color: red; +} +.overlayContent2{ + position: absolute; + top: 38%; + left: 30%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + width: 3.6rem; + height: 2.9rem; + margin-top: -75px; + margin-left: -79px; + background: white; + /* border-radius: 16px; */ +} +.over2_b1{ + width: 100%; + height: 0.5rem; + /* background-color: #0f8eea; */ +} +.over2_b2{ + width: 100%; + height: 2.2rem; + /* background-color: #4bcf68; */ + display: flex; + flex-direction: column; + justify-content: space-between; +} +.over2_b2 div:nth-child(1){ + width: 100%; + height: 0.6rem; + /* background-color: aqua; */ + text-align: center; + line-height: 0.6rem; + font-size: 0.26rem; + font-weight: 600; +} +.over2_b2 div:nth-child(2){ + width: 100%; + height: 0.5rem; + /* background-color: antiquewhite; */ + text-align: center; + line-height: 0.5rem; + font-weight: 600; +} +.over2_b2 div:nth-child(3){ + width: 100%; + height: 0.8rem; + /* background-color: blue; */ + display: flex; + justify-content: space-around; + align-items: center; +} +.over2_b2 div:nth-child(3) button{ + width: 45%; + height: 0.5rem; + border: 0rem; +} +.over2_b2 div:nth-child(3) button:nth-child(1){ + background-color: white; + border: 0.04rem solid red; + color: red; +} +.over2_b2 div:nth-child(3) button:nth-child(2){ + background-color: red; + color: white; +} \ No newline at end of file diff --git a/demo_module/src/view/kfr/topic.jsx b/demo_module/src/view/kfr/topic.jsx new file mode 100644 index 0000000000000000000000000000000000000000..b2e789109c793b866d46fc11fca8f1467be4945f --- /dev/null +++ b/demo_module/src/view/kfr/topic.jsx @@ -0,0 +1,403 @@ +import React, { useState,useMemo } from "react"; +import { useNavigate } from 'react-router-dom' +import './topic.css' +import { NavBar } from 'antd-mobile' + +import { Button, Mask } from 'antd-mobile' +import { CheckOutline } from 'antd-mobile-icons' + +export default function Topic() { + const navigate = useNavigate() + const [num, setnum] = useState(0) + const [type, settype] = useState() + const [fla, setfla] = useState(false) + const [jiexi, setjiexi] = useState('') + const [zqda, setzqda] = useState('') + const [val, setval] = useState('') + const [list, setlist] = useState([ + [ { + id: 1, title: "React生命周期的方法有", xuan: [ + { id: 11, xiang: "A", name: "construct" }, + { id: 22, xiang: "B", name: "componentdidmount" }, + { id: 33, xiang: "C", name: "componentWillreceiveprops" }, + { id: 44, xiang: "D", name: "shouldComponentUpdate" }, + ], daan: 'D', xiangqing: "答案是D" + }], + + [{ + id: 2, title: "盒模型的组成包括", xuan: [ + { id: 11, xiang: "A", name: "标准盒模型" }, + { id: 22, xiang: "B", name: "怪异盒模型" }, + { id: 33, xiang: "C", name: "元素内容" }, + { id: 44, xiang: "D", name: "IE盒模型" }, + ], daan: 'C', xiangqing: "答案是C" + }], + + [{ + id: 3, title: "React中Hook有什么", xuan: [ + { id: 11, xiang: "A", name: "useState" }, + { id: 22, xiang: "B", name: "useHooks" }, + { id: 33, xiang: "C", name: "useAbhjk" }, + { id: 44, xiang: "D", name: "useObfj" }, + ], daan: 'A', xiangqing: "答案是A" + }], + + [{ + id: 4, title: "扩展运算符有哪些作用", xuan: [ + { id: 11, xiang: "A", name: "创建数组" }, + { id: 22, xiang: "B", name: "复制数组" }, + { id: 33, xiang: "C", name: "创建新数组" }, + { id: 44, xiang: "D", name: "更新新的数组" }, + ], daan: 'B', xiangqing: "答案是B" + }], + [{ + id: 5, title: "nodejs的内置模块有什么", xuan: [ + { id: 11, xiang: "A", name: "我不知道" }, + { id: 22, xiang: "B", name: "我不清楚" }, + { id: 33, xiang: "C", name: "path模块" }, + { id: 44, xiang: "D", name: "我不太会" }, + ], daan: 'C', xiangqing: "答案是C" + }], + [{ + id: 6, title: "React生命周期的方法有", xuan: [ + { id: 11, xiang: "A", name: "construct" }, + { id: 22, xiang: "B", name: "componentdidmount" }, + { id: 33, xiang: "C", name: "componentWillreceiveprops" }, + { id: 44, xiang: "D", name: "shouldComponentUpdate" }, + ], daan: 'D', xiangqing: "答案D" + }], + + [{ + id: 7, title: "盒模型的组成包括", xuan: [ + { id: 11, xiang: "A", name: "标准盒模型" }, + { id: 22, xiang: "B", name: "怪异盒模型" }, + { id: 33, xiang: "C", name: "元素内容" }, + { id: 44, xiang: "D", name: "IE盒模型" }, + ], daan: 'C', xiangqing: "答案是C" + }], + + [{ + id: 8, title: "React中Hook有什么", xuan: [ + { id: 11, xiang: "A", name: "useState" }, + { id: 22, xiang: "B", name: "useHooks" }, + { id: 33, xiang: "C", name: "useAbhjk" }, + { id: 44, xiang: "D", name: "useObfj" }, + ], daan: 'A', xiangqing: "答案是A" + }], + + [{ + id: 9, title: "扩展运算符有哪些作用", xuan: [ + { id: 11, xiang: "A", name: "创建数组" }, + { id: 22, xiang: "B", name: "复制数组" }, + { id: 33, xiang: "C", name: "创建新数组" }, + { id: 44, xiang: "D", name: "更新新的数组" }, + ], daan: 'B', xiangqing: "答案是B" + }], + [{ + id: 10, title: "nodejs的内置模块有什么", xuan: [ + { id: 11, xiang: "A", name: "我不知道" }, + { id: 22, xiang: "B", name: "我不清楚" }, + { id: 33, xiang: "C", name: "path模块" }, + { id: 44, xiang: "D", name: "我不太会" }, + ], daan: 'C', xiangqing: "答案是C" + }], + [{ + id: 11, title: "React生命周期的方法有", xuan: [ + { id: 11, xiang: "A", name: "construct" }, + { id: 22, xiang: "B", name: "componentdidmount" }, + { id: 33, xiang: "C", name: "componentWillreceiveprops" }, + { id: 44, xiang: "D", name: "shouldComponentUpdate" }, + ], daan: 'D', xiangqing: "答案是D" + }], + + [{ + id: 12, title: "盒模型的组成包括", xuan: [ + { id: 11, xiang: "A", name: "标准盒模型" }, + { id: 22, xiang: "B", name: "怪异盒模型" }, + { id: 33, xiang: "C", name: "元素内容" }, + { id: 44, xiang: "D", name: "IE盒模型" }, + ], daan: 'C', xiangqing: "答案是C" + }], + + [{ + id: 13, title: "React中Hook有什么", xuan: [ + { id: 11, xiang: "A", name: "useState" }, + { id: 22, xiang: "B", name: "useHooks" }, + { id: 33, xiang: "C", name: "useAbhjk" }, + { id: 44, xiang: "D", name: "useObfj" }, + ], daan: 'A', xiangqing: "答案是A" + }], + + [{ + id: 14, title: "扩展运算符有哪些作用", xuan: [ + { id: 11, xiang: "A", name: "创建数组" }, + { id: 22, xiang: "B", name: "复制数组" }, + { id: 33, xiang: "C", name: "创建新数组" }, + { id: 44, xiang: "D", name: "更新新的数组" }, + ], daan: 'B', xiangqing: "答案是B" + }], + [{ + id: 15, title: "nodejs的内置模块有什么", xuan: [ + { id: 11, xiang: "A", name: "我不知道" }, + { id: 22, xiang: "B", name: "我不清楚" }, + { id: 33, xiang: "C", name: "path模块" }, + { id: 44, xiang: "D", name: "我不太会" }, + ], daan: 'C', xiangqing: "答案是C" + }], + [{ + id: 16, title: "React生命周期的方法有", xuan: [ + { id: 11, xiang: "A", name: "construct" }, + { id: 22, xiang: "B", name: "componentdidmount" }, + { id: 33, xiang: "C", name: "componentWillreceiveprops" }, + { id: 44, xiang: "D", name: "shouldComponentUpdate" }, + ], daan: 'D', xiangqing: "答案是D" + }], + + [{ + id: 17, title: "盒模型的组成包括", xuan: [ + { id: 11, xiang: "A", name: "标准盒模型" }, + { id: 22, xiang: "B", name: "怪异盒模型" }, + { id: 33, xiang: "C", name: "元素内容" }, + { id: 44, xiang: "D", name: "IE盒模型" }, + ], daan: 'C', xiangqing: "答案是C" + }], + + [{ + id: 18, title: "React中Hook有什么", xuan: [ + { id: 11, xiang: "A", name: "useState" }, + { id: 22, xiang: "B", name: "useHooks" }, + { id: 33, xiang: "C", name: "useAbhjk" }, + { id: 44, xiang: "D", name: "useObfj" }, + ], daan: 'A', xiangqing: "答案是D" + }], + + [{ + id: 19, title: "扩展运算符有哪些作用", xuan: [ + { id: 11, xiang: "A", name: "创建数组" }, + { id: 22, xiang: "B", name: "复制数组" }, + { id: 33, xiang: "C", name: "创建新数组" }, + { id: 44, xiang: "D", name: "更新新的数组" }, + ], daan: 'B', xiangqing: "答案是B" + }], + [{ + id: 20, title: "nodejs的内置模块有什么", xuan: [ + { id: 11, xiang: "A", name: "我不知道" }, + { id: 22, xiang: "B", name: "我不清楚" }, + { id: 33, xiang: "C", name: "path模块" }, + { id: 44, xiang: "D", name: "我不太会" }, + ], daan: 'C', xiangqing: "答案是C" + }], + ]) + const [list1,setlist1]=useState([]) + + const count1=useMemo(()=>{ + return list.length + }) + const count2=useMemo(()=>{ + return num+1 + }) + const handleclick1 = () => { + setnum(num - 1) + settype() + if(num==0){ + setnum(0) + } + } + const handleclick2 = () => { + setnum(num + 1) + settype() + if(num==list.length-1){ + setnum(list.length-1) + } + } + const handleclick3 = (ele, ele1, index1) => { + settype(index1) + let list2=[...list1] + list2.push(ele1.xiang) + setlist1(list2) + } + const handleclick4 = (ele) => { + setfla(true) + setjiexi(ele.xiangqing) + setzqda(ele.daan) + setval(ele.daan) + } + const handleclick5=()=>{ + setnum(0) + setVisible3(false) + settype() + } + const handleclick6=()=>{ + navigate(`/answer`,{state:{list,list1}}) + } + const [visible1, setVisible1] = useState(false) + const [visible2, setVisible2] = useState(false) + const [visible3, setVisible3] = useState(false) + + + return ( + <> + { + fla == false ? ( + <> +
{ navigate('/homepage/test') }}> + 练习题 +
+ + ) : ( + <> +
setfla(false)}> + 练习题 +
+ + ) + } +
+
+ setVisible1(false)}> +
+

我要报错

+ + +
+
+
setVisible1(true)}>报错
+
+ +
+
+
+
+ +
+
setVisible2(true)}>标记
+ setVisible2(false)}> +
+
+
+ +
+
+
+ 标记成功,可在有思路时,继续作答哦 +
+
+ +
+
+
+ + +
+
+ + { + list[num].map((ele, index) => { + return
+
+

+ (单选)  + {ele.title} +

+
+
+
    + { + ele.xuan.map((ele1, index1) => { + return
  • + { + fla == false ? ( + <> +
    handleclick3(ele, ele1, index1)} className={type == index1 ? "actived" : ""}> + {ele1.xiang} +
    + + ) : ( + <> +
    + { + val != ele1.xiang ? ( + <>{ele1.xiang} + ) : ( + <>√ + ) + } +
    + + ) + } +
    {ele1.name}
    +
  • + }) + } +
+
+ + + { + fla == false ? ( + <> +
+
+ +
+
+

+ + +

+
+
+ + ) : ( + <> +
+
+ 习题解析 + ——————————————————————— +
+
+ 正确答案: + {zqda} +
+
+ +
+
+ + ) + } +
+ }) + } + + +
+
+

setVisible3(true)}>重新练习

+ setVisible3(false)}> +
+
+
+
您要重新练习吗?
+
重新练习会覆盖之前的练习进度呦~
+
+ + +
+
+
+
+
+
+
handleclick6()}> + +
+
{count2}/{count1}
+
+
+ + ) +} \ No newline at end of file