diff --git a/config/router.config.js b/config/router.config.js index b8e5c61f0489396cce5c08866e86e856a597c6fb..e85a87a27b320ff39b04e943975fa7c88a63676e 100644 --- a/config/router.config.js +++ b/config/router.config.js @@ -142,6 +142,12 @@ export default [ isFull: true, component: './profile/order', }, + { + key: '317', + path: '/profile/course', + isFull: true, + component: './profile/course', + }, ], }, ], diff --git a/public/images/exam1.png b/public/images/exam1.png index 3953daa78b7ff615bb55383a04282910f2787085..e8a9e1ee4c3b7e85508247a111fd10ab752b66ab 100644 Binary files a/public/images/exam1.png and b/public/images/exam1.png differ diff --git a/src/pages/exam/components/list.js b/src/pages/exam/components/list/index.js similarity index 87% rename from src/pages/exam/components/list.js rename to src/pages/exam/components/list/index.js index 6749dc1f42911b002ff6e6357e655c0483252642..2e15d9c5c3440ad399cf1abda0ece0e0a3b2ec2e 100644 --- a/src/pages/exam/components/list.js +++ b/src/pages/exam/components/list/index.js @@ -2,7 +2,7 @@ import React from 'react'; import { SearchBar } from 'antd-mobile'; import Item from './item'; -import styles from './list.less'; +import styles from './index.less'; const Index = ({ dataSource=[], buttonLable, onClickLike, onClickShare, onClickButton,showCnt }) => { const renderItem = () => { @@ -21,7 +21,7 @@ const Index = ({ dataSource=[], buttonLable, onClickLike, onClickShare, onClickB
-
{renderItem()}
+
{renderItem()}
); diff --git a/src/pages/exam/components/list/index.less b/src/pages/exam/components/list/index.less new file mode 100644 index 0000000000000000000000000000000000000000..26d145deab6dde43b13df11c96b04dc7200e6792 --- /dev/null +++ b/src/pages/exam/components/list/index.less @@ -0,0 +1,14 @@ +@import "~@/themes/vars.less"; + +.root{ + font-size: @font-size-sm; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 16px; + .list{ + padding-top: 16px; + } +} \ No newline at end of file diff --git a/src/pages/exam/components/item.js b/src/pages/exam/components/list/item.js similarity index 93% rename from src/pages/exam/components/item.js rename to src/pages/exam/components/list/item.js index 767e2006448de4b5c9aa2c57a0278f3c8d7044fc..e480cf99d3e1c3330a0d41d1677f15dbb36230c8 100644 --- a/src/pages/exam/components/item.js +++ b/src/pages/exam/components/list/item.js @@ -20,7 +20,9 @@ const Index = ({ return (
- +
+ +
{title}
diff --git a/src/pages/exam/components/item.less b/src/pages/exam/components/list/item.less similarity index 85% rename from src/pages/exam/components/item.less rename to src/pages/exam/components/list/item.less index 4c65c2bdf582807193e4ec220fb3252ec1d69e98..acbf178a8ba6463ddc01ff37cdca666502675625 100644 --- a/src/pages/exam/components/item.less +++ b/src/pages/exam/components/list/item.less @@ -13,7 +13,7 @@ } display: flex; justify-content: space-between; - padding: @space-xxxs @space-xxs; + margin-bottom: 16px; img { border-radius: 5px; width: 120px; @@ -23,11 +23,12 @@ display: flex; flex-direction: column; justify-content: space-between; - padding-left: @space-xxxs; + padding: 4px 0 4px 16px; .title { font-size: @space-sm; - font-weight: 500; + font-weight: 600; color: @item-title-color; + line-height: 1.5; } .action { display: flex; diff --git a/src/pages/exam/components/select/index.js b/src/pages/exam/components/select/index.js index 5d7ea894dd7e636d97575df043955eeee74fa3bc..1c9f4ab5cc3ed9be84b12778f390b256b2574830 100644 --- a/src/pages/exam/components/select/index.js +++ b/src/pages/exam/components/select/index.js @@ -2,9 +2,7 @@ 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); @@ -18,7 +16,6 @@ const Index = ({ type = 0, analysis, title, total, no, rightAnswer, optionList = router.push('/exam/question/submit/analysis/0'); }; - const selectOption = () => {}; const handleSelect = (id, isSelected) => { options.forEach(item => { diff --git a/src/pages/exam/components/written/index.js b/src/pages/exam/components/written/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ec67014b516dccb95064af354a3678eed8017b80 --- /dev/null +++ b/src/pages/exam/components/written/index.js @@ -0,0 +1,65 @@ +import React, { useState } from 'react'; +import router from 'umi/router'; +import { Button, InputItem, TextareaItem } from 'antd-mobile'; + +import styles from './index.less'; +const Index = ({ type = 3, no, total, title, analysis, rightAnswer }) => { + const [isShowAnswer, setIsShowAnswer] = useState(false); + + const showAnswer = () => { + setIsShowAnswer(true); + }; + + const goSubmitAnalysis = () => { + router.push('/exam/question/submit/analysis/0'); + }; + + return ( +
+
+
+ {no}/{total}、{title} +
+
+ {type === 3 && ( +
+ +
+ )} + {(type === 4 || type === 6 || type === 8 || type === 9) && ( +
+ +
+ )} +
+ {isShowAnswer && ( +
+
正确答案为:{rightAnswer}
+
+ 题型解析:{analysis} +
+
+ 我要解析 +
+
+ )} + {!isShowAnswer && ( +
+ +
+ )} +
+
+
上一题
+
+ 跳转到 + 题 +
+
下一题
+
+
+ ); +}; +export default Index; diff --git a/src/pages/exam/components/written/index.less b/src/pages/exam/components/written/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e917ef4a074522299f561001a61d802eb3d0c433 --- /dev/null +++ b/src/pages/exam/components/written/index.less @@ -0,0 +1,117 @@ +.root { + height: 100%; + font-size: 16px; + padding: 16px; + display: flex; + flex-direction: column; + justify-content: space-between; + .content { + .title { + color: #202030; + font-weight: 600; + line-height: 1.5; + } + + .paper { + padding: 32px 0 48px; + :global { + .am-list-item { + padding-left: 0; + } + .am-list-line { + padding-right: 0; + } + .am-input-control { + height: 44px; + background: rgba(250, 250, 250, 1); + border-radius: 4px; + } + } + + .input { + input { + line-height: 44px; + padding-left: 16px; + } + } + + .textarea { + textarea { + background: rgba(250, 250, 250, 1); + border-radius: 4px; + padding-top: 8px; + padding-left: 16px; + } + } + } + + .submit { + :global { + .am-button { + line-height: 40px; + font-size: 16px; + width: 105px; + height: 40px; + background: linear-gradient(270deg, rgba(23, 106, 254, 1) 0%, rgba(97, 159, 255, 1) 100%); + border-radius: 20px; + } + } + } + + .answer { + .rightAnswer { + margin-bottom: 16px; + color: #3dc484; + } + .analysis { + margin-bottom: 16px; + font-size: 14px; + color: #202030; + line-height: 1.5; + span { + font-weight: 600; + } + } + .goAnalysis { + text-align: right; + color: #176aff; + } + } + } + .action { + display: flex; + justify-content: space-between; + font-size: 14px; + .pre { + width: 72px; + height: 32px; + background: #f9f9f9; + border-radius: 16px; + color: #cccccc; + font-weight: 600; + line-height: 32px; + text-align: center; + } + .input { + input { + width: 36px; + height: 26px; + border-radius: 4px; + border: 1px solid #eff4fe; + color: #176aff; + font-weight: 500; + margin: 0 12px; + } + } + .next { + width: 72px; + height: 32px; + line-height: 32px; + background: #e3edfe; + border-radius: 16px; + color: #176aff; + font-weight: 600; + text-align: center; + } + } +} diff --git a/src/pages/exam/question/analytical/index.js b/src/pages/exam/question/analytical/index.js index 47290c89f160807e53ec5616be4cb8f83daac01e..9f14829795c10e9610065bf98dd8307282d5d2a4 100644 --- a/src/pages/exam/question/analytical/index.js +++ b/src/pages/exam/question/analytical/index.js @@ -1,10 +1,10 @@ import React from 'react'; -import Select from '../../components/select'; +import Written from '../../components/written'; import styles from './index.less'; const Index = () => { const opt = { - type:1, + type:9, no: 1, total: 213, title: @@ -43,7 +43,7 @@ const Index = () => { }; return ( <> - + ); }; diff --git a/src/pages/exam/question/caseChoice/index.js b/src/pages/exam/question/caseChoice/index.js index 47290c89f160807e53ec5616be4cb8f83daac01e..ceccc9b4abc91d64d84d5e10b75e060c299843a5 100644 --- a/src/pages/exam/question/caseChoice/index.js +++ b/src/pages/exam/question/caseChoice/index.js @@ -1,10 +1,10 @@ import React from 'react'; -import Select from '../../components/select'; +import Written from '../../components/written'; import styles from './index.less'; const Index = () => { const opt = { - type:1, + type:4, no: 1, total: 213, title: @@ -43,7 +43,7 @@ const Index = () => { }; return ( <> - + ); }; diff --git a/src/pages/exam/question/completion/index.js b/src/pages/exam/question/completion/index.js index 47290c89f160807e53ec5616be4cb8f83daac01e..e331208b1b627225c15f069c967cb3ffd56fd739 100644 --- a/src/pages/exam/question/completion/index.js +++ b/src/pages/exam/question/completion/index.js @@ -1,10 +1,10 @@ import React from 'react'; -import Select from '../../components/select'; +import Written from '../../components/written'; import styles from './index.less'; const Index = () => { const opt = { - type:1, + type:3, no: 1, total: 213, title: @@ -43,7 +43,7 @@ const Index = () => { }; return ( <> - + ); }; diff --git a/src/pages/profile/balance/index.js b/src/pages/profile/balance/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/balance/index.less b/src/pages/profile/balance/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/basic/index.js b/src/pages/profile/basic/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/basic/index.less b/src/pages/profile/basic/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/basic/phone.js b/src/pages/profile/basic/phone.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/components/list/index.js b/src/pages/profile/components/list/index.js new file mode 100644 index 0000000000000000000000000000000000000000..2fd936b7ca3f54d937de8fb7efab24c27f0af30b --- /dev/null +++ b/src/pages/profile/components/list/index.js @@ -0,0 +1,21 @@ +import React from 'react'; +import Item from './item'; + +import styles from './index.less'; + +const Index = ({ dataSource=[]}) => { + const renderItem = () => { + return dataSource.map(x => ( + + )); + }; + return ( +
+
{renderItem()}
+
+ ); +}; + +export default Index; diff --git a/src/pages/exam/components/list.less b/src/pages/profile/components/list/index.less similarity index 90% rename from src/pages/exam/components/list.less rename to src/pages/profile/components/list/index.less index 8bb5454a3fcf35c0ff5d416065a2a896365a1ea7..da65dbe9fed6e2da3ba9792507ccdc75919628b3 100644 --- a/src/pages/exam/components/list.less +++ b/src/pages/profile/components/list/index.less @@ -7,4 +7,5 @@ display: flex; flex-direction: column; justify-content: space-between; + padding: 16px; } \ No newline at end of file diff --git a/src/pages/profile/components/list/item.js b/src/pages/profile/components/list/item.js new file mode 100644 index 0000000000000000000000000000000000000000..4de5bf87c8a1fcad03aded5622612f00321c8c39 --- /dev/null +++ b/src/pages/profile/components/list/item.js @@ -0,0 +1,29 @@ +import React from 'react'; +import { Button } from 'antd-mobile'; +import Icon from 'components/Icon'; +import styles from './item.less'; + +const Index = ({ id, image, title, like, share }) => { + return ( +
+
+ +
+
+
{title}
+
+
+ 有效期至 + 2020.05.10 +
+
+ 浏览 + 14222 +
+
+
+
+ ); +}; + +export default Index; diff --git a/src/pages/profile/components/list/item.less b/src/pages/profile/components/list/item.less new file mode 100644 index 0000000000000000000000000000000000000000..cefd7cb1608ef5ecdf0af84ffbff770345cbb5f7 --- /dev/null +++ b/src/pages/profile/components/list/item.less @@ -0,0 +1,55 @@ +@import '~@/themes/vars.less'; + +.root { + :global { + .am-button { + background-color: #176aff; + height: 24px; + line-height: 24px; + width: 64px; + border-radius: 10px; + font-size: 12px; + } + } + display: flex; + justify-content: space-between; + margin-bottom: 16px; + img { + border-radius: 5px; + width: 120px; + height: 92px; + } + .right { + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 4px 0 4px 16px; + .title { + font-size: @space-sm; + font-weight: 600; + color: @item-title-color; + line-height: 1.5; + } + .action { + display: flex; + justify-content: space-between; + .cnt{ + margin-left: 12px; + } + .limitTime { + height: 17px; + font-size: 12px; + font-weight: 500; + color: rgba(236, 164, 0, 1); + line-height: 17px; + } + .view { + height: 17px; + font-size: 12px; + font-weight: 500; + color: rgba(204, 204, 204, 1); + line-height: 17px; + } + } + } +} diff --git a/src/pages/profile/course/index.js b/src/pages/profile/course/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7136463074db6c7f9f2e6a936994e5597f849ecb --- /dev/null +++ b/src/pages/profile/course/index.js @@ -0,0 +1,37 @@ +import React from 'react'; +import List from '../components/list'; +const Index = () => { + const dataSource = [ + { + id: 1, + image: '/images/exam1.png', + title: '2020版中西医结合执业助理医师 模拟试', + like: 0, + share: 1, + }, + { + id: 2, + image: '/images/exam1.png', + title: '2020版中西医结合执业助理医师 模拟试', + like: 0, + share: 0, + }, + { + id: 3, + image: '/images/exam1.png', + title: '2020版中西医结合执业助理医师 模拟试', + like: 1, + share: 1, + }, + ]; + + const opt={ + dataSource, + } + return ( + <> + + + ); +}; +export default Index; diff --git a/src/pages/profile/index.js b/src/pages/profile/index.js index cef9e00962339909113a3cf7d339eaf21c7c52a8..55ea77028f75bbbf83ec77bd7a0d769123828544 100644 --- a/src/pages/profile/index.js +++ b/src/pages/profile/index.js @@ -64,10 +64,9 @@ const Index = () => {
加入会员
- {}}> + {router.push('/profile/order');}}>
{router.push('/profile/order');}} {...iconOpt} type={require('public/images/profile/my-order.svg')} /> @@ -84,7 +83,7 @@ const Index = () => {
错题集
- {}}> + {router.push('/profile/course');}}>
{}} diff --git a/src/pages/profile/integral/detail.js b/src/pages/profile/integral/detail.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/integral/exchange.js b/src/pages/profile/integral/exchange.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/integral/index.js b/src/pages/profile/integral/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/integral/index.less b/src/pages/profile/integral/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/order/index.js b/src/pages/profile/order/index.js index 49c9f4746ea1955a96c878267449aa32c1f5953b..b0ce512090f7d3d8488bd6154f76b782ae1b7e8e 100644 --- a/src/pages/profile/order/index.js +++ b/src/pages/profile/order/index.js @@ -7,21 +7,21 @@ const list = [ courseType: '购买普通课程', buyTime: '2012.01.23', invalidTime: '2012.01.23', - amount: 8, + amount: 8.00, }, { title: '医学细胞生物学(本临床定向)', courseType: '购买普通课程', - buyTime: '2012.01.23', - invalidTime: '2012.01.23', - amount: 8, + buyTime: '2020.3.28 09:47:11', + invalidTime: '2020.3.28 09:47:11', + amount: 8.00, }, { title: '医学细胞生物学(本临床定向)', courseType: '购买普通课程', - buyTime: '2012.01.23', - invalidTime: '2012.01.23', - amount: 8, + buyTime: '2020.3.28 09:47:11', + invalidTime: '2020.3.28 09:47:11', + amount: 8.00, }, ]; const Index = () => { diff --git a/src/pages/profile/order/index.less b/src/pages/profile/order/index.less index 741721650a013511ff23f61d951ff611a4b80e03..b44a63e4645125c0212995a303f6087eb20d8ba5 100644 --- a/src/pages/profile/order/index.less +++ b/src/pages/profile/order/index.less @@ -1,28 +1,50 @@ .root { height: 100%; - background:rgba(247,247,247,1); + background: rgba(247, 247, 247, 1); padding: 16px; .item { min-height: 121px; background: rgba(255, 255, 255, 1); border-radius: 4px; margin-bottom: 16px; - padding: 24px 16px; - .title{ - color: #202030; - font-size: 16px; - font-weight:600; - margin-bottom: 8px; + padding: 16px 16px; + .top { + display: flex; + justify-content: space-between; + .title{ + .courseTitle { + font-size: 16px; + font-weight: 600; + color: #202030; + line-height: 1.5; + } + .courseType { + font-size: 12px; + font-weight: 500; + color: rgba(144, 144, 150, 1); + line-height: 1.5; + } + } + + .amount { + height: 26px; + font-size: 20px; + font-weight: 500; + color: rgba(255, 0, 0, 1); + line-height: 2; + } } - .content{ - color: #909096; - font-size: 12px; - line-height: 1.5; - } - .noticeTime{ - text-align: right; - color: #CCCCCC; + .bottom { + margin-top: 16px; + height: 17px; font-size: 12px; + font-weight: 500; + color: rgba(204, 204, 204, 1); + line-height: 17px; + .time{ + display: flex; + justify-content: space-between; + } } } } diff --git a/src/pages/profile/refuelingCard/index.js b/src/pages/profile/refuelingCard/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/refuelingCard/index.less b/src/pages/profile/refuelingCard/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/vip/index.js b/src/pages/profile/vip/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/vip/index.less b/src/pages/profile/vip/index.less new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/pages/profile/vip/submit.js b/src/pages/profile/vip/submit.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391