Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
educationStu
Commits
cc63fa89
Commit
cc63fa89
authored
Mar 14, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
a401df8e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
465 additions
and
38 deletions
+465
-38
exam.js
src/api/exam.js
+36
-0
listen.vue
src/components/question/subject/listen.vue
+120
-15
readingCompre.vue
src/components/question/subject/readingCompre.vue
+14
-5
word.vue
src/components/question/word.vue
+13
-13
pages.json
src/pages.json
+2
-0
examGongu.vue
src/pages/exam/examGongu.vue
+67
-4
wrong.vue
src/pages/exam/wrong.vue
+206
-0
index.vue
src/pages/index/index.vue
+7
-1
No files found.
src/api/exam.js
View file @
cc63fa89
...
...
@@ -203,4 +203,40 @@ export function GetAppBankStatic(data) {
method
:
'post'
,
data
})
}
/**
* 获取错题数据
* @param {JSON参数} data
*/
export
function
GetPracticeWrongStatic
(
data
)
{
return
request
({
url
:
'/Exam/GetPracticeWrongStatic'
,
method
:
'post'
,
data
})
}
/**
* 获取单词错题
* @param {JSON参数} data
*/
export
function
GetPracticeWrongPage
(
data
)
{
return
request
({
url
:
'/Exam/GetPracticeWrongPage'
,
method
:
'post'
,
data
})
}
/**
* 设置错题已复习
* @param {JSON参数} data
*/
export
function
SetPracticeReview
(
data
)
{
return
request
({
url
:
'/Exam/SetPracticeReview'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/question/subject/listen.vue
View file @
cc63fa89
...
...
@@ -2,13 +2,17 @@
<!-- 听力题 -->
<view
class=
"listen"
>
<view
class=
"item"
>
<audio
style=
"text-align: left"
poster=
"http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg"
:src=
"dataObj.Src"
name=
"日语听力"
:action=
"audioAction"
controls
></audio>
<view>
<view
class=
"My_listen"
@
click=
"play(dataObj.Title)"
>
<i
class=
"icon_audio_default"
v-if=
"!isPlay"
></i>
<i
class=
"icon_audio_playing"
v-else
></i>
</view>
<!--
<audio
style=
"text-align: left"
ref=
"audio"
poster=
"http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg"
:src=
"getAudioSrc(dataObj.Title)"
name=
"日语听力"
:action=
"audioAction"
controls
></audio>
-->
<view
style=
"float: right;margin:20rpx 0;"
>
<text
class=
"Exam_Score"
>
(
{{
dataObj
.
Score
}}
分)
</text>
</view>
<view
class=
"item1"
:style=
"
{ height: `calc(100vh - 414rpx)` }">
<view
class=
"questionView"
>
<view
class=
"questionView"
v-if=
"!isShowJx"
>
<view
v-for=
"(item, index) in dataObj.QuestionContentObj"
:key=
"index"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view>
{{
index
+
1
}}
、(
{{
item
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view>
...
...
@@ -40,11 +44,11 @@
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"item.QuestionKey === 'single'"
>
<view
class=
"chooseNum"
:class=
"
{ 'is
TrueAnswer': item2.IsAnswer,'isNo
tAnswer':getErrorAnswer(dataObj,index,item2.Name)}">
:class=
"
{ 'is
RightAnswer': item2.Name==dataObj.QuestionAnswerList[index],'isNotRigh
tAnswer':getErrorAnswer(dataObj,index,item2.Name)}">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ 'is
TrueAnswer': item2.IsAnswer
,'isNotAnswer':getErrorAnswer(dataObj,index,item2.Name)}"
:class=
"
{ 'is
RightText': item2.Name==dataObj.QuestionAnswerList[index]
,'isNotAnswer':getErrorAnswer(dataObj,index,item2.Name)}"
v-html="item2.Content">
</view>
</view>
</view>
...
...
@@ -93,7 +97,9 @@
computed
,
onMounted
,
onUnmounted
,
}
from
"vue"
;
}
from
"vue"
;
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
false
;
export
default
{
props
:
{
paperData
:
Object
,
...
...
@@ -101,7 +107,8 @@
},
setup
(
props
,
context
)
{
let
{
refs
refs
,
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataObj
:
props
.
paperData
,
...
...
@@ -109,8 +116,8 @@
audioAction
:
{
method
:
"pause"
},
isPlay
:
false
});
let
methods
=
{
// 单选
singerChange
(
item1
,
index
,
item3
)
{
...
...
@@ -126,21 +133,55 @@
},
//获取音频链接
getAudioSrc
(
Src
){
let
arr
=
Src
.
split
(
" "
);
//按空格分段
var
MySrc
=
''
;
arr
.
map
((
e
)
=>
{
if
(
e
.
indexOf
(
"src"
)
!=
-
1
)
{
let
Before
=
e
.
split
(
"url="
)[
1
]
if
(
Before
)
{
MySrc
=
decodeURIComponent
(
Before
.
slice
(
0
,
-
1
));
}
}
});
return
MySrc
},
onchange
(
e
)
{
data
.
current
=
e
.
detail
.
current
;
play
(
Src
)
{
let
arr
=
Src
.
split
(
" "
);
//按空格分段
var
MySrc
=
''
;
arr
.
map
((
e
)
=>
{
if
(
e
.
indexOf
(
"src"
)
!=
-
1
)
{
let
Before
=
e
.
split
(
"url="
)[
1
]
if
(
Before
)
{
MySrc
=
decodeURIComponent
(
Before
.
slice
(
0
,
-
1
));
}
}
});
if
(
data
.
isPlay
){
innerAudioContext
.
pause
();
data
.
isPlay
=
false
;
}
else
{
innerAudioContext
.
src
=
MySrc
;
innerAudioContext
.
play
()
data
.
isPlay
=
true
;
innerAudioContext
.
onEnded
((
e
)
=>
{
data
.
isPlay
=
false
;
})
}
},
//父组件切换调用
clickParent
(){
innerAudioContext
.
stop
();
}
};
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
}
,
}
};
</
script
>
<
style
scoped
>
...
...
@@ -184,7 +225,17 @@
align-items
:
center
;
justify-content
:
space-between
;
}
.isRightAnswer
{
background-color
:
green
;
color
:
#fff
!important
;
}
.isRightText
{
color
:
green
!important
;
}
.isNotRightAnswer
{
background-color
:
red
!important
;
color
:
#fff
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
...
...
@@ -312,4 +363,58 @@
.isCanNext
{
background-color
:
gray
!important
;
}
.icon_audio_default
{
background
:
transparent
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/iconloop.png')
no-repeat
0
0
;
width
:
18px
;
height
:
25px
;
vertical-align
:
middle
;
display
:
inline-block
;
-webkit-background-size
:
54px
25px
;
background-size
:
54px
25px
;
background-position
:
-36px
center
;
}
.icon_audio_playing
{
background
:
transparent
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/iconloop.png')
no-repeat
0
0
;
width
:
18px
;
height
:
25px
;
vertical-align
:
middle
;
display
:
inline-block
;
-webkit-background-size
:
54px
25px
;
background-size
:
54px
25px
;
-webkit-animation
:
audio_playing
1s
infinite
;
background-position
:
0px
center
;
}
@-webkit-keyframes
audio_playing
{
30
%
{
background-position
:
0px
center
;
}
31
%
{
background-position
:
-18px
center
;
}
61
%
{
background-position
:
-18px
center
;
}
61
.5
%
{
background-position
:
-36px
center
;
}
100
%
{
background-position
:
-36px
center
;
}
}
.My_listen
{
width
:
170
rpx
;
height
:
170
rpx
;
background-color
:
#E4E5FB
;
border-radius
:
50%
;
margin
:
0
auto
30
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
src/components/question/subject/readingCompre.vue
View file @
cc63fa89
...
...
@@ -11,7 +11,7 @@
<view
style=
"margin:30rpx;"
class=
"Exam_Score"
>
本阅读理解共
{{
dataObj
.
QuestionContentObj
.
length
}}
小题(
{{
dataObj
.
Score
}}
分)
</text>
</view>
<view
class=
"questionView"
>
<view
class=
"questionView"
v-if=
"!isShowJx"
>
<view
v-for=
"(item, index) in dataObj.QuestionContentObj"
:key=
"index"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
...
...
@@ -45,10 +45,10 @@
<!-- 单选-->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'single' || item2.QuestionKey === 'single-number'"
>
<view
class=
"chooseNum"
:class=
"
{ 'is
TrueAnswer': item3.IsAnswer,'isNo
tAnswer':getErrorAnswer(dataObj,index2,item3.Name)}">
<view
class=
"chooseNum"
:class=
"
{ 'is
RightAnswer': item3.Name==dataObj.QuestionAnswerList[index2],'isNotRigh
tAnswer':getErrorAnswer(dataObj,index2,item3.Name)}">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{
isTrueAnswer: item3.IsAnswer
}"
<view
class=
"chooseName"
:class=
"
{
'isRightText': item3.Name==dataObj.QuestionAnswerList[index2],'isNotAnswer':getErrorAnswer(dataObj,index2,item3.Name)
}"
v-html="item3.Content">
</view>
</view>
</view>
...
...
@@ -192,11 +192,20 @@
.isTrueAnswer
{
color
:
green
!important
;
}
.isRightAnswer
{
background-color
:
green
;
color
:
#fff
!important
;
}
.isRightText
{
color
:
green
!important
;
}
.isNotRightAnswer
{
background-color
:
red
!important
;
color
:
#fff
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.ExamIndex_Box
{
margin-right
:
48
rpx
;
}
...
...
src/components/question/word.vue
View file @
cc63fa89
...
...
@@ -19,7 +19,7 @@
</view>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<
template
v-if=
"item1.Stu
nde
tAnswer.length==0"
>
<
template
v-if=
"item1.Stu
den
tAnswer.length==0"
>
<view
class=
"chooseNum"
@
click=
"change(item1, item2)"
>
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(item1, item2)"
v-html=
"item2.Content"
></view>
...
...
@@ -35,17 +35,17 @@
</view>
</
template
>
</view>
<view
class=
"AnswerContent"
v-if=
"item1.Stu
nde
tAnswer.length>0"
>
<view
class=
"AnswerContent"
v-if=
"item1.Stu
den
tAnswer.length>0"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{ item1.QuestionAnswerList[0] }}
</text>
,
<text>
您的答案是:
<
template
v-if=
"item1.Stu
nde
tAnswer.length>0"
>
<text
v-if=
"item1.Stu
nde
tAnswer[0] == item1.QuestionAnswerList[0]"
<
template
v-if=
"item1.Stu
den
tAnswer.length>0"
>
<text
v-if=
"item1.Stu
den
tAnswer[0] == item1.QuestionAnswerList[0]"
class=
"isTrueAnswer"
>
{{
item1
.
Stu
nde
tAnswer
}}
,回答正确
{{
item1
.
Stu
den
tAnswer
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
Stu
nde
tAnswer
[
0
]
}}
,回答错误
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
item1
.
Stu
den
tAnswer
[
0
]
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
...
...
@@ -113,9 +113,9 @@
},
//点击选择答案
change
(
item1
,
item2
)
{
item1
.
Stu
nde
tAnswer
[
0
]
=
item2
.
Name
;
item1
.
Stu
den
tAnswer
[
0
]
=
item2
.
Name
;
if
(
item1
.
QuestionAnswerList
&&
item1
.
QuestionAnswerList
.
length
>
0
)
{
if
(
item1
.
Stu
nde
tAnswer
[
0
]
==
item1
.
QuestionAnswerList
[
0
])
{
if
(
item1
.
Stu
den
tAnswer
[
0
]
==
item1
.
QuestionAnswerList
[
0
])
{
data
.
current
+=
1
;
}
}
...
...
@@ -128,19 +128,19 @@
QuestionContent
:
item1
.
QuestionContentObj
,
QuestionTypeId
:
item1
.
QuestionTypeId
,
QuestionTypeKey
:
item1
.
QuestionTypeKey
,
StudentAnswer
:
item1
.
Stu
nde
tAnswer
,
StudentAnswer
:
item1
.
Stu
den
tAnswer
,
Answer
:
item1
.
Answer
,
AnswerParse
:
item1
.
AnswerParse
,
LevelType
:
item1
.
LevelType
,
IsAnswer
:
0
,
IsWrong
:
0
}
if
(
item1
.
Stu
nde
tAnswer
.
length
>
0
){
if
(
item1
.
Stu
den
tAnswer
.
length
>
0
){
msg
.
IsAnswer
=
1
;
}
else
{
msg
.
IsAnswer
=
0
;
}
if
(
item1
.
Stu
nde
tAnswer
[
0
]
==
item1
.
QuestionAnswerList
[
0
]){
if
(
item1
.
Stu
den
tAnswer
[
0
]
==
item1
.
QuestionAnswerList
[
0
]){
msg
.
IsWrong
=
0
;
}
else
{
msg
.
IsWrong
=
1
;
...
...
@@ -155,8 +155,8 @@
},
//判断是否为正确答案
getErrorAnswer
(
item1
,
Number
)
{
if
(
item1
.
Stu
nde
tAnswer
[
0
]
!=
item1
.
QuestionAnswerList
[
0
])
{
if
(
item1
.
Stu
nde
tAnswer
[
0
]
==
Number
)
{
if
(
item1
.
Stu
den
tAnswer
[
0
]
!=
item1
.
QuestionAnswerList
[
0
])
{
if
(
item1
.
Stu
den
tAnswer
[
0
]
==
Number
)
{
return
true
}
}
...
...
src/pages.json
View file @
cc63fa89
...
...
@@ -106,6 +106,8 @@
"style"
:
{
"navigationStyle"
:
"custom"
}
},{
"path"
:
"wrong"
}]
},
{
...
...
src/pages/exam/examGongu.vue
View file @
cc63fa89
...
...
@@ -21,7 +21,7 @@
@
answerChange=
"getAnswerChange($event, index)"
:paperData=
"item"
:isShowJx=
"isShowJx"
/>
<readingCompre
v-if=
"item.QuestionTypeKey=='reading-comprehensio'"
@
answerChange=
"getAnswerChange($event, index)"
:paperData=
"item"
:isShowJx=
"isShowJx"
/>
<listen
v-if=
"item.QuestionTypeKey=='listening'"
@
answerChange=
"getAnswerChange($event, index)"
<listen
v-if=
"item.QuestionTypeKey=='listening'"
ref=
"myRef"
@
answerChange=
"getAnswerChange($event, index)"
:paperData=
"item"
:isShowJx=
"isShowJx"
/>
</swiper-item>
</swiper>
...
...
@@ -48,7 +48,9 @@
import
answer
from
"../../components/question/subject/answer.vue"
;
//答题卡
import
{
GetAppBankDetails
,
GetPracticeWrongPage
,
SetStudentStartExam
,
SetPracticeReview
}
from
"../../api/exam"
;
export
default
{
components
:
{
...
...
@@ -60,7 +62,8 @@
props
:
{},
setup
(
props
,
context
)
{
let
{
ctx
ctx
,
refs
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataList
:
[],
...
...
@@ -80,9 +83,20 @@
isShowJx
:
false
,
Count
:
0
,
isShowAnswer
:
false
,
statusBarHeight
:
0
statusBarHeight
:
0
,
wrongMsg
:{
pageIndex
:
1
,
pageSize
:
10000
,
StudentId
:
1
,
QCategoryIds
:
""
,
StartId
:
0
},
setMsg
:{
Id
:
0
}
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
methods
=
{
goBack
()
{
uni
.
navigateBack
();
...
...
@@ -90,8 +104,17 @@
onchange
(
e
)
{
if
(
e
&&
e
.
detail
){
data
.
current
=
e
.
detail
.
current
;
ctx
.
$refs
.
myRef
[
0
].
clickParent
();
this
.
setPractise
();
}
},
//设置已答题
setPractise
(){
data
.
setMsg
.
Id
=
data
.
dataList
[
data
.
current
-
1
].
Id
;
SetPracticeReview
(
data
.
setMsg
).
then
(
res
=>
{
})
},
getList
()
{
if
(
data
.
isShowJx
){
data
.
msg
.
StudentId
=
UserInfo
.
AccountId
;
...
...
@@ -136,6 +159,15 @@
getAnswerChange
(
val
,
index
)
{
data
.
dataList
[
index
]
=
val
;
},
//获取单词错题
getWrongWord
(){
GetPracticeWrongPage
(
data
.
wrongMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
data
.
dataList
=
res
.
Data
.
PageData
;
data
.
Count
=
res
.
Data
.
Count
;
}
})
},
//开始考试调用接口
getStart
(){
data
.
startMsg
.
StudentId
=
UserInfo
.
AccountId
;
...
...
@@ -160,18 +192,49 @@
this
.
msg
.
BankId
=
options
.
BankId
;
this
.
startMsg
.
BankId
=
options
.
BankId
;
}
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
if
(
options
&&
options
.
Type
){
// 1开始考试 2产看解析
if
(
options
.
Type
==
1
){
this
.
getStart
();
this
.
msg
.
StudentId
=
''
;
this
.
isShowJx
=
false
;
this
.
getList
();
}
if
(
options
.
Type
==
2
){
this
.
isShowJx
=
true
;
this
.
getList
();
}
//3 4 5 6从错题跳过来
if
(
options
.
Type
==
3
){
this
.
wrongMsg
.
StudentId
=
UserInfo
.
AccountId
;
this
.
wrongMsg
.
QCategoryIds
=
'3,4,5'
;
this
.
wrongMsg
.
StartId
=
options
.
StartId
;
this
.
getWrongWord
();
this
.
isShowJx
=
true
;
}
if
(
options
.
Type
==
4
){
this
.
wrongMsg
.
StudentId
=
UserInfo
.
AccountId
;
this
.
wrongMsg
.
QCategoryIds
=
'6'
;
this
.
wrongMsg
.
StartId
=
options
.
StartId
;
this
.
getWrongWord
();
this
.
isShowJx
=
true
;
}
if
(
options
.
Type
==
5
){
this
.
wrongMsg
.
StudentId
=
UserInfo
.
AccountId
;
this
.
wrongMsg
.
QCategoryIds
=
'8'
;
this
.
wrongMsg
.
StartId
=
options
.
StartId
;
this
.
getWrongWord
();
this
.
isShowJx
=
true
;
}
if
(
options
.
Type
==
6
){
this
.
wrongMsg
.
StudentId
=
UserInfo
.
AccountId
;
this
.
wrongMsg
.
QCategoryIds
=
'9'
;
this
.
wrongMsg
.
StartId
=
options
.
StartId
;
this
.
getWrongWord
();
this
.
isShowJx
=
true
;
}
}
this
.
getList
();
}
};
</
script
>
...
...
src/pages/exam/wrong.vue
0 → 100644
View file @
cc63fa89
<
style
scoped
>
.WrongContent
{
padding
:
40
rpx
;
background-color
:
#F5F5F5
;
height
:
93vh
;
}
.Wrong_Top
{
display
:
flex
;
margin-bottom
:
37
rpx
;
}
.Wrong_Top
>
view
{
flex
:
1
;
height
:
270
rpx
;
background-color
:
#fff
;
padding
:
40
rpx
32
rpx
;
margin-right
:
32
rpx
;
border-radius
:
24
rpx
;
}
.Wr_Name
{
color
:
#111111
;
font-size
:
28
rpx
;
margin-bottom
:
40
rpx
;
}
.img_Box
img
{
width
:
87
rpx
;
height
:
87
rpx
;
}
.Wr_Total
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
40
rpx
;
}
.Wr_Fuxi
{
color
:
#4C50E7
;
font-size
:
24
rpx
;
}
.Wr_Current
{
font-size
:
40
rpx
;
color
:
#FA9717
;
}
.Wr_CurTotal
{
color
:
#888888
;
font-size
:
25
rpx
;
}
</
style
>
<
template
>
<view
class=
"WrongContent"
>
<view
class=
"Wrong_Top"
>
<view
@
click=
"goWrongTopic(3)"
>
<view
class=
"Wr_Name"
>
单词
</view>
<view
class=
"img_Box"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word.png"
alt=
""
/>
</view>
<view
class=
"Wr_Total"
v-if=
"Object.keys(dataObj).length>0"
>
<view>
<text
class=
"Wr_Current"
>
{{
dataObj
.
wordsWrongFinishCount
}}
</text><text
class=
"Wr_CurTotal"
>
/
{{
dataObj
.
wordsWrongTotalCount
}}
</text>
</view>
<view
class=
"Wr_Fuxi"
>
<text
v-if=
"dataObj.wordsWrongFinishCount==0"
>
未复习
</text>
<text
v-if=
"dataObj.wordsWrongFinishCount>0&&dataObj.wordsWrongFinishCount
<dataObj
.
wordsWrongTotalCount
"
>
复习中
</text>
<text
v-if=
"dataObj.wordsWrongFinishCount==dataObj.wordsWrongTotalCount"
>
复习完毕
</text>
</view>
</view>
</view>
<view
style=
"margin-right:0;"
@
click=
"goWrongTopic(4)"
>
<view
class=
"Wr_Name"
>
语法
</view>
<view
class=
"img_Box"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/gramer.png"
alt=
""
/>
</view>
<view
class=
"Wr_Total"
v-if=
"Object.keys(dataObj).length>0"
>
<view>
<text
class=
"Wr_Current"
>
{{
dataObj
.
grammarWrongFinishCount
}}
</text><text
class=
"Wr_CurTotal"
>
/
{{
dataObj
.
grammarWrongTotalCount
}}
</text>
</view>
<view
class=
"Wr_Fuxi"
>
<text
v-if=
"dataObj.grammarWrongFinishCount==0"
>
未复习
</text>
<text
v-if=
"dataObj.grammarWrongFinishCount>0&&dataObj.grammarWrongFinishCount
<dataObj
.
grammarWrongTotalCount
"
>
复习中
</text>
<text
v-if=
"dataObj.grammarWrongFinishCount==dataObj.grammarWrongTotalCount"
>
复习完毕
</text>
</view>
</view>
</view>
</view>
<view
class=
"Wrong_Top"
@
click=
"goWrongTopic(5)"
>
<view>
<view
class=
"Wr_Name"
>
阅读理解
</view>
<view
class=
"img_Box"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/read.png"
alt=
""
/>
</view>
<view
class=
"Wr_Total"
v-if=
"Object.keys(dataObj).length>0"
>
<view>
<text
class=
"Wr_Current"
>
{{
dataObj
.
readingWrongFinishCount
}}
</text><text
class=
"Wr_CurTotal"
>
/
{{
dataObj
.
readingWrongTotalCount
}}
</text>
</view>
<view
class=
"Wr_Fuxi"
>
<text
v-if=
"dataObj.readingWrongFinishCount==0"
>
未复习
</text>
<text
v-if=
"dataObj.readingWrongFinishCount>0&&dataObj.readingWrongFinishCount
<dataObj
.
readingWrongTotalCount
"
>
复习中
</text>
<text
v-if=
"dataObj.readingWrongFinishCount==dataObj.readingWrongTotalCount"
>
复习完毕
</text>
</view>
</view>
</view>
<view
style=
"margin-right:0;"
@
click=
"goWrongTopic(6)"
>
<view
class=
"Wr_Name"
>
听力
</view>
<view
class=
"img_Box"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/listen.png"
alt=
""
/>
</view>
<view
class=
"Wr_Total"
v-if=
"Object.keys(dataObj).length>0"
>
<view>
<text
class=
"Wr_Current"
>
{{
dataObj
.
listeningWrongFinishCount
}}
</text><text
class=
"Wr_CurTotal"
>
/
{{
dataObj
.
listeningWrongTotalCount
}}
</text>
</view>
<view
class=
"Wr_Fuxi"
>
<text
v-if=
"dataObj.listeningWrongFinishCount==0"
>
未复习
</text>
<text
v-if=
"dataObj.listeningWrongFinishCount>0&&dataObj.listeningWrongFinishCount
<dataObj
.
listeningWrongTotalCount
"
>
复习中
</text>
<text
v-if=
"dataObj.listeningWrongFinishCount==dataObj.listeningWrongTotalCount"
>
复习完毕
</text>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
GetPracticeWrongStatic
}
from
"../../api/exam"
;
export
default
{
components
:
{
},
setup
(
props
,
ctx
)
{
let
data
=
reactive
({
pageState
:
"more"
,
msg
:
{
StudentId
:
0
},
dataObj
:
{},
});
let
methods
=
{
getWrongTotal
(){
GetPracticeWrongStatic
(
data
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据'
);
if
(
res
.
Code
==
1
){
data
.
dataObj
=
res
.
Data
;
}
})
},
//跳转
goWrongTopic
(
Type
){
let
StartId
=
0
;
//3单词 4语法 5阅读理解 6听力
if
(
Type
==
3
){
StartId
=
data
.
dataObj
.
wordsWrongStartId
;
}
if
(
Type
==
4
){
StartId
=
data
.
dataObj
.
grammarWrongStartId
;
}
if
(
Type
==
5
){
StartId
=
data
.
dataObj
.
readingWrongStartId
;
}
if
(
Type
==
6
){
StartId
=
data
.
dataObj
.
listeningWrongStartId
;
}
uni
.
navigateTo
({
url
:
"/pages/exam/examGongu?StartId="
+
StartId
+
'&&Type='
+
Type
});
}
};
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
onLoad
(
options
)
{
uni
.
setNavigationBarTitle
({
title
:
"错题库"
});
},
onShow
()
{
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
this
.
msg
.
StudentId
=
UserInfo
.
AccountId
;
this
.
getWrongTotal
();
}
};
</
script
>
<
style
>
</
style
>
src/pages/index/index.vue
View file @
cc63fa89
...
...
@@ -46,6 +46,7 @@
单词练习
</view>
<view
@
click=
"goWord()"
>
跳转。。。
</view>
<view
@
click=
"goWord2()"
>
跳转错题
</view>
<view
class=
"flex_around_center "
>
<view
class=
"wordItem"
>
...
...
@@ -192,7 +193,12 @@
},
goWord
(){
uni
.
navigateTo
({
url
:
'/pages/exam/MyExam'
url
:
'/pages/exam/MyExam'
,
});
},
goWord2
(){
uni
.
navigateTo
({
url
:
'/pages/exam/wrong'
});
},
jumpTimetable
()
{
...
...
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