Commit d2e7fc56 authored by zhengke's avatar zhengke

修改

parent edce4e92
......@@ -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(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment