|
@@ -126,8 +126,9 @@ |
|
|
</view> |
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
<view class="bottombox"> |
|
|
<view class="bottombox"> |
|
|
|
|
|
<LongAudio :customerId="customerId" :infos="infos" :roleindex="roleindex"></LongAudio> |
|
|
<!-- 播放块 --> |
|
|
<!-- 播放块 --> |
|
|
<view class="bottomhead"> |
|
|
|
|
|
|
|
|
<!-- <view class="bottomhead"> |
|
|
<view class="audio-play" @tap="changePlayState"> |
|
|
<view class="audio-play" @tap="changePlayState"> |
|
|
<image class="image" mode="widthFix" |
|
|
<image class="image" mode="widthFix" |
|
|
:src="audioPlay ? 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/pause.png' : 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/play.png'"> |
|
|
:src="audioPlay ? 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/pause.png' : 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/play.png'"> |
|
@@ -143,7 +144,7 @@ |
|
|
<text>{{timeStr}}</text> |
|
|
<text>{{timeStr}}</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> --> |
|
|
<!-- 底部弹框 --> |
|
|
<!-- 底部弹框 --> |
|
|
<view class="botbotmm"> |
|
|
<view class="botbotmm"> |
|
|
<view class="tmmchen" @click="guanjiancishifo()"> |
|
|
<view class="tmmchen" @click="guanjiancishifo()"> |
|
@@ -479,7 +480,11 @@ |
|
|
<script> |
|
|
<script> |
|
|
var util = require("../../utils/util.js"); |
|
|
var util = require("../../utils/util.js"); |
|
|
var config = require("../../config"); |
|
|
var config = require("../../config"); |
|
|
|
|
|
import LongAudio from "@/components/long_audio/long_audio.vue" |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
components:{ |
|
|
|
|
|
LongAudio |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
noClick: true, |
|
|
noClick: true, |
|
@@ -578,6 +583,7 @@ |
|
|
roleisshaw: false, |
|
|
roleisshaw: false, |
|
|
roleindexrow: 0, |
|
|
roleindexrow: 0, |
|
|
roletiaoshu: 0, |
|
|
roletiaoshu: 0, |
|
|
|
|
|
infos:null |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
onLoad: function(options) { |
|
|
onLoad: function(options) { |
|
@@ -586,6 +592,12 @@ |
|
|
this.itemobj = uni.getStorageSync('searchobj'); |
|
|
this.itemobj = uni.getStorageSync('searchobj'); |
|
|
console.log(this.itemobj) |
|
|
console.log(this.itemobj) |
|
|
this.stateisshow = options.stateisshow; |
|
|
this.stateisshow = options.stateisshow; |
|
|
|
|
|
uni.$on("playNows",(val)=>{ |
|
|
|
|
|
this.playNow=val; |
|
|
|
|
|
}) |
|
|
|
|
|
uni.$on("scrollIds",(val)=>{ |
|
|
|
|
|
this.scrollId=val; |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); |
|
|
this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); |
|
@@ -608,34 +620,28 @@ |
|
|
} |
|
|
} |
|
|
this.roleindex = 0; |
|
|
this.roleindex = 0; |
|
|
if (this.stateisshow == 2) { |
|
|
if (this.stateisshow == 2) { |
|
|
var info = this.itemobj; |
|
|
|
|
|
|
|
|
this.infos = this.itemobj; |
|
|
} else { |
|
|
} else { |
|
|
var pages = getCurrentPages(); |
|
|
var pages = getCurrentPages(); |
|
|
var currPage = pages[pages.length - 1]; //当前页面 |
|
|
var currPage = pages[pages.length - 1]; //当前页面 |
|
|
var info = currPage.data.info; |
|
|
|
|
|
|
|
|
this.infos = currPage.data.info; |
|
|
} |
|
|
} |
|
|
this.gituserlist() |
|
|
this.gituserlist() |
|
|
this.innerAudioContext = uni.createInnerAudioContext(); |
|
|
this.innerAudioContext = uni.createInnerAudioContext(); |
|
|
this.innerAudioContext.autoplay = false; |
|
|
|
|
|
this.innerAudioContext.title = '音频'; |
|
|
|
|
|
|
|
|
|
|
|
this.onPlay() |
|
|
|
|
|
this.onPause() |
|
|
|
|
|
this.onCanplay() |
|
|
|
|
|
this.onEnded() |
|
|
|
|
|
this.onSeeking() |
|
|
|
|
|
this.onSeeked() |
|
|
|
|
|
this.TimeUpdate() |
|
|
|
|
|
this.init(info) |
|
|
|
|
|
|
|
|
// this.innerAudioContext.autoplay = false; |
|
|
|
|
|
// this.innerAudioContext.title = '音频'; |
|
|
|
|
|
|
|
|
|
|
|
// this.onPlay() |
|
|
|
|
|
// this.onPause() |
|
|
|
|
|
// this.onCanplay() |
|
|
|
|
|
// this.onEnded() |
|
|
|
|
|
// this.onSeeking() |
|
|
|
|
|
// this.onSeeked() |
|
|
|
|
|
// this.TimeUpdate() |
|
|
|
|
|
this.init(this.infos) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onHide() { |
|
|
|
|
|
//暂停 |
|
|
|
|
|
this.innerAudioContext.pause() |
|
|
|
|
|
// 销毁 |
|
|
|
|
|
// this.innerAudioContext.destroy(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onUnload() { |
|
|
onUnload() { |
|
|
//暂停 |
|
|
//暂停 |
|
@@ -1086,93 +1092,93 @@ |
|
|
"&skpl=" + "1" |
|
|
"&skpl=" + "1" |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onPlay() { |
|
|
|
|
|
this.innerAudioContext.onPlay(() => { |
|
|
|
|
|
// 播放监听 |
|
|
|
|
|
console.log('播放!'); |
|
|
|
|
|
this.audioPlay = true; |
|
|
|
|
|
wx.enableAlertBeforeUnload({ |
|
|
|
|
|
message: "是否确认退出详情页面?", |
|
|
|
|
|
success: function(res) { |
|
|
|
|
|
console.log("方法注册成功:", res); |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function(errMsg) { |
|
|
|
|
|
console.log("方法注册失败:", errMsg); |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
onPause() { |
|
|
|
|
|
this.innerAudioContext.onPause(() => { |
|
|
|
|
|
wx.disableAlertBeforeUnload({ |
|
|
|
|
|
success: function(res) { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function(e) { |
|
|
|
|
|
console.log(e) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
// 暂停监听 |
|
|
|
|
|
console.log('暂停播放!'); |
|
|
|
|
|
this.audioPlay = false |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
onCanplay() { |
|
|
|
|
|
this.innerAudioContext.onCanplay((callback) => { |
|
|
|
|
|
console.log("缓冲回调", this.innerAudioContext.duration); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onEnded() { |
|
|
|
|
|
this.innerAudioContext.onEnded(() => { |
|
|
|
|
|
// 结束播放监听 |
|
|
|
|
|
console.log('播放结束!'); |
|
|
|
|
|
this.audioPlay = false; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
onSeeking() { |
|
|
|
|
|
this.innerAudioContext.onSeeking((res) => { |
|
|
|
|
|
console.log("进行跳转", res); |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
onSeeked() { |
|
|
|
|
|
this.innerAudioContext.onSeeked((res) => { |
|
|
|
|
|
console.log("结束跳转", res); |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
TimeUpdate() { |
|
|
|
|
|
this.innerAudioContext.onTimeUpdate(() => { |
|
|
|
|
|
// var pages = getCurrentPages(); |
|
|
|
|
|
// if(pages[pages.length-1].route!="pages/mine/details2"){ |
|
|
|
|
|
// this.innerAudioContext.destroy(); |
|
|
|
|
|
// } |
|
|
|
|
|
const { |
|
|
|
|
|
currentTime, |
|
|
|
|
|
duration |
|
|
|
|
|
} = this.innerAudioContext; |
|
|
|
|
|
console.log(currentTime, 'TimeUpdate, currentTime') |
|
|
|
|
|
this.playNow = parseInt(currentTime * 1000) |
|
|
|
|
|
console.log(this.playNow) |
|
|
|
|
|
if (this.dialogList.length == 0) { |
|
|
|
|
|
return |
|
|
|
|
|
} else { |
|
|
|
|
|
const message = this.dialogList[0].message; |
|
|
|
|
|
for (let i = 0; i < message.length; i++) { |
|
|
|
|
|
if (Number(message[i].bg) < this.playNow && Number(message[i].ed) > this.playNow) { |
|
|
|
|
|
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const currTimeStr = this.formatTime(currentTime); |
|
|
|
|
|
this.sliderValue = parseInt(currentTime); |
|
|
|
|
|
// 变动的时间 |
|
|
|
|
|
this.currentTimeStr = currTimeStr; |
|
|
|
|
|
//进度条最大值 |
|
|
|
|
|
this.sliderMax = this.luyinList[this.csdFileindex].recordDuration; |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// onPlay() { |
|
|
|
|
|
// this.innerAudioContext.onPlay(() => { |
|
|
|
|
|
// // 播放监听 |
|
|
|
|
|
// console.log('播放!'); |
|
|
|
|
|
// this.audioPlay = true; |
|
|
|
|
|
// wx.enableAlertBeforeUnload({ |
|
|
|
|
|
// message: "是否确认退出详情页面?", |
|
|
|
|
|
// success: function(res) { |
|
|
|
|
|
// console.log("方法注册成功:", res); |
|
|
|
|
|
// }, |
|
|
|
|
|
// fail: function(errMsg) { |
|
|
|
|
|
// console.log("方法注册失败:", errMsg); |
|
|
|
|
|
// }, |
|
|
|
|
|
// }); |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
// onPause() { |
|
|
|
|
|
// this.innerAudioContext.onPause(() => { |
|
|
|
|
|
// wx.disableAlertBeforeUnload({ |
|
|
|
|
|
// success: function(res) { |
|
|
|
|
|
// console.log(res) |
|
|
|
|
|
// }, |
|
|
|
|
|
// fail: function(e) { |
|
|
|
|
|
// console.log(e) |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// // 暂停监听 |
|
|
|
|
|
// console.log('暂停播放!'); |
|
|
|
|
|
// this.audioPlay = false |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
// onCanplay() { |
|
|
|
|
|
// this.innerAudioContext.onCanplay((callback) => { |
|
|
|
|
|
// console.log("缓冲回调", this.innerAudioContext.duration); |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
// onEnded() { |
|
|
|
|
|
// this.innerAudioContext.onEnded(() => { |
|
|
|
|
|
// // 结束播放监听 |
|
|
|
|
|
// console.log('播放结束!'); |
|
|
|
|
|
// this.audioPlay = false; |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
// onSeeking() { |
|
|
|
|
|
// this.innerAudioContext.onSeeking((res) => { |
|
|
|
|
|
// console.log("进行跳转", res); |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
// onSeeked() { |
|
|
|
|
|
// this.innerAudioContext.onSeeked((res) => { |
|
|
|
|
|
// console.log("结束跳转", res); |
|
|
|
|
|
// this.$forceUpdate() |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
// TimeUpdate() { |
|
|
|
|
|
// this.innerAudioContext.onTimeUpdate(() => { |
|
|
|
|
|
// // var pages = getCurrentPages(); |
|
|
|
|
|
// // if(pages[pages.length-1].route!="pages/mine/details2"){ |
|
|
|
|
|
// // this.innerAudioContext.destroy(); |
|
|
|
|
|
// // } |
|
|
|
|
|
// const { |
|
|
|
|
|
// currentTime, |
|
|
|
|
|
// duration |
|
|
|
|
|
// } = this.innerAudioContext; |
|
|
|
|
|
// console.log(currentTime, 'TimeUpdate, currentTime') |
|
|
|
|
|
// this.playNow = parseInt(currentTime * 1000) |
|
|
|
|
|
// console.log(this.playNow) |
|
|
|
|
|
// if (this.dialogList.length == 0) { |
|
|
|
|
|
// return |
|
|
|
|
|
// } else { |
|
|
|
|
|
// const message = this.dialogList[0].message; |
|
|
|
|
|
// for (let i = 0; i < message.length; i++) { |
|
|
|
|
|
// if (Number(message[i].bg) < this.playNow && Number(message[i].ed) > this.playNow) { |
|
|
|
|
|
// this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; |
|
|
|
|
|
// break; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// const currTimeStr = this.formatTime(currentTime); |
|
|
|
|
|
// this.sliderValue = parseInt(currentTime); |
|
|
|
|
|
// // 变动的时间 |
|
|
|
|
|
// this.currentTimeStr = currTimeStr; |
|
|
|
|
|
// //进度条最大值 |
|
|
|
|
|
// this.sliderMax = this.luyinList[this.csdFileindex].recordDuration; |
|
|
|
|
|
// this.$forceUpdate() |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
init(info) { |
|
|
init(info) { |
|
@@ -1203,7 +1209,7 @@ |
|
|
this.date = res[0].receptionTime; |
|
|
this.date = res[0].receptionTime; |
|
|
|
|
|
|
|
|
this.getCorpusAnalysis(info); |
|
|
this.getCorpusAnalysis(info); |
|
|
this.creatAudio() |
|
|
|
|
|
|
|
|
// this.creatAudio() |
|
|
} else { |
|
|
} else { |
|
|
this.luyinList = res; |
|
|
this.luyinList = res; |
|
|
this.recordPath = res[0].recordPath |
|
|
this.recordPath = res[0].recordPath |
|
@@ -1212,22 +1218,22 @@ |
|
|
this.date = res[0].receptionTime; |
|
|
this.date = res[0].receptionTime; |
|
|
|
|
|
|
|
|
this.getCorpusAnalysis(info); |
|
|
this.getCorpusAnalysis(info); |
|
|
this.creatAudio() |
|
|
|
|
|
|
|
|
// this.creatAudio() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
//搜索跳转 |
|
|
//搜索跳转 |
|
|
adasdasdasd(e) { |
|
|
|
|
|
const currTimeStr = this.formatTime(e) |
|
|
|
|
|
this.currentTimeStr = currTimeStr |
|
|
|
|
|
this.innerAudioContext.seek(e); |
|
|
|
|
|
if (uni.getStorageSync('entrance') == 1) { |
|
|
|
|
|
return |
|
|
|
|
|
} else { |
|
|
|
|
|
this.innerAudioContext.play(); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// adasdasdasd(e) { |
|
|
|
|
|
// const currTimeStr = this.formatTime(e) |
|
|
|
|
|
// this.currentTimeStr = currTimeStr |
|
|
|
|
|
// this.innerAudioContext.seek(e); |
|
|
|
|
|
// if (uni.getStorageSync('entrance') == 1) { |
|
|
|
|
|
// return |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.innerAudioContext.play(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
//下一页 |
|
|
//下一页 |
|
|
ltolower() { |
|
|
ltolower() { |
|
|
var lengthcz = this.newluyinList.length - 1; |
|
|
var lengthcz = this.newluyinList.length - 1; |
|
@@ -1683,7 +1689,7 @@ |
|
|
this.newluyinList = jsonInfo; |
|
|
this.newluyinList = jsonInfo; |
|
|
this.dialogList.push(jsonInfo[this.textindex]); |
|
|
this.dialogList.push(jsonInfo[this.textindex]); |
|
|
var itc = parseInt(info.bg / 1000) |
|
|
var itc = parseInt(info.bg / 1000) |
|
|
this.adasdasdasd(itc) |
|
|
|
|
|
|
|
|
// this.adasdasdasd(itc) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
@@ -1695,41 +1701,41 @@ |
|
|
return util.formatSecond(time) |
|
|
return util.formatSecond(time) |
|
|
}, |
|
|
}, |
|
|
// 录音暂停播放 |
|
|
// 录音暂停播放 |
|
|
changePlayState() { |
|
|
|
|
|
if (this.audioPlay == false) { |
|
|
|
|
|
this.innerAudioContext.play(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.innerAudioContext.pause() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// changePlayState() { |
|
|
|
|
|
// if (this.audioPlay == false) { |
|
|
|
|
|
// this.innerAudioContext.play(); |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.innerAudioContext.pause() |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
//音频前进回退 |
|
|
//音频前进回退 |
|
|
sliderChangeComplate(e) { |
|
|
|
|
|
let platetime = e.detail.value * 1000; |
|
|
|
|
|
this.dialogList = [] |
|
|
|
|
|
uni.request({ |
|
|
|
|
|
url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id + |
|
|
|
|
|
"&bg=" + platetime, //仅为示例,并非真实接口地址。 |
|
|
|
|
|
method: "GET", |
|
|
|
|
|
header: { |
|
|
|
|
|
'content-type': 'application/json', |
|
|
|
|
|
'Access-Token': uni.getStorageSync('weapp_session_login_data').token |
|
|
|
|
|
}, |
|
|
|
|
|
success: (data) => { |
|
|
|
|
|
this.textindex = data.data.data.index; |
|
|
|
|
|
this.toptextindex = data.data.data.index; |
|
|
|
|
|
if (data.data.data.index > this.newluyinList.length) { |
|
|
|
|
|
this.dialogList.push(this.newluyinList[0]) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dialogList.push(this.newluyinList[data.data.data.index]) |
|
|
|
|
|
} |
|
|
|
|
|
console.log(e.detail, '1233333333333333333333333333333333333333333333333333333333333') |
|
|
|
|
|
const currTimeStr = this.formatTime(e.detail.value) |
|
|
|
|
|
this.currentTimeStr = currTimeStr |
|
|
|
|
|
this.innerAudioContext.seek(e.detail.value); |
|
|
|
|
|
this.innerAudioContext.play(); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// sliderChangeComplate(e) { |
|
|
|
|
|
// let platetime = e.detail.value * 1000; |
|
|
|
|
|
// this.dialogList = [] |
|
|
|
|
|
// uni.request({ |
|
|
|
|
|
// url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id + |
|
|
|
|
|
// "&bg=" + platetime, //仅为示例,并非真实接口地址。 |
|
|
|
|
|
// method: "GET", |
|
|
|
|
|
// header: { |
|
|
|
|
|
// 'content-type': 'application/json', |
|
|
|
|
|
// 'Access-Token': uni.getStorageSync('weapp_session_login_data').token |
|
|
|
|
|
// }, |
|
|
|
|
|
// success: (data) => { |
|
|
|
|
|
// this.textindex = data.data.data.index; |
|
|
|
|
|
// this.toptextindex = data.data.data.index; |
|
|
|
|
|
// if (data.data.data.index > this.newluyinList.length) { |
|
|
|
|
|
// this.dialogList.push(this.newluyinList[0]) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.dialogList.push(this.newluyinList[data.data.data.index]) |
|
|
|
|
|
// } |
|
|
|
|
|
// console.log(e.detail, '1233333333333333333333333333333333333333333333333333333333333') |
|
|
|
|
|
// const currTimeStr = this.formatTime(e.detail.value) |
|
|
|
|
|
// this.currentTimeStr = currTimeStr |
|
|
|
|
|
// this.innerAudioContext.seek(e.detail.value); |
|
|
|
|
|
// this.innerAudioContext.play(); |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
//长按点击播放 |
|
|
//长按点击播放 |
|
|
clickbofang(dialog, item) { |
|
|
clickbofang(dialog, item) { |
|
|
this.innerAudioContext.pause() |
|
|
this.innerAudioContext.pause() |
|
@@ -1764,24 +1770,24 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
//录音实例 |
|
|
//录音实例 |
|
|
creatAudio() { |
|
|
|
|
|
this.innerAudioContext = uni.createInnerAudioContext(); |
|
|
|
|
|
if (uni.getStorageSync('entrance') == 1) { |
|
|
|
|
|
this.innerAudioContext.autoplay = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.innerAudioContext.autoplay = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.innerAudioContext.src = this.recordPath; |
|
|
|
|
|
this.innerAudioContext.title = '音频'; |
|
|
|
|
|
this.onPlay() |
|
|
|
|
|
this.onPause() |
|
|
|
|
|
this.onCanplay() |
|
|
|
|
|
this.onEnded() |
|
|
|
|
|
this.onSeeking() |
|
|
|
|
|
this.onSeeked() |
|
|
|
|
|
this.TimeUpdate() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// creatAudio() { |
|
|
|
|
|
// this.innerAudioContext = uni.createInnerAudioContext(); |
|
|
|
|
|
// if (uni.getStorageSync('entrance') == 1) { |
|
|
|
|
|
// this.innerAudioContext.autoplay = false; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.innerAudioContext.autoplay = true; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// this.innerAudioContext.src = this.recordPath; |
|
|
|
|
|
// this.innerAudioContext.title = '音频'; |
|
|
|
|
|
// this.onPlay() |
|
|
|
|
|
// this.onPause() |
|
|
|
|
|
// this.onCanplay() |
|
|
|
|
|
// this.onEnded() |
|
|
|
|
|
// this.onSeeking() |
|
|
|
|
|
// this.onSeeked() |
|
|
|
|
|
// this.TimeUpdate() |
|
|
|
|
|
// }, |
|
|
formatTime(num) { |
|
|
formatTime(num) { |
|
|
//格式化时间格式 |
|
|
//格式化时间格式 |
|
|
num = num.toFixed(0); |
|
|
num = num.toFixed(0); |
|
|