|
|
@@ -614,7 +614,7 @@ |
|
|
|
pageIndex: 1, // 当前页面
|
|
|
|
pageSize: 100, // 每页条数
|
|
|
|
audioListSize: Math.ceil(audioList.length / 100), // 页面分页
|
|
|
|
|
|
|
|
allAudioList: [], // 全部的列表
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
@@ -635,8 +635,6 @@ |
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad: function(options) {
|
|
|
|
console.log('audioList', audioList, audioList.length % 100)
|
|
|
|
console.log(this.pagination(this.pageIndex, this.pageSize, audioList))
|
|
|
|
this.status = options.status;
|
|
|
|
this.customerId = options.customerId;
|
|
|
|
this.itemobj = uni.getStorageSync('searchobj');
|
|
|
@@ -700,7 +698,8 @@ |
|
|
|
// this.innerAudioContext.destroy();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
// 分页
|
|
|
|
|
|
|
|
// 分页器
|
|
|
|
pagination(pageNo, pageSize, array) {
|
|
|
|
var offset = (pageNo - 1) * pageSize;
|
|
|
|
return (offset + pageSize >= array.length) ? array.slice(offset, array.length) : array.slice(offset,
|
|
|
@@ -716,8 +715,7 @@ |
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
this.pagination(this.pageIndex--, this.pageSize, audioList)
|
|
|
|
this.pagination(this.pageIndex--, this.pageSize, this.newluyinList)
|
|
|
|
},
|
|
|
|
|
|
|
|
// 下一页
|
|
|
@@ -728,7 +726,7 @@ |
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
this.pagination(this.pageIndex++, this.pageSize, this.newluyinList)
|
|
|
|
},
|
|
|
|
|
|
|
|
SPEAKERSTYLE(index) {
|
|
|
@@ -1050,6 +1048,7 @@ |
|
|
|
this.tap = false
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
radioChange(evt) {
|
|
|
|
this.effectiveitext = "";
|
|
|
|
for (let i = 0; i < this.effectiveitems.length; i++) {
|
|
|
@@ -1292,30 +1291,25 @@ |
|
|
|
}
|
|
|
|
});
|
|
|
|
// 暂停监听
|
|
|
|
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()
|
|
|
|
});
|
|
|
|
},
|
|
|
@@ -1329,9 +1323,8 @@ |
|
|
|
currentTime,
|
|
|
|
duration
|
|
|
|
} = this.innerAudioContext;
|
|
|
|
console.log(currentTime, 'TimeUpdate, currentTime')
|
|
|
|
console.log('监听方法', currentTime)
|
|
|
|
this.playNow = parseInt(currentTime * 1000)
|
|
|
|
console.log(this.playNow)
|
|
|
|
if (this.dialogList.length == 0) {
|
|
|
|
return
|
|
|
|
} else {
|
|
|
@@ -1848,13 +1841,9 @@ |
|
|
|
this.dshfkjsdkksodofydwfkhwdfkjh = 0;
|
|
|
|
} else {
|
|
|
|
if (data.data.data.viewNameFlag == 1) {
|
|
|
|
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
|
|
|
|
.speaker]
|
|
|
|
.name;
|
|
|
|
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data.speaker].name;
|
|
|
|
} else {
|
|
|
|
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data
|
|
|
|
.speaker]
|
|
|
|
.name + "顾问";
|
|
|
|
this.tablist[data.data.data.speaker].name = this.tablist[data.data.data.speaker].name + "顾问";
|
|
|
|
}
|
|
|
|
this.roleindexbiaoji = data.data.data.speaker - 1;
|
|
|
|
this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
|
|
|
@@ -1875,7 +1864,6 @@ |
|
|
|
this.textindex = data.data.data.index;
|
|
|
|
//下拉标记点
|
|
|
|
this.toptextindex = data.data.data.index;
|
|
|
|
|
|
|
|
jsonInfo.forEach(item => {
|
|
|
|
item.message = JSON.parse(item.onebest)
|
|
|
|
item.backindex = this.csdFileindex;
|
|
|
@@ -1888,6 +1876,7 @@ |
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
this.newluyinList = jsonInfo;
|
|
|
|
this.dialogList.push(jsonInfo[this.textindex]);
|
|
|
|
var itc = parseInt(info.bg / 1000)
|
|
|
@@ -1896,9 +1885,6 @@ |
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTime(time) {
|
|
|
|
return util.formatSecond(time)
|
|
|
|
},
|
|
|
@@ -1912,32 +1898,32 @@ |
|
|
|
},
|
|
|
|
//音频前进回退
|
|
|
|
sliderChangeComplate(e) {
|
|
|
|
let platetime = e.detail.value * 1000;
|
|
|
|
this.innerAudioContext.pause()
|
|
|
|
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) {
|
|
|
|
let platetime = e.detail.value * 1000;
|
|
|
|
this.newluyinList.map((item, index) => {
|
|
|
|
if (item.bg < platetime && platetime < item.ed ) {
|
|
|
|
this.textindex = index;
|
|
|
|
this.toptextindex = index;
|
|
|
|
if (index > this.newluyinList.length) {
|
|
|
|
this.dialogList.push(this.newluyinList[0])
|
|
|
|
} else {
|
|
|
|
this.dialogList.push(this.newluyinList[data.data.data.index])
|
|
|
|
this.dialogList.push(this.newluyinList[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();
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.adasdasdasd(e.detail.value)
|
|
|
|
setTimeout(() => {
|
|
|
|
this.innerAudioContext.play()
|
|
|
|
}, 1000)
|
|
|
|
this.$forceUpdate()
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取当前条数在第几页
|
|
|
|
getPage(index) {
|
|
|
|
return Math.ceil(index / 100)
|
|
|
|
},
|
|
|
|
|
|
|
|
//长按点击播放
|
|
|
|
clickbofang(dialog, item) {
|
|
|
|
this.innerAudioContext.pause()
|
|
|
|