diff --git a/config/router.config.js b/config/router.config.js index b8e656f770e2dc2429df2aad40a3e673b5687e83..b8e5c61f0489396cce5c08866e86e856a597c6fb 100644 --- a/config/router.config.js +++ b/config/router.config.js @@ -61,15 +61,87 @@ export default [ { key: '315', path: '/exam/question/list', - isFull: true, + isFull: true, component: './exam/question/list', }, { key: '316', path: '/exam/question/single', - isFull: true, + isFull: true, component: './exam/question/single', }, + { + key: '316', + path: '/exam/question/multiple', + isFull: true, + component: './exam/question/multiple', + }, + { + key: '316', + path: '/exam/question/judgment', + isFull: true, + component: './exam/question/judgment', + }, + { + key: '316', + path: '/exam/question/completion', + isFull: true, + component: './exam/question/completion', + }, + { + key: '316', + path: '/exam/question/short', + isFull: true, + component: './exam/question/short', + }, + { + key: '316', + path: '/exam/question/caseChoice', + isFull: true, + component: './exam/question/caseChoice', + }, + { + key: '316', + path: '/exam/question/caseMultiple', + isFull: true, + component: './exam/question/caseMultiple', + }, + { + key: '316', + path: '/exam/question/b1', + isFull: true, + component: './exam/question/b1', + }, + { + key: '316', + path: '/exam/question/argumentation', + isFull: true, + component: './exam/question/argumentation', + }, + { + key: '316', + path: '/exam/question/analytical', + isFull: true, + component: './exam/question/analytical', + }, + { + key: '317', + path: '/exam/question/submit/analysis/:type', + isFull: true, + component: './exam/question/submitAnalysis', + }, + { + key: '317', + path: '/profile/notice', + isFull: true, + component: './profile/notice', + }, + { + key: '317', + path: '/profile/order', + isFull: true, + component: './profile/order', + }, ], }, ], diff --git a/public/images/profile/avatar.png b/public/images/profile/avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..08e9200d81ad2706e22f5824f310cf8ccc68af4e Binary files /dev/null and b/public/images/profile/avatar.png differ diff --git a/public/images/profile/error-question.svg b/public/images/profile/error-question.svg new file mode 100644 index 0000000000000000000000000000000000000000..d72ffa8c2d107750a37662ade609f0f5d7696e02 --- /dev/null +++ b/public/images/profile/error-question.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/join-vip.svg b/public/images/profile/join-vip.svg new file mode 100644 index 0000000000000000000000000000000000000000..6ffe91305d8e61ffbb933e05396ddd2540721126 --- /dev/null +++ b/public/images/profile/join-vip.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/link-me.svg b/public/images/profile/link-me.svg new file mode 100644 index 0000000000000000000000000000000000000000..f2b9cc683e4b1e218fa7a1d554978717b96528cd --- /dev/null +++ b/public/images/profile/link-me.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/my-course.svg b/public/images/profile/my-course.svg new file mode 100644 index 0000000000000000000000000000000000000000..6d71acbf36f1d1ad83282db998b5d8a20d655b56 --- /dev/null +++ b/public/images/profile/my-course.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/my-order.svg b/public/images/profile/my-order.svg new file mode 100644 index 0000000000000000000000000000000000000000..33033ef5bb386e77edda16152e56fbc8b6f37449 --- /dev/null +++ b/public/images/profile/my-order.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/my-start.svg b/public/images/profile/my-start.svg new file mode 100644 index 0000000000000000000000000000000000000000..cad79a8b8e97b4a6455530a601ce3854dcb4d050 --- /dev/null +++ b/public/images/profile/my-start.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/notice.svg b/public/images/profile/notice.svg new file mode 100644 index 0000000000000000000000000000000000000000..7809a53983959278fa3db337094139c50a92662b --- /dev/null +++ b/public/images/profile/notice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/refueling-card.svg b/public/images/profile/refueling-card.svg new file mode 100644 index 0000000000000000000000000000000000000000..c4ee3ddce16c92419d280a762bf99c0fd143e0f7 --- /dev/null +++ b/public/images/profile/refueling-card.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/right.svg b/public/images/profile/right.svg new file mode 100644 index 0000000000000000000000000000000000000000..9a84fa85451fe37c31673ac7bd1a8e316b10e7d7 --- /dev/null +++ b/public/images/profile/right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/profile/signup.svg b/public/images/profile/signup.svg new file mode 100644 index 0000000000000000000000000000000000000000..d3876dff37ced867ddff7b0ea9bd704b96cb0307 --- /dev/null +++ b/public/images/profile/signup.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 91158aac7b42e7b94c661ef9f946818764ddf66c..a113ddcd47c3b09c6dfe7f0e4809b104fd1aba01 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -1,11 +1,11 @@ import React from 'react'; import HomeLayout from './HomeLayout'; import BlankLayout from './BlankLayout'; - +import {getActiveRoute} from '@/utils'; const Index = (props) => { console.log(props); - const item = props.route.routes.find(x => props.location.pathname === x.path); + const item =getActiveRoute(props.route.routes,props.location.pathname); if (item && item.isFull) { console.log('full layout'); return {props.children}; diff --git a/src/pages/exam/components/analysis/index.js b/src/pages/exam/components/analysis/index.js new file mode 100644 index 0000000000000000000000000000000000000000..33e229af01ad53d1ef86372f77560a4fc04d2301 --- /dev/null +++ b/src/pages/exam/components/analysis/index.js @@ -0,0 +1,23 @@ +import React from 'react'; +import styles from './index.less'; +import { TextareaItem ,Button} from 'antd-mobile'; + +const Index = () => { + return ( +
+
+
题型解析
+
形变是怎么定义的?它有哪些形式?
+
+ +
+ +
+
+ ); +}; + +export default Index; diff --git a/src/pages/exam/components/analysis/index.less b/src/pages/exam/components/analysis/index.less new file mode 100644 index 0000000000000000000000000000000000000000..d39106315d8674a155c033bd78e01ab6a8540154 --- /dev/null +++ b/src/pages/exam/components/analysis/index.less @@ -0,0 +1,30 @@ +.root{ + .header{ + padding: 16px; + background-color: #202030; + height: 250px; + .title{ + padding: 24px 0; + font-size: 28px; + color: #ffffff; + } + .content{ + color: #A9A9A9; + font-size: 14px; + } + } + .action{ + :global { + .am-button { + margin: 0 auto; + color: #ffffff; + line-height: 40px; + font-size: 16px; + width: 311px; + height: 40px; + background: linear-gradient(270deg, rgba(23, 106, 254, 1) 0%, rgba(97, 159, 255, 1) 100%); + border-radius: 20px; + } + } + } +} \ No newline at end of file diff --git a/src/pages/exam/components/select/index.js b/src/pages/exam/components/select/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5d7ea894dd7e636d97575df043955eeee74fa3bc --- /dev/null +++ b/src/pages/exam/components/select/index.js @@ -0,0 +1,81 @@ +import React, { useState } from 'react'; +import router from 'umi/router'; + +import styles from './index.less'; +import config from '@/config'; +import { Button } from 'antd-mobile'; +import classNames from 'classNames'; +import Option from './option'; +const Index = ({ type = 0, analysis, title, total, no, rightAnswer, optionList = [] }) => { + const [isShowAnswer, setIsShowAnswer] = useState(false); + const [options, setOptions] = useState(optionList); + + const showAnswer = () => { + setIsShowAnswer(true); + }; + + const goSubmitAnalysis = () => { + router.push('/exam/question/submit/analysis/0'); + }; + + const selectOption = () => {}; + + const handleSelect = (id, isSelected) => { + options.forEach(item => { + if(type===0){ + item.isSelected = false; + } + if (id === item.id) item.isSelected = isSelected; + + }); + setOptions([...options]); + }; + + /** + * 渲染选项 + */ + const renderOption = () => { + return options.map((item, index) => { + return