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
d2e7fc56
Commit
d2e7fc56
authored
Sep 18, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
edce4e92
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
ListenTopic.vue
src/components/subject/ListenTopic.vue
+24
-2
No files found.
src/components/subject/ListenTopic.vue
View file @
d2e7fc56
...
...
@@ -28,7 +28,8 @@
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view
<audio
style=
"text-align: left"
poster=
"https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7fbf26a0-4f4a-11eb-b680-7980c8a877b8.png"
:src=
"item1.Src"
name=
"日语听力"
:action=
"audioAction"
controls
></audio>
<!--
<view
class=
"audioBox flex flex_center_center"
@
click=
"audioManage(item1.Src)"
>
...
...
@@ -44,7 +45,7 @@
ref=
"listenCountdown"
format=
"mm:ss"
/>
</view>
</view>
-->
</view>
<view
class=
"questionView"
...
...
@@ -298,6 +299,9 @@ export default {
statusBarHeight
:
0
,
isOperate
:
props
.
isOperate
,
ExamStatus
:
props
.
ExamStatus
,
audioAction
:
{
method
:
'pause'
}
});
data
.
data
.
DetailsList
.
map
((
item
)
=>
{
let
arr
=
item
.
Title
.
split
(
" "
);
//按空格分段
...
...
@@ -343,6 +347,24 @@ export default {
back
()
{
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
)
{
innerAudioContext
.
src
=
url
;
innerAudioContext
.
onCanplay
(()
=>
{
...
...
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