Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
961a5932
Commit
961a5932
authored
Aug 13, 2021
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:完成考试详情页联调
parent
735a13ce
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
54 deletions
+58
-54
src/common/less/icon-font.less
+4
-4
src/h5.html
+3
-3
src/index.html
+3
-3
src/modules/task-center/data-center/UserLearningData.jsx
+3
-3
src/modules/task-center/data-center/components/LeftStageList.jsx
+3
-9
src/modules/task-center/data-center/components/LeftStageList.less
+6
-3
src/modules/task-center/data-center/components/TestLinkTaskData.jsx
+28
-29
src/modules/task-center/data-center/components/TestLinkTaskData.less
+8
-0
No files found.
src/common/less/icon-font.less
View file @
961a5932
@font-face {
font-family: 'iconfont'; /* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_
obblua8v3q.woff2?t=162815151857
8') format('woff2'),
url('//at.alicdn.com/t/font_2223403_obblua8v3q.woff?t=162815151857
8') format('woff'),
url('//at.alicdn.com/t/font_2223403_obblua8v3q.ttf?t=162815151857
8') format('truetype');
font-family: 'iconfont';
/* Project id 2223403 */
src: url('//at.alicdn.com/t/font_2223403_
2digpsfgq8l.woff2?t=162885386469
8') format('woff2'),
url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.woff?t=162885386469
8') format('woff'),
url('//at.alicdn.com/t/font_2223403_2digpsfgq8l.ttf?t=162885386469
8') format('truetype');
}
.iconfont {
font-family: 'iconfont' !important;
...
...
src/h5.html
View file @
961a5932
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
5-26 16:26:17
* @LastEditors:
wufan
* @LastEditTime: 2021-0
8-13 19:25:12
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
...
...
@@ -25,7 +25,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
oqqm4z9s35j
.css"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
2digpsfgq8l
.css"
>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
src/index.html
View file @
961a5932
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @LastEditors:
yuananting
* @LastEditTime: 2021-08-1
1 15:06:32
* @LastEditors:
wufan
* @LastEditTime: 2021-08-1
3 19:25:18
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
...
...
@@ -29,7 +29,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel=
"manifest"
href=
"%PUBLIC_URL%/manifest.json"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
obblua8v3q
.css"
/>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_2223403_
2digpsfgq8l
.css"
/>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
...
...
src/modules/task-center/data-center/UserLearningData.jsx
View file @
961a5932
/*
* @Author: yuananting
* @Date: 2021-08-05 10:55:49
* @LastEditors:
yuananting
* @LastEditTime: 2021-08-1
2 19:23:56
* @LastEditors:
wufan
* @LastEditTime: 2021-08-1
3 17:10:58
* @Description: 个人学习详情
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
...
@@ -69,7 +69,7 @@ function UserLearningData(props) {
{
tabList
.
map
((
item
)
=>
{
return
(
<
TabPane
tab=
{
item
.
name
}
key=
{
item
.
key
}
>
{
<
item
.
compoment
detail=
{
detail
}
/>
}
{
<
item
.
compoment
detail=
{
detail
}
taskId=
{
taskId
}
/>
}
</
TabPane
>
);
})
}
...
...
src/modules/task-center/data-center/components/LeftStageList.jsx
View file @
961a5932
...
...
@@ -31,15 +31,9 @@ function LeftStageList(props) {
>
<
div
className=
"icon"
>
{
item
.
isShowMoreCourse
?
(
<
img
src=
"https://image.xiaomaiketang.com/xm/YtihN8T7sT.png"
alt=
""
/>
<
span
className=
"icon iconfont edit-icon"
>

</
span
>
)
:
(
<
img
src=
"https://image.xiaomaiketang.com/xm/RmG5tbhmep.png"
alt=
""
/>
<
span
className=
"icon iconfont edit-icon"
>

</
span
>
)
}
</
div
>
<
div
className=
"stage-name"
>
...
...
@@ -48,7 +42,7 @@ function LeftStageList(props) {
</
div
>
{
!
item
.
isShowMoreCourse
&&
(
<
div
className=
"exam-list"
>
{
item
.
co
urse
VOList
.
map
((
examItem
,
examIdndex
)
=>
{
{
item
.
co
ntentVOList
&&
item
.
content
VOList
.
map
((
examItem
,
examIdndex
)
=>
{
return
(
<
div
key=
{
examIdndex
}
...
...
src/modules/task-center/data-center/components/LeftStageList.less
View file @
961a5932
...
...
@@ -12,9 +12,12 @@
line-height: 44px;
margin-right: 8px;
cursor: pointer;
img {
width: 24px;
height: 24px;
.iconfont {
line-height: 15px;
font-size: 10px;
margin: 0 8px;
display: inline-block;
color: #666;
}
&.active {
background: rgba(41, 102, 255, 0.06);
...
...
src/modules/task-center/data-center/components/TestLinkTaskData.jsx
View file @
961a5932
...
...
@@ -5,44 +5,37 @@ import TestDetailPage from "@/modules/teach-tool/examination-manager/TestDetailP
import
{
Route
,
withRouter
}
from
"react-router-dom"
;
import
Service
from
"@/common/js/service"
;
import
LottieIcon
from
"@/components/LottieIcon"
;
import
User
from
'@/common/js/user'
;
function
TestLinkTaskData
(
props
)
{
const
[
stageExamList
,
setStageExamList
]
=
useState
([]);
const
[
activeExam
,
setActiveExam
]
=
useState
({});
const
[
activeStage
,
setActiveStage
]
=
useState
({});
const
[
isShow
,
setIsShow
]
=
useState
(
true
);
const
{
taskId
,
detail
:
{
storeCustomerId
}}
=
props
;
useEffect
(()
=>
{
getTrainingTaskDetail
();
},
[]);
function
getTrainingTaskDetail
()
{
Service
.
Hades
(
"public/hades/getTaskCustomerDetail"
,
{
taskId
:
"1412706381214687233"
,
storeId
:
"1192022572770412395"
,
storeCustomerId
:
"1384073988114677761"
,
// todolist 数据写死调接口
// taskId: props.match.params.taskId.replace(/\?.+/, ""),
// storeId: User.getStoreId(),
// storeCustomerId: User.getCustomerId(),
taskId
:
taskId
,
storeId
:
User
.
getStoreId
(),
storeCustomerId
:
storeCustomerId
,
}).
then
((
res
)
=>
{
const
data
=
{
...
res
.
result
};
const
{
stageCustomerVOList
=
[]
}
=
data
;
if
(
!!
stageCustomerVOList
.
length
)
{
setStageExamList
(
stageCustomerVOList
);
setActiveStage
(
stageCustomerVOList
[
0
]);
setActiveExam
(
stage
CustomerVOList
[
0
].
course
VOList
[
0
]);
const
{
contentId
,
paperId
}
=
stage
CustomerVOList
[
0
].
course
VOList
[
0
];
const
{
stage
Exam
CustomerVOList
=
[]
}
=
data
;
if
(
!!
stage
Exam
CustomerVOList
.
length
)
{
setStageExamList
(
stage
Exam
CustomerVOList
);
setActiveStage
(
stage
Exam
CustomerVOList
[
0
]);
setActiveExam
(
stage
ExamCustomerVOList
[
0
].
content
VOList
[
0
]);
const
{
contentId
,
paperId
}
=
stage
ExamCustomerVOList
[
0
].
content
VOList
[
0
];
const
{
match
}
=
props
;
const
path
=
`
${
match
.
url
}
/test-detail/
1424698828831531009?paperId=1408034318353940481&userId=1351455073595023362
&fromTrainingTask=true`
;
const
path
=
`
${
match
.
url
}
/test-detail/
${
contentId
}
?paperId=
${
paperId
}
1&userId=
${
storeCustomerId
}
&fromTrainingTask=true`
;
window
.
RCHistory
.
replace
(
path
);
}
// const { stageExamCustomerVOList = [] } = data;
// if (stageExamCustomerVOList.length) {
// setStageExamList(stageExamCustomerVOList);
// setActiveStage(stageExamCustomerVOList[0]);
// setActiveExam(stageExamCustomerVOList[0].courseVOList[0]);
// }
});
}
...
...
@@ -52,13 +45,10 @@ function TestLinkTaskData(props) {
setActiveStage
(
_activeStage
);
const
{
contentId
,
paperId
}
=
_activeExam
;
const
{
match
}
=
props
;
const
path
=
`
${
match
.
url
}
/test-detail/1424698828831531009?paperId=1408034318353940481&userId=1351455073595023362&fromTrainingTask=true`
;
const
path
=
`
${
match
.
url
}
/test-detail/
${
contentId
}
?paperId=
${
paperId
}
&userId=
${
111
}
`
;
window
.
RCHistory
.
replace
(
path
);
// window.RCHistory.push({
// pathname: `${
// props.match.url
// }/test-detail/${contentId}?paperId=${paperId}&userId=${111}`,
// });
}
function
toggleShowBar
(
diretion
)
{
...
...
@@ -97,10 +87,19 @@ function TestLinkTaskData(props) {
/>
</
div
>
<
div
className=
{
`right-exam-data-box ${!isShow ? 'hidden':''}`
}
>
{
/* 未考过的考试显示暂无考试数据,否则请求接口会报错 */
}
{
activeExam
.
learnFinishPercentage
===
0
?
<
LottieIcon
title=
{
<
span
className=
"desc"
>
暂无考试数据
</
span
>
}
type=
"college"
size=
{
150
}
/>
:
<
Route
path=
{
`${props.match.url}/test-detail/:testId`
}
component=
{
TestDetailPage
}
/>
path=
{
`${props.match.url}/test-detail/:testId`
}
component=
{
TestDetailPage
}
/>
}
</
div
>
</
div
>
)
:
(
...
...
src/modules/task-center/data-center/components/TestLinkTaskData.less
View file @
961a5932
...
...
@@ -100,6 +100,14 @@
overflow-y: auto;
margin-top: -16px;
overflow-x: hidden;
@media screen and (max-width: 1400px) {
.lottie-icon {
text-align: center;
margin-top: 153px;
margin-bottom: 50px;
}
}
&.hidden {
width: calc(100vw - 200px);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment