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
1f8be06d
Commit
1f8be06d
authored
Mar 15, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
cc63fa89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
47 deletions
+109
-47
listen.vue
src/components/question/listen.vue
+78
-6
listen.vue
src/components/question/subject/listen.vue
+1
-19
examGongu.vue
src/pages/exam/examGongu.vue
+30
-22
No files found.
src/components/question/listen.vue
View file @
1f8be06d
...
...
@@ -12,9 +12,13 @@
</van-nav-bar>
<swiper
class=
"swiper-box"
:style=
"{height: `calc(100vh - 180rpx)`}"
:current=
"current"
@
change=
"onchange"
>
<swiper-item
v-for=
"(item1, index1) in dataList"
:key=
"index1"
:catchtouchmove=
"true"
>
<audio
style=
"text-align: left"
ref=
"audio"
v-if=
"isShow"
<
!-- <
audio style="text-align: left" ref="audio" v-if="isShow"
poster="http://pic.pimg.tw/pam86591/1408719752-3322564110_n.jpg" :src="item1.Src" name="日语听力"
:action=
"audioAction"
controls
></audio>
:action="audioAction" controls></audio> -->
<view
class=
"My_listen"
@
click=
"play(item1.Src)"
>
<i
class=
"icon_audio_default"
v-if=
"!isPlay"
></i>
<i
class=
"icon_audio_playing"
v-else
></i>
</view>
<view
class=
"item1"
:style=
"{ height: `calc(100vh - 460rpx)` }"
>
<
template
v-if=
"item1.StudentAnswer.length<item1.QuestionContentObj.length"
>
<view
class=
"questionView"
>
...
...
@@ -139,7 +143,7 @@
method
:
"pause"
},
isIOS
:
false
,
is
Show
:
tru
e
is
Play
:
fals
e
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
let
sys
=
uni
.
getSystemInfoSync
().
system
;
...
...
@@ -178,6 +182,19 @@
this
.
$emit
(
'getAfter'
);
}
},
play
(
Src
)
{
if
(
data
.
isPlay
){
innerAudioContext
.
pause
();
data
.
isPlay
=
false
;
}
else
{
innerAudioContext
.
src
=
Src
;
innerAudioContext
.
play
()
data
.
isPlay
=
true
;
innerAudioContext
.
onEnded
((
e
)
=>
{
data
.
isPlay
=
false
;
})
}
},
//点击上一题
getBeforeExam
()
{
data
.
current
=
data
.
current
-
1
;
...
...
@@ -185,7 +202,8 @@
//点击下一题
getNextExam
(
item
)
{
if
(
item
.
StudentAnswer
.
length
>
0
)
{
data
.
isShow
=
false
innerAudioContext
.
stop
();
data
.
isPlay
=
false
;
let
msg
=
{
Id
:
0
,
StudentId
:
UserInfo
.
AccountId
,
...
...
@@ -219,7 +237,7 @@
let
res
=
SetStudentPractice
(
msg
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
data
.
isShow
=
true
;
}
}
});
...
...
@@ -244,7 +262,7 @@
</
script
>
<
style
scoped
>
.AnswerBtn
{
margin-top
:
40
rpx
;
margin-top
:
38
rpx
;
/* position: absolute; */
}
...
...
@@ -411,4 +429,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
:
150
rpx
;
height
:
150
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/listen.vue
View file @
1f8be06d
...
...
@@ -6,11 +6,7 @@
<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>
<text
class=
"Exam_Score"
>
(
{{
dataObj
.
Score
}}
分)
</text>
<view
class=
"item1"
:style=
"
{ height: `calc(100vh - 414rpx)` }">
<view
class=
"questionView"
v-if=
"!isShowJx"
>
<view
v-for=
"(item, index) in dataObj.QuestionContentObj"
:key=
"index"
class=
"item2"
>
...
...
@@ -131,20 +127,6 @@
return
false
}
},
//获取音频链接
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
},
play
(
Src
)
{
let
arr
=
Src
.
split
(
" "
);
//按空格分段
var
MySrc
=
''
;
...
...
src/pages/exam/examGongu.vue
View file @
1f8be06d
...
...
@@ -69,7 +69,7 @@
dataList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
1000
,
pageSize
:
1000
0
,
BankId
:
0
,
StudentId
:
0
},
...
...
@@ -93,7 +93,8 @@
},
setMsg
:{
Id
:
0
}
},
CommonType
:
-
1
});
let
UserInfo
=
uni
.
getStorageSync
(
'userInfo'
);
...
...
@@ -105,15 +106,19 @@
if
(
e
&&
e
.
detail
){
data
.
current
=
e
.
detail
.
current
;
ctx
.
$refs
.
myRef
[
0
].
clickParent
();
this
.
setPractise
();
if
(
data
.
CommonType
==
3
||
data
.
CommonType
==
4
||
data
.
CommonType
==
5
||
data
.
CommonType
==
6
){
this
.
setPractise
();
}
}
},
//设置已答题
setPractise
(){
data
.
setMsg
.
Id
=
data
.
dataList
[
data
.
current
-
1
].
Id
;
SetPracticeReview
(
data
.
setMsg
).
then
(
res
=>
{
})
if
(
data
.
current
>=
1
){
data
.
setMsg
.
Id
=
data
.
dataList
[
data
.
current
-
1
].
Id
;
SetPracticeReview
(
data
.
setMsg
).
then
(
res
=>
{
})
}
},
getList
()
{
if
(
data
.
isShowJx
){
...
...
@@ -123,21 +128,13 @@
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
let
TempData
=
res
.
Data
.
PageData
;
//解析音频
TempData
.
forEach
(
x
=>
{
if
(
x
.
QuestionTypeKey
==
'listening'
){
let
arr
=
x
.
Title
.
split
(
" "
);
//按空格分段
arr
.
map
((
e
)
=>
{
if
(
e
.
indexOf
(
"src"
)
!=
-
1
)
{
let
Before
=
e
.
split
(
"url="
)[
1
]
if
(
Before
)
{
x
.
Src
=
decodeURIComponent
(
Before
.
slice
(
0
,
-
1
));
}
}
});
}
})
data
.
dataList
=
TempData
;
data
.
dataList
=
TempData
;
// if(data.msg.pageSize==20){
// data.dataList=TempData;
// }else{
// data.dataList = [...data.dataList, ...TempData];
// }
data
.
Count
=
res
.
Data
.
Count
;
}
}
...
...
@@ -200,10 +197,20 @@
this
.
msg
.
StudentId
=
''
;
this
.
isShowJx
=
false
;
this
.
getList
();
// setTimeout(function(){
// let _that = this;
// console.log('111');
// _that.msg.pageSize=1000;
// this.getList();
// },2000)
}
if
(
options
.
Type
==
2
){
this
.
isShowJx
=
true
;
this
.
getList
();
// setTimeout(function(){
// this.msg.pageSize=1000;
// this.getList();
// },2000)
}
//3 4 5 6从错题跳过来
if
(
options
.
Type
==
3
){
...
...
@@ -234,6 +241,7 @@
this
.
getWrongWord
();
this
.
isShowJx
=
true
;
}
this
.
CommonType
=
options
.
Type
;
}
}
};
...
...
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