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
93f2350a
Commit
93f2350a
authored
Mar 11, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加
parent
d2621740
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1440 additions
and
185 deletions
+1440
-185
exam.js
src/api/exam.js
+24
-0
loadmore.vue
src/components/loadmore.vue
+1
-0
listen.vue
src/components/question/listen.vue
+21
-97
answer.vue
src/components/question/subject/answer.vue
+180
-0
listen.vue
src/components/question/subject/listen.vue
+313
-0
readingCompre.vue
src/components/question/subject/readingCompre.vue
+356
-0
singlenumber.vue
src/components/question/subject/singlenumber.vue
+152
-0
pages.json
src/pages.json
+5
-0
MyExam.vue
src/pages/exam/MyExam.vue
+7
-7
examGongu.vue
src/pages/exam/examGongu.vue
+164
-0
examGradeList.vue
src/pages/exam/examGradeList.vue
+217
-81
No files found.
src/api/exam.js
View file @
93f2350a
...
@@ -144,3 +144,27 @@ export function SetStudentPractice(data) {
...
@@ -144,3 +144,27 @@ export function SetStudentPractice(data) {
data
data
})
})
}
}
/**
* 获取题库分类分页列表
* @param {JSON参数} data
*/
export
function
GetAppBankPage
(
data
)
{
return
request
({
url
:
'/Exam/GetAppBankPage'
,
method
:
'post'
,
data
})
}
/**
* 获取题库详情列表
* @param {JSON参数} data
*/
export
function
GetAppBankDetails
(
data
)
{
return
request
({
url
:
'/Exam/GetAppBankDetails'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/loadmore.vue
View file @
93f2350a
...
@@ -43,5 +43,6 @@ export default {
...
@@ -43,5 +43,6 @@ export default {
.text
{
.text
{
font-size
:
22
rpx
;
font-size
:
22
rpx
;
color
:
#969799
;
color
:
#969799
;
margin-bottom
:
20
rpx
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/components/question/listen.vue
View file @
93f2350a
...
@@ -10,19 +10,12 @@
...
@@ -10,19 +10,12 @@
<text
class=
"Exam_Current"
>
{{
current
+
1
}}
</text><text
class=
"Exam_Count"
>
/
{{
Count
}}
</text>
<text
class=
"Exam_Current"
>
{{
current
+
1
}}
</text><text
class=
"Exam_Count"
>
/
{{
Count
}}
</text>
</
template
>
</
template
>
</van-nav-bar>
</van-nav-bar>
<swiper
class=
"swiper-box"
:style=
"{height: `calc(100vh -
30
0rpx)`}"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:style=
"{height: `calc(100vh -
18
0rpx)`}"
:current=
"current"
@
change=
"onchange"
>
<swiper-item
v-for=
"(item1, index1) in dataList"
:key=
"index1"
:catchtouchmove=
"true"
>
<swiper-item
v-for=
"(item1, index1) in dataList"
:key=
"index1"
:catchtouchmove=
"true"
>
<audio
style=
"text-align: left"
poster=
"http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg"
<audio
style=
"text-align: left"
ref=
"audio"
v-if=
"isShow"
:src=
"item1.Src"
name=
"日语听力"
:action=
"audioAction"
controls
></audio>
poster=
"http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg"
:src=
"item1.Src"
name=
"日语听力"
<view
class=
"item1"
:style=
"{ height: `calc(100vh - 414rpx)` }"
>
:action=
"audioAction"
controls
></audio>
<!-- <view class="flex flex_start_center" v-if="isIOS">
<view
class=
"item1"
:style=
"{ height: `calc(100vh - 460rpx)` }"
>
<view class="audioBox flex flex_center_center" @click="audioManage(item1.Src)">
<image style="width: 26rpx; height: 22rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/horn.png" />
<van-count-down :time="audioTime" :auto-start="false" class="flex flex_center_center"
style="color: #00acf9" ref="listenCountdown" format="mm:ss" />
</view>
</view> -->
<
template
v-if=
"item1.StundetAnswer.length<item1.QuestionContentObj.length"
>
<
template
v-if=
"item1.StundetAnswer.length<item1.QuestionContentObj.length"
>
<view
class=
"questionView"
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
...
@@ -98,13 +91,13 @@
...
@@ -98,13 +91,13 @@
</view>
</view>
</template>
</template>
</view>
</view>
</swiper-item>
</swiper>
<view
class=
"AnswerBtn clear"
>
<view
class=
"AnswerBtn clear"
>
<view
class=
"AnswerBtnFirst"
@
click=
"getBeforeExam()"
v-if=
"current!=0"
>
上一题
</view>
<view
class=
"AnswerBtnFirst"
@
click=
"getBeforeExam()"
v-if=
"current!=0"
>
上一题
</view>
<view
class=
"AnswerBtnSecond"
:class=
"{'isCanNext':!isCanNext
}"
v-if=
"current!=dataList.length"
<view
class=
"AnswerBtnSecond"
:class=
"{'isCanNext':item1.StundetAnswer.length==0
}"
v-if=
"current!=dataList.length"
@
click=
"getNextExam(
)"
>
下一题
</view>
@
click=
"getNextExam(item1
)"
>
下一题
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -123,6 +116,7 @@
...
@@ -123,6 +116,7 @@
}
from
"vue"
;
}
from
"vue"
;
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
innerAudioContext
.
autoplay
=
true
;
innerAudioContext
.
autoplay
=
true
;
const
bgAudioManager
=
uni
.
getBackgroundAudioManager
();
import
{
import
{
SetStudentPractice
SetStudentPractice
}
from
"../../api/exam"
;
}
from
"../../api/exam"
;
...
@@ -141,27 +135,20 @@
...
@@ -141,27 +135,20 @@
dataList
:
props
.
paperData
,
dataList
:
props
.
paperData
,
current
:
0
,
//默认从第几个开始-用于从快捷菜单点入
current
:
0
,
//默认从第几个开始-用于从快捷菜单点入
statusBarHeight
:
0
,
statusBarHeight
:
0
,
isCanNext
:
false
,
//判断是否能点击下一题
audioAction
:
{
audioAction
:
{
method
:
"pause"
method
:
"pause"
},
},
isIOS
:
false
,
isIOS
:
false
,
isShow
:
true
});
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
sys
=
uni
.
getSystemInfoSync
().
system
;
let
sys
=
uni
.
getSystemInfoSync
().
system
;
watch
(()
=>
[...
props
.
paperData
],
(
val
)
=>
{
watch
(()
=>
[...
props
.
paperData
],
(
val
)
=>
{
data
.
dataList
=
[...
data
.
dataList
,
...
val
];
data
.
dataList
=
[...
data
.
dataList
,
...
val
];
console
.
log
(
data
.
dataList
,
'data.dataList'
)
})
})
if
(
sys
.
indexOf
(
"iOS"
)
!=
-
1
)
{
data
.
isIOS
=
true
;
}
else
{
data
.
isIOS
=
false
;
}
console
.
log
(
327
,
sys
,
data
.
isIOS
);
let
methods
=
{
let
methods
=
{
//阻止手动滑动
//阻止手动滑动
stopTouchMove
(){
stopTouchMove
()
{
return
true
;
return
true
;
},
},
jumpPage
()
{
jumpPage
()
{
...
@@ -172,64 +159,10 @@
...
@@ -172,64 +159,10 @@
goBack
()
{
goBack
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
//获取总时长
getTotalTime
(
url
)
{
innerAudioContext
.
src
=
url
;
var
Inner
=
""
;
innerAudioContext
.
onCanplay
(()
=>
{
innerAudioContext
.
duration
;
let
t
=
innerAudioContext
.
duration
;
let
Time
=
t
;
var
second
=
parseInt
(
Time
);
var
hours
=
Math
.
floor
(
second
/
3600
);
second
=
second
-
hours
*
3600
;
var
mimute
=
Math
.
floor
(
second
/
60
);
second
=
second
-
mimute
*
60
;
// let aa = hours + ':' + ('0' + mimute).slice(-2) + ':' + ('0' + second).slice(-2);
let
TotalTime
=
(
"0"
+
mimute
).
slice
(
-
2
)
+
":"
+
(
"0"
+
second
).
slice
(
-
2
);
return
TotalTime
;
});
},
audioManage
(
url
)
{
console
.
log
(
url
,
'url'
);
innerAudioContext
.
src
=
url
;
innerAudioContext
.
onCanplay
(()
=>
{
// 必须。可以当做是初始化时长
innerAudioContext
.
duration
;
// 必须。不然也获取不到时长
setTimeout
(()
=>
{
let
t
=
innerAudioContext
.
duration
;
data
.
audioTime
=
t
*
1000
;
},
100
);
});
if
(
innerAudioContext
.
currentTime
===
innerAudioContext
.
duration
)
{
data
.
isPlay
=
true
;
}
if
(
data
.
isPlay
)
{
innerAudioContext
.
play
();
// refs.listenCountdown.start();
console
.
log
(
"开始播放"
);
data
.
isPlay
=
false
;
}
else
{
innerAudioContext
.
stop
();
console
.
log
(
"停了"
);
data
.
isPlay
=
true
;
}
innerAudioContext
.
onError
((
res
)
=>
{
console
.
log
(
res
.
errMsg
);
console
.
log
(
res
.
errCode
);
});
},
//----------------------------------------选题----------------------------------
//----------------------------------------选题----------------------------------
// 单选
// 单选
singerChange
(
item1
,
index
,
item3
)
{
singerChange
(
item1
,
index
,
item3
)
{
item1
.
StundetAnswer
[
index
]
=
item3
.
Name
;
item1
.
StundetAnswer
[
index
]
=
item3
.
Name
;
//判断题数已经全做
if
(
item1
.
StundetAnswer
.
length
==
item1
.
QuestionContentObj
.
length
)
{
data
.
isCanNext
=
true
;
}
},
},
getErrorAnswer
(
item1
,
index
,
name
)
{
getErrorAnswer
(
item1
,
index
,
name
)
{
if
(
item1
.
StundetAnswer
[
index
]
==
name
)
{
if
(
item1
.
StundetAnswer
[
index
]
==
name
)
{
...
@@ -240,17 +173,6 @@
...
@@ -240,17 +173,6 @@
},
},
onchange
(
e
)
{
onchange
(
e
)
{
innerAudioContext
.
stop
();
innerAudioContext
.
onCanplay
(()
=>
{
// 必须。可以当做是初始化时长
innerAudioContext
.
duration
;
// 必须。不然也获取不到时长
setTimeout
(()
=>
{
data
.
audioTime
=
999
;
},
100
);
});
data
.
isPlay
=
true
;
data
.
current
=
e
.
detail
.
current
;
data
.
current
=
e
.
detail
.
current
;
if
(
data
.
current
+
1
==
data
.
dataList
.
length
)
{
if
(
data
.
current
+
1
==
data
.
dataList
.
length
)
{
this
.
$emit
(
'getAfter'
);
this
.
$emit
(
'getAfter'
);
...
@@ -261,8 +183,9 @@
...
@@ -261,8 +183,9 @@
data
.
current
=
data
.
current
-
1
;
data
.
current
=
data
.
current
-
1
;
},
},
//点击下一题
//点击下一题
getNextExam
()
{
getNextExam
(
item
)
{
if
(
data
.
isCanNext
)
{
if
(
item
.
StundetAnswer
.
length
>
0
)
{
data
.
isShow
=
false
let
msg
=
{
let
msg
=
{
Id
:
0
,
Id
:
0
,
StudentId
:
UserInfo
.
AccountId
,
StudentId
:
UserInfo
.
AccountId
,
...
@@ -296,7 +219,7 @@
...
@@ -296,7 +219,7 @@
let
res
=
SetStudentPractice
(
msg
).
then
(
res
=>
{
let
res
=
SetStudentPractice
(
msg
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
data
.
isShow
=
true
;
}
}
}
}
});
});
...
@@ -321,7 +244,8 @@
...
@@ -321,7 +244,8 @@
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.AnswerBtn
{
.AnswerBtn
{
margin-top
:
40
rpx
;
margin-top
:
40
rpx
;
/* position: absolute; */
}
}
.clear
{
.clear
{
...
@@ -378,8 +302,8 @@
...
@@ -378,8 +302,8 @@
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
position
:
relative
;
}
}
.num
{
.num
{
...
@@ -400,7 +324,7 @@
...
@@ -400,7 +324,7 @@
.questionView
{
.questionView
{
overflow-y
:
auto
;
overflow-y
:
auto
;
z-index
:
999
;
z-index
:
999
;
}
}
.audioBox
{
.audioBox
{
...
...
src/components/question/subject/answer.vue
0 → 100644
View file @
93f2350a
<
template
>
<view>
<van-nav-bar
fixed
>
<template
#
left
>
<van-icon
name=
"cross"
style=
"font-size: 32rpx; color: #111"
@
click=
"back"
/>
</
template
>
<
template
#
title
>
<view
style=
"
font-size: 32rpx;
color: #111;
font-family: PingFang SC;
font-weight: 800;
"
>
答题卡
</view
>
</
template
>
</van-nav-bar>
<view
class=
"answer-sheets"
>
<view
class=
"item"
>
<view
class=
"flex flex_wrap"
>
<view
v-for=
"(item, index) in questionList"
:key=
"index"
class=
"flex flex_wrap"
>
<view
class=
"item1"
:class=
"{ isRes: item.StundetAnswer.length>0 }"
@
click=
"chooseTopic(index)"
>
{{ index + 1 }}
</view
>
</view>
</view>
</view>
</view>
<view
class=
"submitBox"
v-if=
"ExamStatus === 2"
>
<view
class=
"submit"
@
click=
"savePaper"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
// import { submitPaper } from "../../api/exam";
export
default
{
props
:
{
paperData
:
Array
,
},
setup
(
props
,
ctx
)
{
let
data
=
reactive
({
questionList
:
props
.
paperData
});
let
methods
=
{
chooseTopic
(
index
)
{
ctx
.
emit
(
"chooseTopic"
,
index
);
},
//隐藏答题卡
back
()
{
ctx
.
emit
(
"hideAnswer"
);
},
//交卷
async
savePaper
()
{
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.answer-sheets
{
box-sizing
:
border-box
;
padding
:
30
rpx
;
height
:
calc
(
100vh
-
300
rpx
);
overflow-y
:
auto
;
margin-top
:
100
rpx
;
}
.name
,
.num
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
width
:
100
rpx
;
text-align
:
center
;
}
.item
{
margin-bottom
:
20
rpx
;
}
.item1-1
{
width
:
690
rpx
;
margin
:
22
rpx
0
0
0
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
}
.item1
{
width
:
55
rpx
;
height
:
55
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
margin
:
22
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
}
.item2
{
width
:
44
rpx
;
height
:
44
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
44
rpx
;
margin-right
:
55
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.submitBox
{
width
:
750
rpx
;
height
:
150
rpx
;
background-color
:
#e2e2e2
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
box-sizing
:
border-box
;
padding-top
:
40
rpx
;
}
.submit
{
width
:
600
rpx
;
height
:
70
rpx
;
border-radius
:
35
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#00acf9
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#fff
;
margin
:
0
auto
;
}
.isRes
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
border
:
none
!important
;
}
</
style
>
src/components/question/subject/listen.vue
0 → 100644
View file @
93f2350a
<
template
>
<!-- 听力题 -->
<view
class=
"listen"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
{{
dataObj
.
Src
}}
<audio
style=
"text-align: left"
poster=
"http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg"
:src=
"dataObj.Src"
name=
"日语听力"
:action=
"audioAction"
controls
></audio>
<view
class=
"item1"
:style=
"
{ height: `calc(100vh - 414rpx)` }">
<view
class=
"questionView"
>
<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>
<view
v-html=
"item.SubTitle"
></view>
</view>
<view
v-for=
"(item2, index2) in item.SubAnwser"
:key=
"index2"
>
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"item.QuestionKey === 'single'"
>
<view
class=
"chooseNum"
:class=
"
{ 'myAnswer': dataObj.StundetAnswer[index]==item2.Name }"
@click="singerChange(dataObj, index, item2)">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ 'myAnswer': item1.StundetAnswer[index2]==item2.Name }"
@click="singerChange(dataObj, index, item2)" v-html="item2.Content">
</view>
</view>
</view>
</view>
</view>
<template
v-if=
"isShowJx"
>
<view
class=
"questionView"
>
<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>
<view
v-html=
"item.SubTitle"
></view>
</view>
<view
v-for=
"(item2, index2) in item.SubAnwser"
:key=
"index2"
>
<!-- 单选 、判断-->
<view
class=
"flex flex_start_center item3"
v-if=
"item.QuestionKey === 'single'"
>
<view
class=
"chooseNum"
:class=
"
{ 'isTrueAnswer': item2.IsAnswer,'isNotAnswer':getErrorAnswer(dataObj,index,item2.Name)}">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ 'isTrueAnswer': item2.IsAnswer,'isNotAnswer':getErrorAnswer(dataObj,index,item2.Name)}"
v-html="item2.Content">
</view>
</view>
</view>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
dataObj
.
QuestionAnswerList
[
index
]
}}
</text>
,
<text>
您的答案:
<template
v-if=
"dataObj.StundetAnswer.length>0"
>
<text
v-if=
"dataObj.StundetAnswer[index] == dataObj.QuestionAnswerList[index]"
class=
"isTrueAnswer"
>
{{
dataObj
.
StundetAnswer
[
index
]
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
dataObj
.
StundetAnswer
[
index
]
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text
class=
"isNotAnswer"
>
未回答
</text>
</
template
>
</text>
</view>
</view>
</view>
<view
style=
"word-wrap: break-word; margin-bottom:30rpx;display: flex;"
class=
"AnswerContent"
v-if=
"dataObj.AnswerParse"
>
<text
style=
"color: #8c8a94;flex-shrink: 0;"
>
解析:
</text>
<view
style=
"color: #000"
v-html=
"dataObj.AnswerParse"
></view>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
onUnmounted
,
}
from
"vue"
;
export
default
{
props
:
{
paperData
:
Object
,
isShowJx
:
Boolean
},
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataObj
:
props
.
paperData
,
statusBarHeight
:
0
,
audioAction
:
{
method
:
"pause"
},
});
let
methods
=
{
// 单选
singerChange
(
item1
,
index
,
item3
)
{
item1
.
StundetAnswer
[
index
]
=
item3
.
Name
;
context
.
emit
(
"answerChange"
,
data
.
dataObj
);
},
getErrorAnswer
(
item1
,
index
,
name
)
{
if
(
item1
.
StundetAnswer
[
index
]
==
name
)
{
return
true
}
else
{
return
false
}
},
//获取音频链接
getAudioSrc
(
Src
){
},
onchange
(
e
)
{
data
.
current
=
e
.
detail
.
current
;
},
};
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.AnswerBtn
{
margin-top
:
40
rpx
;
}
.clear
{
clear
:
both
;
}
.AnswerBtnFirst
{
width
:
250
rpx
;
height
:
60
rpx
;
text-align
:
center
;
line-height
:
60
rpx
;
border-radius
:
10
rpx
;
border
:
1px
solid
#00acf9
;
color
:
#00acf9
;
float
:
left
;
}
.AnswerBtnSecond
{
width
:
250
rpx
;
height
:
60
rpx
;
text-align
:
center
;
line-height
:
60
rpx
;
border-radius
:
10
rpx
;
background-color
:
#00acf9
;
color
:
#fff
;
float
:
right
;
}
.name
{
height
:
90
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
.num
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
color
:
#111111
;
}
.item
{
position
:
relative
;
margin-top
:
180
rpx
;
}
.item1
{
align-items
:
center
;
overflow-y
:
auto
;
margin-top
:
30
rpx
;
}
.questionView
{
overflow-y
:
auto
;
z-index
:
999
;
}
.audioBox
{
width
:
120
rpx
;
height
:
30
rpx
;
background
:
#b4ddfe
;
border
:
1px
solid
#35b4fb
;
border-radius
:
4
rpx
;
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#00acf9
;
}
.item2
{
box-sizing
:
border-box
;
margin
:
30
rpx
0
;
/* padding: 0 30rpx; */
}
.item3
{
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
50
rpx
;
height
:
50
rpx
;
text-align
:
center
;
line-height
:
50
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
.chooseName2
{
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
}
.questionTitle
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.listen
.van-count-down
{
font-size
:
22
rpx
!important
;
color
:
#00acf9
!important
;
}
.Exam_Current
{
font-size
:
35
rpx
;
color
:
red
;
}
.Exam_Count
{
color
:
gray
;
font-size
:
26
rpx
;
}
.Exam_Score
{
color
:
#999999
;
font-size
:
28
rpx
;
}
.isCanNext
{
background-color
:
gray
!important
;
}
</
style
>
src/components/question/subject/readingCompre.vue
0 → 100644
View file @
93f2350a
<
template
>
<!-- 阅读理解 -->
<view>
<view
class=
"item"
>
<view
class=
"item1"
>
<view
class=
"flex"
style=
"height:520rpx;overflow:auto;"
>
<view
class=
"num readTitle"
v-html=
"dataObj.Title"
></view>
</view>
<view
:style=
"
{maxHeight: `calc(100vh - 730rpx)`}"
style="overflow-y: auto;">
<view
style=
"margin:30rpx;"
class=
"Exam_Score"
>
本阅读理解共
{{
dataObj
.
QuestionContentObj
.
length
}}
小题
</view>
<view
class=
"questionView"
>
<view
v-for=
"(item, index) in dataObj.QuestionContentObj"
:key=
"index"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index
+
1
}}
、(
{{
item
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view>
<view
v-html=
"item.SubTitle"
></view>
</view>
<view
v-for=
"(item2, index2) in item.SubAnwser"
:key=
"index2"
>
<!-- 单选 -->
<view
class=
"flex flex_start_center item3"
v-if=
"item.QuestionKey === 'single' || item.QuestionKey === 'single-number'"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: dataObj.StundetAnswer[index]==item2.Name }"
@click="singerChange(dataObj,index,item2)">
{{
item2
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"singerChange(dataObj,index,item2)"
v-html=
"item2.Content"
></view>
</view>
</view>
</view>
</view>
<template
v-if=
"isShowJx"
>
<view
class=
"questionView"
>
<view
v-for=
"(item2, index2) in dataObj.QuestionContentObj"
:key=
"index2"
class=
"item2"
>
<view
class=
"flex questionTitle"
>
<view
style=
"white-space: nowrap"
>
{{
index2
+
1
}}
、(
{{
item2
.
QuestionName
.
slice
(
0
,
2
)
}}
)
</view>
<view
v-html=
"item2.SubTitle"
></view>
</view>
<view
v-for=
"(item3, index3) in item2.SubAnwser"
:key=
"index3"
>
<!-- 单选-->
<view
class=
"flex item3"
v-if=
"item2.QuestionKey === 'single' || item2.QuestionKey === 'single-number'"
>
<view
class=
"chooseNum"
:class=
"
{ 'isTrueAnswer': item3.IsAnswer,'isNotAnswer':getErrorAnswer(dataObj,index2,item3.Name)}">
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
:class=
"
{ isTrueAnswer: item3.IsAnswer }"
v-html="item3.Content">
</view>
</view>
</view>
<view
class=
"AnswerContent"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
dataObj
.
QuestionAnswerList
[
index2
]
}}
</text>
,
<text>
您的答案:
<template
v-if=
"dataObj.StundetAnswer.length>0"
>
<text
v-if=
"dataObj.QuestionAnswerList[index2] == dataObj.StundetAnswer[index2]"
class=
"isTrueAnswer"
>
{{
dataObj
.
StundetAnswer
[
index2
]
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
dataObj
.
StundetAnswer
[
index2
]
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text
class=
"isNotAnswer"
>
未作答
</text>
</
template
>
</text>
</view>
</view>
</view>
<view
style=
"word-wrap: break-word; margin: 0 30rpx 30rpx 30rpx;display: flex;"
class=
"AnswerContent"
v-if=
"dataObj.AnswerParse"
>
<text
style=
"color: #8c8a94;flex-shrink: 0;"
>
解析:
</text>
<view
style=
"color: #000"
v-html=
"dataObj.AnswerParse"
></view>
</view>
</view>
</template>
</view>
</view>
</view>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
props
:
{
paperData
:
Object
,
isShowJx
:
Boolean
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataObj
:
props
.
paperData
,
statusBarHeight
:
0
,
});
let
methods
=
{
getErrorAnswer
(
item1
,
index
,
name
){
if
(
item1
.
StundetAnswer
[
index
]
==
name
)
{
return
true
}
else
{
return
false
}
},
//----------------------------------------选题----------------------------------
// 单选or判断
singerChange
(
item1
,
index
,
item3
)
{
item1
.
StundetAnswer
[
index
]
=
item3
.
Name
;
context
.
emit
(
"answerChange"
,
data
.
dataObj
);
}
};
onMounted
(()
=>
{
data
.
dataObj
.
Title
=
data
.
dataObj
.
Title
.
replace
(
/\<img/gi
,
'<img style="max-width:100%;height:auto" '
)
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.AnswerBtn
{
margin-top
:
30
rpx
;
padding
:
0
40
rpx
;
}
.clear
{
clear
:
both
}
.AnswerBtnFirst
{
width
:
250
rpx
;
height
:
60
rpx
;
text-align
:
center
;
line-height
:
60
rpx
;
border-radius
:
10
rpx
;
border
:
1px
solid
#00ACF9
;
color
:
#00ACF9
;
float
:
left
;
}
.AnswerBtnSecond
{
width
:
250
rpx
;
height
:
60
rpx
;
text-align
:
center
;
line-height
:
60
rpx
;
border-radius
:
10
rpx
;
background-color
:
#00ACF9
;
color
:
#fff
;
float
:
right
;
}
.item
{
position
:
relative
;
margin-top
:
180
rpx
;
}
.name
{
height
:
90
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
box-sizing
:
border-box
;
padding
:
0
30
rpx
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.ExamIndex_Box
{
margin-right
:
48
rpx
;
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.swiper-box
{
height
:
calc
(
100vh
-
230
rpx
);
box-sizing
:
border-box
;
overflow
:
auto
;
}
.num
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
color
:
#111111
;
box-sizing
:
border-box
;
}
.readTitle
img
{
max-width
:
100%
;
}
.Single_Before
{
font-size
:
30
rpx
;
font-weight
:
bold
;
color
:
#da7878
;
}
.item1
{
height
:
100%
;
align-items
:
center
;
/* overflow-y: auto; */
box-sizing
:
border-box
;
}
.questionBox
{
width
:
100%
;
min-height
:
500
rpx
!important
;
max-height
:
800
rpx
!important
;
/* background-color: #eee; */
position
:
absolute
;
left
:
0
rpx
;
bottom
:
0
rpx
;
z-index
:
9
;
color
:
#000000
;
transition
:
all
0.5
;
box-shadow
:
0
rpx
10
rpx
30
rpx
0
rpx
rgba
(
36
,
36
,
36
,
0.2
);
}
.questionView
{
height
:
100%
;
/* overflow-y: auto; */
box-sizing
:
border-box
;
padding-bottom
:
80
rpx
;
}
.questionTotal
{
text-align
:
center
;
font-size
:
22
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#888888
;
padding
:
30
rpx
0
;
}
.questionTitle
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
color
:
#111111
;
}
.item2
{
box-sizing
:
border-box
;
margin-bottom
:
50
rpx
;
padding
:
0
30
rpx
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.myAnswerText
{
color
:
#00acf9
!important
;
}
.item3
{
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
align-items
:
center
;
}
.chooseNum
{
width
:
50
rpx
;
height
:
50
rpx
;
text-align
:
center
;
line-height
:
50
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
flex-shrink
:
0
;
}
.chooseName
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
}
.chooseName2
{
flex-grow
:
1
;
border-bottom
:
1px
solid
#111
;
color
:
#111111
;
}
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
30
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
10
rpx
;
font-size
:
28
rpx
;
}
.Exam_Score
{
color
:
#999999
;
font-size
:
28
rpx
;
}
.Exam_Current
{
font-size
:
35
rpx
;
color
:
red
;
}
.Exam_Count
{
color
:
gray
;
font-size
:
26
rpx
;
}
.isCanNext
{
background-color
:
gray
!important
;
}
</
style
>
src/components/question/subject/singlenumber.vue
0 → 100644
View file @
93f2350a
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
class=
"num"
v-html=
"dataObj.Title"
></view>
</view>
<view
v-for=
"(item2, index2) in dataObj.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ 'isMyChoose': item2.ShowName==dataObj.StundetAnswer[0]}"
@click="change(dataObj, item2)">
{{
item2
.
ShowName
}}
</view>
<view
class=
"chooseName"
@
click=
"change(dataObj, item2)"
v-html=
"item2.Content"
></view>
</view>
<view
class=
"AnswerContent"
v-if=
"isShowJx"
>
<view>
<text
style=
"color: #8c8a94"
>
正确答案:
</text>
<text
class=
"isTrueAnswer"
>
{{
dataObj
.
QuestionAnswerList
[
0
]
}}
</text>
,
<text>
您的答案是:
<template
v-if=
"dataObj.StundetAnswer.length>0"
>
<text
v-if=
"dataObj.StundetAnswer[0] == dataObj.QuestionAnswerList[0]"
class=
"isTrueAnswer"
>
{{
dataObj
.
StundetAnswer
}}
,回答正确
</text>
<text
v-else
class=
"isNotAnswer"
>
{{
dataObj
.
StundetAnswer
[
0
]
}}
,回答错误
</text>
</
template
>
<
template
v-else
>
<text>
未作答
</text>
</
template
>
</text>
</view>
<view
style=
"margin-top: 20rpx; word-wrap: break-word"
v-if=
"dataObj.AnswerParse"
class=
"flex"
>
<text
style=
"color: #8c8a94;flex-shrink: 0;"
>
解析:
</text>
<view
style=
"color: #000"
v-html=
"dataObj.AnswerParse"
></view>
</view>
</view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
export
default
{
props
:
{
paperData
:
Object
,
isShowJx
:
Boolean
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataObj
:
props
.
paperData
,
statusBarHeight
:
0
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
methods
=
{
change
(
item1
,
item2
){
item1
.
StundetAnswer
[
0
]
=
item2
.
Name
;
context
.
emit
(
"answerChange"
,
data
.
dataObj
);
}
};
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
async
onLoad
(
options
)
{}
};
</
script
>
<
style
scoped
>
.isTrueAnswer
{
color
:
green
!important
;
}
.isNotAnswer
{
color
:
red
!important
;
}
.AnswerContent
{
font-size
:
28
rpx
;
padding
:
25
rpx
;
background-color
:
#f4f4f4
;
border-radius
:
5px
;
}
.swiper-box
{
box-sizing
:
border-box
;
}
.num
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
color
:
#111111
;
}
.item
{
margin-top
:
180
rpx
;
}
.item1
{
align-items
:
center
;
}
.item2
{
padding-left
:
25
rpx
;
margin
:
30
rpx
0
;
}
.chooseNum
{
width
:
50
rpx
;
height
:
50
rpx
;
text-align
:
center
;
line-height
:
50
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
flex-shrink
:
0
;
}
.isMyChoose
{
background-color
:
#4C50E7
;
color
:
#fff
;
}
.chooseName
{
font-size
:
30
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
src/pages.json
View file @
93f2350a
...
@@ -101,6 +101,11 @@
...
@@ -101,6 +101,11 @@
}
}
},{
},{
"path"
:
"examGradeList"
"path"
:
"examGradeList"
},{
"path"
:
"examGongu"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
}]
}]
},
},
{
{
...
...
src/pages/exam/MyExam.vue
View file @
93f2350a
...
@@ -201,22 +201,22 @@
...
@@ -201,22 +201,22 @@
</view>
</view>
</view>
</view>
<view
class=
"Ques_CirContent"
v-if=
"TypeObj"
>
<view
class=
"Ques_CirContent"
v-if=
"TypeObj"
>
<view
class=
"Ques_Circle"
@
click=
"goExam(1)"
>
<view
class=
"Ques_Circle"
@
click=
"goExam(1
,TypeObj.wordsStartId
)"
>
<view
class=
"Ques_Top"
>
单词
</view>
<view
class=
"Ques_Top"
>
单词
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
wordsFinishCount
}}
/
{{
TypeObj
.
wordsTotalCount
}}
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
wordsFinishCount
}}
/
{{
TypeObj
.
wordsTotalCount
}}
</view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word1.png"
alt=
""
/>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word1.png"
alt=
""
/>
</view>
</view>
<view
class=
"Ques_Circle"
@
click=
"goExam(2)"
>
<view
class=
"Ques_Circle"
@
click=
"goExam(2
,TypeObj.grammarStartId
)"
>
<view
class=
"Ques_Top"
>
语法
</view>
<view
class=
"Ques_Top"
>
语法
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
grammarFinishCount
}}
/
{{
TypeObj
.
grammarTotalCount
}}
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
grammarFinishCount
}}
/
{{
TypeObj
.
grammarTotalCount
}}
</view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word2.png"
alt=
""
/>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word2.png"
alt=
""
/>
</view>
</view>
<view
class=
"Ques_Circle"
@
click=
"goExam(3)"
>
<view
class=
"Ques_Circle"
@
click=
"goExam(3
,TypeObj.listeningStartId
)"
>
<view
class=
"Ques_Top"
>
听力
</view>
<view
class=
"Ques_Top"
>
听力
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
listeningFinishCount
}}
/
{{
TypeObj
.
listeningTotalCount
}}
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
listeningFinishCount
}}
/
{{
TypeObj
.
listeningTotalCount
}}
</view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word3.png"
alt=
""
/>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word3.png"
alt=
""
/>
</view>
</view>
<view
class=
"Ques_Circle"
style=
"margin-right:0;"
@
click=
"goExam(4)"
>
<view
class=
"Ques_Circle"
style=
"margin-right:0;"
@
click=
"goExam(4
,TypeObj.readingStartId
)"
>
<view
class=
"Ques_Top"
>
阅读
</view>
<view
class=
"Ques_Top"
>
阅读
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
readingFinishCount
}}
/
{{
TypeObj
.
readingTotalCount
}}
</view>
<view
class=
"Ques_Num"
v-if=
"TypeObj"
>
{{
TypeObj
.
readingFinishCount
}}
/
{{
TypeObj
.
readingTotalCount
}}
</view>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word4.png"
alt=
""
/>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/word4.png"
alt=
""
/>
...
@@ -326,9 +326,9 @@
...
@@ -326,9 +326,9 @@
}
}
},
},
//返回首页
//返回首页
goExam
(
Type
)
{
goExam
(
Type
,
startId
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/exam/examStart?Type='
+
Type
+
'&&BankType='
+
data
.
TypeMsg
.
BankType
+
'&&StartId='
+
data
.
TypeObj
.
wordsS
tartId
url
:
'/pages/exam/examStart?Type='
+
Type
+
'&&BankType='
+
data
.
TypeMsg
.
BankType
+
'&&StartId='
+
s
tartId
});
});
},
},
showExambox
()
{
showExambox
()
{
...
@@ -355,7 +355,7 @@
...
@@ -355,7 +355,7 @@
//跳转到日语等级评测列表
//跳转到日语等级评测列表
goJpGrade
(){
goJpGrade
(){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/exam/examGradeList
'
url
:
'/pages/exam/examGradeList
?BankType='
+
data
.
TypeMsg
.
BankType
});
});
}
}
};
};
...
...
src/pages/exam/examGongu.vue
0 → 100644
View file @
93f2350a
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
style=
"padding: 0 20px"
v-if=
"!isShowAnswer"
>
<van-nav-bar
fixed
>
<template
#
left
>
<van-icon
name=
"cross"
size=
"32rpx"
@
click=
"goBack()"
/>
</
template
>
<
template
#
title
>
<text
class=
"Exam_Current"
>
{{
current
+
1
}}
</text><text
class=
"Exam_Count"
>
/
{{
Count
}}
</text>
</
template
>
</van-nav-bar>
<i
class=
"iconfont icon-caidanzu answerSheet"
style=
"
position: absolute;
right: 30rpx;
z-index: 999;
"
:style=
"{ top: `calc(${statusBarHeight}px + 105rpx)` }"
@
click=
"showAnswerSheet"
></i>
<swiper
class=
"swiper-box"
style=
"height:100vh"
:current=
"current"
@
change=
"onchange"
>
<swiper-item
v-for=
"(item, index) in dataList"
:key=
"index"
>
<singlenumber
v-if=
"item.QuestionTypeKey=='single-number'"
@
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)"
:paperData=
"item"
:isShowJx=
"isShowJx"
/>
</swiper-item>
</swiper>
</view>
<answer
v-if=
"isShowAnswer"
:paperData=
"dataList"
@
hideAnswer=
"hideAnswer"
@
chooseTopic=
"jumpTopic"
></answer>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
singlenumber
from
"../../components/question/subject/singlenumber.vue"
;
import
readingCompre
from
"../../components/question/subject/readingCompre.vue"
;
import
listen
from
"../../components/question/subject/listen.vue"
;
import
answer
from
"../../components/question/subject/answer.vue"
;
//答题卡
import
{
GetAppBankDetails
}
from
"../../api/exam"
;
export
default
{
components
:
{
singlenumber
,
readingCompre
,
listen
,
answer
},
props
:
{},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
data
=
reactive
({
dataList
:
[],
msg
:
{
pageIndex
:
4
,
pageSize
:
20
,
BankId
:
0
},
current
:
0
,
//默认从第几个开始-用于从快捷菜单点入
isShowJx
:
false
,
Count
:
0
,
isShowAnswer
:
false
,
statusBarHeight
:
0
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
methods
=
{
goBack
()
{
uni
.
navigateBack
();
},
onchange
(
e
)
{
data
.
current
=
e
.
detail
.
current
;
if
(
data
.
current
+
1
==
data
.
dataList
.
length
)
{
data
.
msg
.
pageIndex
++
;
this
.
getList
();
}
},
getList
()
{
GetAppBankDetails
(
data
.
msg
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
let
TempData
=
res
.
Data
.
PageData
;
//解析音频
TempData
.
forEach
(
x
=>
{
if
(
x
.
QuestionTypeKey
==
'listening'
){
let
arr
=
x
.
Title
.
split
(
" "
);
//按空格分段
console
.
log
(
arr
,
'arr'
);
arr
.
map
((
e
)
=>
{
if
(
e
.
indexOf
(
"src"
)
!=
-
1
)
{
let
Before
=
e
.
split
(
"url="
)[
1
]
if
(
Before
)
{
x
.
Src
=
decodeURIComponent
(
Before
.
slice
(
0
,
-
1
));
}
}
});
}
})
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
dataList
=
TempData
;
}
else
{
data
.
dataList
=
[...
data
.
dataList
,
...
TempData
];
}
data
.
Count
=
res
.
Data
.
Count
;
}
}
});
},
//从答题卡跳回来
jumpTopic
(
val
)
{
data
.
current
=
val
;
data
.
isShowAnswer
=
false
;
},
//点击显示答题卡
showAnswerSheet
()
{
data
.
isShowAnswer
=
true
;
},
hideAnswer
()
{
data
.
isShowAnswer
=
false
;
},
//获取答案改变后的数据
getAnswerChange
(
val
,
index
)
{
data
.
dataList
[
index
]
=
val
;
},
};
onMounted
(()
=>
{
data
.
statusBarHeight
=
uni
.
getSystemInfoSync
().
statusBarHeight
;
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
async
onLoad
(
options
)
{
if
(
options
&&
options
.
BankId
)
{
this
.
msg
.
BankId
=
options
.
BankId
}
this
.
getList
();
}
};
</
script
>
<
style
scoped
>
.Exam_Current
{
font-size
:
35
rpx
;
color
:
red
;
}
.Exam_Count
{
color
:
gray
;
font-size
:
26
rpx
;
}
</
style
>
src/pages/exam/examGradeList.vue
View file @
93f2350a
<
style
scoped
>
<
style
scoped
>
.GradeContent
{
.GradeContent
{
padding
:
0
35
rpx
;
min-height
:
100vh
;
height
:
100vh
;
background-color
:
#F5F5F5
;
background-color
:
#F5F5F5
;
}
}
.Grade_List
{
height
:
380
rpx
;
.Grade_List
{
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
24
rpx
;
border-radius
:
24
rpx
;
position
:
relative
;
position
:
relative
;
padding
:
30
rpx
;
padding
:
30
rpx
;
overflow
:
hidden
;
/* margin-bottom: 30rpx; */
margin
:
30
rpx
35
rpx
;
}
}
.Grade_Title
{
color
:
#111111
;
.Grade_Title
{
font-size
:
32
rpx
;
color
:
#111111
;
width
:
100%
;
font-size
:
32
rpx
;
width
:
100%
;
text-align
:
center
;
text-align
:
center
;
font-weight
:
bold
;
font-weight
:
bold
;
margin
:
10
rpx
0
40
rpx
0
;
margin-bottom
:
40
rpx
;
}
.Grade_Join
{
display
:
flex
;
}
}
.Grade_Join
view
{
flex
:
1
;
.Grade_Join
{
display
:
flex
;
}
}
.Grade_TopNum
{
.Grade_TopNum
{
color
:
#111111
;
color
:
#111111
;
font-size
:
24
rpx
;
font-size
:
24
rpx
;
margin-bottom
:
17
rpx
;
margin-bottom
:
17
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
height
:
34
rpx
;
}
}
.Grade_BtmText
{
color
:
#888888
;
.Grade_BtmText
{
font-size
:
22
rpx
;
color
:
#888888
;
font-size
:
22
rpx
;
}
}
.Grade_JoinFirst
{
.Grade_JoinFirst
{
position
:
relative
;
position
:
relative
;
padding-left
:
35
rpx
;
padding-left
:
35
rpx
;
width
:
28%
;
}
}
.Grade_JoinFirst
:after
{
.Grade_JoinFirst
:after
{
content
:
""
;
content
:
""
;
margin-left
:
15px
;
padding-left
:
15px
;
border-left
:
1px
solid
#c0c4cc
;
border-left
:
1px
solid
#c0c4cc
;
height
:
40
rpx
;
height
:
40
rpx
;
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
top
:
20
rpx
;
top
:
20
rpx
;
}
}
.Grade_JoinSecond
{
.Grade_JoinSecond
{
text-align
:
center
;
text-align
:
center
;
position
:
relative
;
position
:
relative
;
width
:
38%
;
display
:
flex
;
justify-content
:
center
;
}
}
.Grade_JoinSecond
:after
{
.Grade_JoinSecond
:after
{
content
:
""
;
content
:
""
;
border-left
:
1px
solid
#c0c4cc
;
border-left
:
1px
solid
#c0c4cc
;
height
:
40
rpx
;
height
:
40
rpx
;
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
position
:
absolute
;
position
:
absolute
;
right
:
0
;
right
:
0
;
top
:
20
rpx
;
top
:
20
rpx
;
}
}
.Grade_GongGu
{
display
:
flex
;
.Grade_GongGu
{
margin-top
:
40
rpx
;
display
:
flex
;
/* justify-content: space-between;
margin-top
:
35
rpx
;
*/
}
}
.Grade_Left
{
width
:
425
rpx
;
.Grade_Left
{
height
:
145
rpx
;
width
:
445
rpx
;
height
:
137
rpx
;
background-color
:
#F6F6FE
;
background-color
:
#F6F6FE
;
border-radius
:
24
rpx
;
border-radius
:
24
rpx
;
color
:
#4C50E7
;
color
:
#4C50E7
;
display
:
flex
;
align-items
:
center
;
}
.Grade_Left
view
{
flex
:
1
;
padding-left
:
15
rpx
;
}
.Grade_Score
{
color
:
#4C50E7
;
font-size
:
26
rpx
;
height
:
34
rpx
;
}
.Grade_Name
{
color
:
#B9BAF4
;
font-size
:
24
rpx
;
margin-top
:
15
rpx
;
}
.Grade_Gonggu
{
padding
:
10
rpx
20
rpx
;
background-color
:
#4C50E7
;
color
:
#FFFFFF
;
border-radius
:
30
rpx
;
margin-left
:
36
rpx
;
font-size
:
24
rpx
;
}
.Grade_jiexi
{
padding
:
10
rpx
20
rpx
;
border
:
1px
solid
#4C50E7
;
color
:
#4C50E7
;
border-radius
:
30
rpx
;
margin
:
20
rpx
0
0
36
rpx
;
font-size
:
24
rpx
;
}
.Grade_Pingce
{
position
:
absolute
;
padding
:
8
rpx
15
rpx
;
right
:
0
;
top
:
0
;
background-color
:
#FEEAD1
;
color
:
#FA9717
;
font-size
:
20
rpx
;
border-bottom-left-radius
:
20
rpx
;
}
.scroll-box
{
height
:
100vh
;
width
:
100%
;
}
}
</
style
>
</
style
>
<
template
>
<
template
>
<view
class=
"GradeContent"
>
<view
class=
"GradeContent"
>
<view
class=
"Grade_List"
>
<van-empty
description=
"暂无数据"
v-if=
"dataList.length === 0"
/>
<view
class=
"Grade_Title"
>
N5模拟试题 1
</view>
<scroll-view
:scroll-top=
"0"
scroll-y=
"true"
class=
"scroll-box"
@
scrolltolower=
"lower"
v-if=
"dataList.length > 0"
>
<view
class=
"Grade_List"
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"getDetail(item.BankId)"
>
<view
class=
"Grade_Title"
>
{{
item
.
BankName
}}
</view>
<view
class=
"Grade_Pingce"
>
测评次数 1
</view>
<view
class=
"Grade_Join"
>
<view
class=
"Grade_Join"
>
<view
class=
"Grade_JoinFirst"
>
<view
class=
"Grade_JoinFirst"
>
<view
class=
"Grade_TopNum"
>
1523
</view>
<view
class=
"Grade_TopNum"
>
{{
item
.
JoinNum
}}
</view>
<view
class=
"Grade_BtmText"
>
参加人数
</view>
<view
class=
"Grade_BtmText"
>
参加人数
</view>
</view>
</view>
<view
class=
"Grade_JoinSecond"
>
<view
class=
"Grade_JoinSecond"
>
<view
class=
"Grade_TopNum"
>
05′00″
</view>
<view
style=
"text-align: left;"
>
<!--
<view
class=
"Grade_TopNum"
>
{{
item
.
LeastTime
}}
</view>
-->
<view
class=
"Grade_TopNum"
>
12
</view>
<view
class=
"Grade_BtmText"
>
最低用时
</view>
<view
class=
"Grade_BtmText"
>
最低用时
</view>
</view>
</view>
</view>
<view>
<view>
<view
style=
"margin-left:60rpx;"
>
<view
style=
"margin-left:60rpx;"
>
<view
class=
"Grade_TopNum"
>
26
</view>
<view
class=
"Grade_TopNum"
>
{{
item
.
HighestScore
}}
</view>
<view
class=
"Grade_BtmText"
>
最高得分
</view>
<view
class=
"Grade_BtmText"
>
最高得分
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"Grade_GongGu"
>
<view
class=
"Grade_GongGu"
>
<view
class=
"Grade_Left"
>
<view
class=
"Grade_Left"
>
<view>
<view
class=
"Grade_Score"
>
{{
item
.
MyUseTime
}}
</view>
<view
class=
"Grade_Name"
>
我的课耗
</view>
</view>
</view>
<view>
<view>
<view
class=
"Grade_Score"
>
{{
item
.
MyScore
}}
</view>
<view
class=
"Grade_Name"
>
我的得分
</view>
</view>
<view>
<view
class=
"Grade_Score"
>
{{
item
.
MyRank
}}
</view>
<view
class=
"Grade_Name"
>
我的排名
</view>
</view>
</view>
<view>
<view
class=
"Grade_Gonggu"
>
巩固练习
</view>
<view
class=
"Grade_jiexi"
>
查看解析
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<Loadmore
:state=
"pageState"
/>
</scroll-view>
</view>
</view>
</
template
>
</
template
>
...
@@ -121,14 +204,63 @@
...
@@ -121,14 +204,63 @@
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
Loadmore
from
"../../components/loadmore.vue"
;
import
{
GetAppBankPage
,
GetAppBankDetails
}
from
"../../api/exam"
;
export
default
{
export
default
{
props
:
{},
components
:
{
Loadmore
},
setup
(
props
,
ctx
)
{
setup
(
props
,
ctx
)
{
let
data
=
reactive
({
let
data
=
reactive
({
msg
:
{},
pageState
:
"more"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
BankType
:
1
},
PageCount
:
0
,
dataList
:
[],
timer
:
null
,
//防抖
});
});
let
methods
=
{
let
methods
=
{
lower
(
e
)
{
if
(
data
.
msg
.
pageIndex
<
data
.
PageCount
)
{
data
.
pageState
=
"loading"
;
if
(
data
.
timer
)
clearTimeout
(
data
.
timer
);
data
.
timer
=
setTimeout
(()
=>
{
data
.
msg
.
pageIndex
++
;
that
.
getList
();
},
1000
);
}
else
{
data
.
pageState
=
"none"
;
}
},
async
getList
()
{
data
.
pageState
=
"loading"
;
let
res
=
await
GetAppBankPage
(
data
.
msg
);
if
(
res
)
{
if
(
data
.
timer
)
data
.
timer
=
null
;
data
.
PageCount
=
res
.
Data
.
PageCount
;
if
(
data
.
msg
.
pageIndex
===
1
)
{
data
.
dataList
=
res
.
Data
.
PageData
;
}
else
{
data
.
dataList
=
[...
data
.
dataList
,
...
res
.
Data
.
PageData
];
}
if
(
data
.
msg
.
pageIndex
>=
res
.
Data
.
PageCount
)
{
data
.
pageState
=
"none"
;
}
else
{
data
.
pageState
=
"more"
;
}
}
},
getDetail
(
BankId
){
uni
.
navigateTo
({
url
:
"/pages/exam/examGongu?BankId="
+
BankId
,
});
}
};
};
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
@@ -140,6 +272,10 @@
...
@@ -140,6 +272,10 @@
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
"日语等级测评"
title
:
"日语等级测评"
});
});
if
(
options
&&
options
.
BankType
)
{
this
.
msg
.
BankType
=
options
.
BankType
}
this
.
getList
();
},
},
};
};
</
script
>
</
script
>
...
...
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