From c49794a00969ab5ec86fe388848dd5ee952b62bc Mon Sep 17 00:00:00 2001
From: douzhuo <17611323298@163.com>
Date: Wed, 18 May 2022 18:01:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E9=9F=B3=E6=92=AD=E6=94=BE=E5=A4=84?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Customerportrait/Receivedetailabout.vue | 7 +-
pages/center/prohibited/details.vue | 152 ++++++-----
pages/mine/details2.vue | 235 +++++++++---------
utils/domain.js | 4 +-
4 files changed, 211 insertions(+), 187 deletions(-)
diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
index 31540ae..195f7d6 100644
--- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
+++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
@@ -1142,7 +1142,8 @@
argece(item) {
console.log(item)
if (item.selected == 0) {
- console.log(item)
+ console.log(item)
+ this.Pinspeak = false
uni.navigateTo({
url: '/pages/mine/ScoringPlaylist?customerId=' + this.customerId + "&id=" + item
.keywordsId + "&type=" + 1 + "&UpDateEvent=Receivedetailabout"
@@ -1324,7 +1325,8 @@
},
//评分点击
clickaudeopal(item) {
- if (item.selected == 0) {
+ if (item.selected == 0) {
+ this.Pinspeak = false
uni.navigateTo({
url: '/pages/mine/ScoringPlaylist?customerId=' + this.customerId + "&id=" + item.marketingId + "&type=0" + "&UpDateEvent=Receivedetailabout"
})
@@ -1345,7 +1347,6 @@
this.dialogList[0].message.push(item)
})
}
- console.log("下一页", this.textindex)
},
//上一页
rolltoupper() {
diff --git a/pages/center/prohibited/details.vue b/pages/center/prohibited/details.vue
index 5f32491..ea743a7 100644
--- a/pages/center/prohibited/details.vue
+++ b/pages/center/prohibited/details.vue
@@ -31,8 +31,8 @@
-
+
{
console.log('我是强制暂停或关闭小程序音频浮窗触发的')
@@ -318,6 +319,12 @@
this.$zaudio.off('seek', this.ACTION);
this.$zaudio.off('stop', this.ACTION);
this.$zaudio.off('playing', this.ACTION);
+ this.$zaudio.setAudio([{
+ src: '',
+ title: '',
+ singer: '',
+ coverImgUrl: ''
+ }])
},
methods: {
@@ -555,7 +562,6 @@
this.timeStr = this.getTime(res[0].recordDuration)
this.date = res[0].receptionTime;
this.getCorpusAnalysis(info);
- this.zyAudio()
} else {
this.luyinList = res;
this.recordPath = res[0].recordPath
@@ -563,7 +569,6 @@
this.timeStr = this.getTime(res[0].recordDuration)
this.date = res[0].receptionTime;
this.getCorpusAnalysis(info);
- this.zyAudio()
}
}
})
@@ -605,25 +610,29 @@
if (data.data.data.speaker == null) {
this.dshfkjsdkksodofydwfkhwdfkjh = 0;
} else {
- if(data.data.data.viewNameFlag == 1){
- this.tablist[data.data.data.speaker].name = this.tablist[data.data.data.speaker]
+ if (data.data.data.viewNameFlag == 1) {
+ 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 + "顾问";
- }
+ } else {
+ 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;
}
- if(data.data.data.viewNameFlag == 1){
- let p = [{name:'顾问'}]
- this.tablist = [...this.tablist,...p]
+ if (data.data.data.viewNameFlag == 1) {
+ let p = [{
+ name: '顾问'
+ }]
+ this.tablist = [...this.tablist, ...p]
this.isSw = true
- }else{
+ } else {
this.isSw = false
- }
-
+ }
+
this.speaker = data.data.data.speaker;
//上拉标记点
this.textindex = data.data.data.index;
@@ -643,9 +652,11 @@
}
})
this.newluyinList = jsonInfo;
- this.dialogList.push(jsonInfo[this.textindex]);
+ this.dialogList.push(jsonInfo[0]);
+ console.log(this.dialogList, '12312321')
var itc = parseInt(info.bg / 1000)
this.adasdasdasd(itc)
+ this.$forceUpdate()
}
})
},
@@ -694,30 +705,31 @@
//分角色标记刷新
fenjiaoseunfo() {
- var bgcd = this.sliderValue * 1000;
+ var bgcd = this.playNow * 1000;
this.newluyinList = [];
this.dialogList = [];
-
+
let voFlagValue;
- if(this.roleindex==0){
+ if (this.roleindex == 0) {
voFlagValue = 0
- }else{
+ } else {
voFlagValue = 1
}
let tempRoleIndex;
- if(this.isSw){
- if(this.roleindex==this.tablist.length-1){
+ if (this.isSw) {
+ if (this.roleindex == this.tablist.length - 1) {
tempRoleIndex = 0
- }else{
+ } else {
tempRoleIndex = this.roleindex
}
- }else{
+ } else {
tempRoleIndex = this.roleindex
}
-
+
uni.request({
url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
- "&bg=" + bgcd + "&speaker=" + tempRoleIndex + "&voFlag=" + voFlagValue + '&num=50', //仅为示例,并非真实接口地址。
+ "&bg=" + bgcd + "&speaker=" + tempRoleIndex + "&voFlag=" + voFlagValue +
+ '&num=50', //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
@@ -742,22 +754,26 @@
this.roleindexbiaoji = 0;
this.dshfkjsdkksodofydwfkhwdfkjh = 0;
} else {
- if(data.data.data.viewNameFlag == 1){
- this.tablist[data.data.data.speaker].name = this.tablist[data.data.data.speaker]
+ if (data.data.data.viewNameFlag == 1) {
+ 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 + "顾问";
- }
+ } else {
+ 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;
}
-
- if(data.data.data.viewNameFlag == 1){
- let p = [{name:'顾问'}]
- this.tablist = [...this.tablist,...p]
+
+ if (data.data.data.viewNameFlag == 1) {
+ let p = [{
+ name: '顾问'
+ }]
+ this.tablist = [...this.tablist, ...p]
}
-
+
if (this.roleindex > this.tablist.length - 1) {
this.roleindex = this.tablist.length - 1
this.fenjiaoseunfo()
@@ -788,7 +804,6 @@
// 选中下标
change(index) {
- console.log(index)
this.current = index;
if (index == 1) {
this.zyAudio()
@@ -835,7 +850,7 @@
})
},
TimeUpdate(currentTime) {
- this.playNow = Math.ceil(currentTime)
+ this.playNow = Number(currentTime)
if (this.dialogList.length == 0) {
return
} else {
@@ -862,26 +877,29 @@
//音频前进回退
sliderChangeComplate(currentTime) {
- let platetime = (currentTime * 1000) || 0;
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])
+ for (let i = 0; i < this.newluyinList.length; i++) {
+ let message = this.newluyinList[i].message
+ if (!message) return
+ if (Math.floor(this.newluyinList[i].bg / 1000) <= currentTime && currentTime <= Math.floor(this
+ .newluyinList[i].ed / 1000)) {
+ for (let j = 0; j < message.length; j++) {
+ let item = message[j]
+ if (Math.floor(item.bg / 1000) <= currentTime && currentTime <= Math.floor(item.ed / 1000)) {
+ this.scrollId = "dialog" + this.csdFileindex + "text" + item.bg;
+ break;
+ }
+ if (j < message.length - 1 && Math.floor(item.ed / 1000) <= currentTime && currentTime <= Math
+ .floor(item.bg / 1000)) {
+ this.scrollId = "dialog" + this.csdFileindex + "text" + item.bg;
+ break;
+ }
}
+ this.textindex = i;
+ this.toptextindex = i;
+ this.dialogList.push(this.newluyinList[i])
}
- })
+ }
},
@@ -900,8 +918,8 @@
if (min < 10) min = '0' + min;
return min + ":" + second;
},
-
-
+
+
//录音实例
zyAudio() {
let data = [{
@@ -920,7 +938,7 @@
}, 150)
}
},
-
+
// 跳转指定位置播放
stepPlay(t) {
this.$zaudio.seek(t)
@@ -946,7 +964,7 @@
}
return str
},
-
+
// 处理状态
DisposeStatus(status) {
let str = '';
@@ -1162,7 +1180,7 @@
color: #ccc;
font-size: 18rpx;
font-size: 30rpx;
-
+
.AudioUserName {
margin-right: 20rpx;
}
@@ -1195,7 +1213,7 @@
&.reverse {
flex-direction: row-reverse;
text-align: right;
-
+
.avatar {
margin-left: 24rpx;
}
diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue
index d7a00c7..6969a8e 100644
--- a/pages/mine/details2.vue
+++ b/pages/mine/details2.vue
@@ -587,8 +587,7 @@
this.roleindex = 0;
if (this.stateisshow == 2) {
this.infos = this.itemobj;
- }
- !this.isPageHide && this.init(this.infos);
+ }!this.isPageHide && this.init(this.infos);
this.gituserlist()
},
@@ -600,6 +599,7 @@
onUnload() {
uni.$off('DETAILS2INIT')
//卸载不需要的业务和获取播放状态的业务,提高页面性能
+ this.$zaudio.stop()
this.$zaudio.off('seek', this.ACTION);
this.$zaudio.off('stop', this.ACTION);
this.$zaudio.off('playing', this.ACTION);
@@ -969,101 +969,102 @@
this.newluyinList = [];
this.fenjiaoseunfo()
this.$forceUpdate()
- }, //------------------------------------分角色标记刷新
- fenjiaoseunfo() {
- var bgcd = this.sliderValue * 1000;
- this.newluyinList = [];
- this.dialogList = [];
- let voFlagValue;
- if (this.roleindex == 0) {
- voFlagValue = 0
- } else {
- voFlagValue = 1
- }
- let tempRoleIndex;
- if (this.isSw) {
- if (this.roleindex == this.tablist.length - 1) {
- tempRoleIndex = 0
- } else {
- tempRoleIndex = this.roleindex
- }
- } else {
- tempRoleIndex = this.roleindex
- }
- console.log()
- uni.request({
- url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
- "&bg=" + bgcd + "&speaker=" + tempRoleIndex + "&voFlag=" + voFlagValue + '&num=50', //仅为示例,并非真实接口地址。
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- success: (data) => {
- this.tablist = [];
- let jsonInfo = JSON.parse(data.data.data.audioContent);
- for (var i = 0; i <= data.data.data.speakerNum; i++) {
- if (i === 0) {
- this.tablist.push({
- name: '全部'
- })
- } else {
- this.tablist.push({
- name: String.fromCharCode(i + 64)
- })
- }
- }
-
- if (data.data.data.speaker == null) {
- this.roleindexbiaoji = 0;
- this.dshfkjsdkksodofydwfkhwdfkjh = 0;
- } else {
- if (data.data.data.viewNameFlag == 1) {
- 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.roleindexbiaoji = data.data.data.speaker - 1;
- this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
- }
-
- if (data.data.data.viewNameFlag == 1) {
- let p = [{
- name: '顾问'
- }]
- this.tablist = [...this.tablist, ...p]
- }
-
- if (this.roleindex > this.tablist.length - 1) {
- this.roleindex = this.tablist.length - 1
- this.fenjiaoseunfo()
- }
-
-
- this.speaker = data.data.data.speaker;
- //上拉标记点
- this.textindex = data.data.data.index;
- //下拉标记点
- this.toptextindex = data.data.data.index;
- this.isShowMark = data.data.data.viewNameFlag;
- console.log(this.isShowMark)
- jsonInfo.forEach(item => {
- item.message = JSON.parse(item.onebest)
- item.backindex = this.csdFileindex
- })
-
- this.newluyinList = jsonInfo;
- if (this.textindex == null) {
- return
- } else {
- this.dialogList.push(jsonInfo[this.textindex]);
- }
- }
- })
+ }, //------------------------------------分角色标记刷新
+ fenjiaoseunfo() {
+ var bgcd = this.playNow * 1000;
+ this.newluyinList = [];
+ this.dialogList = [];
+ let voFlagValue;
+ if (this.roleindex == 0) {
+ voFlagValue = 0
+ } else {
+ voFlagValue = 1
+ }
+ let tempRoleIndex;
+ if (this.isSw) {
+ if (this.roleindex == this.tablist.length - 1) {
+ tempRoleIndex = 0
+ } else {
+ tempRoleIndex = this.roleindex
+ }
+ } else {
+ tempRoleIndex = this.roleindex
+ }
+ console.log()
+ uni.request({
+ url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
+ "&bg=" + bgcd + "&speaker=" + tempRoleIndex + "&voFlag=" + voFlagValue +
+ '&num=50', //仅为示例,并非真实接口地址。
+ method: "GET",
+ header: {
+ 'content-type': 'application/json',
+ 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
+ },
+ success: (data) => {
+ this.tablist = [];
+ let jsonInfo = JSON.parse(data.data.data.audioContent);
+ for (var i = 0; i <= data.data.data.speakerNum; i++) {
+ if (i === 0) {
+ this.tablist.push({
+ name: '全部'
+ })
+ } else {
+ this.tablist.push({
+ name: String.fromCharCode(i + 64)
+ })
+ }
+ }
+
+ if (data.data.data.speaker == null) {
+ this.roleindexbiaoji = 0;
+ this.dshfkjsdkksodofydwfkhwdfkjh = 0;
+ } else {
+ if (data.data.data.viewNameFlag == 1) {
+ 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.roleindexbiaoji = data.data.data.speaker - 1;
+ this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
+ }
+
+ if (data.data.data.viewNameFlag == 1) {
+ let p = [{
+ name: '顾问'
+ }]
+ this.tablist = [...this.tablist, ...p]
+ }
+
+ if (this.roleindex > this.tablist.length - 1) {
+ this.roleindex = this.tablist.length - 1
+ this.fenjiaoseunfo()
+ }
+
+
+ this.speaker = data.data.data.speaker;
+ //上拉标记点
+ this.textindex = data.data.data.index;
+ //下拉标记点
+ this.toptextindex = data.data.data.index;
+ this.isShowMark = data.data.data.viewNameFlag;
+ console.log(this.isShowMark)
+ jsonInfo.forEach(item => {
+ item.message = JSON.parse(item.onebest)
+ item.backindex = this.csdFileindex
+ })
+
+ this.newluyinList = jsonInfo;
+ if (this.textindex == null) {
+ return
+ } else {
+ this.dialogList.push(jsonInfo[this.textindex]);
+ }
+ }
+ })
},
toKeywordsearch() {
this.stateisshow = 1;
@@ -1542,7 +1543,8 @@
this.newluyinList = []
uni.request({
url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
- "&bg=" + info.bg + "&speaker=" + this.roleindex + '&voFlag=0' + '&num=50', //仅为示例,并非真实接口地址。
+ "&bg=" + info.bg + "&speaker=" + this.roleindex + '&voFlag=0' +
+ '&num=50', //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
@@ -1623,26 +1625,29 @@
//音频前进回退
sliderChangeComplate(currentTime) {
- let platetime = (currentTime * 1000) || 0;
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])
+ for (let i = 0; i < this.newluyinList.length; i++) {
+ let message = this.newluyinList[i].message
+ if (!message) return
+ if (Math.floor(this.newluyinList[i].bg / 1000) <= currentTime && currentTime <= Math.floor(this
+ .newluyinList[i].ed / 1000)) {
+ for (let j = 0; j < message.length; j++) {
+ let item = message[j]
+ if (Math.floor(item.bg / 1000) <= currentTime && currentTime <= Math.floor(item.ed / 1000)) {
+ this.scrollId = "dialog" + this.csdFileindex + "text" + item.bg;
+ break;
+ }
+ if (j < message.length - 1 && Math.floor(item.ed / 1000) <= currentTime && currentTime <= Math
+ .floor(item.bg / 1000)) {
+ this.scrollId = "dialog" + this.csdFileindex + "text" + item.bg;
+ break;
+ }
}
+ this.textindex = i;
+ this.toptextindex = i;
+ this.dialogList.push(this.newluyinList[i])
}
- })
+ }
},
//长按点击播放
clickbofang(dialog, item) {
diff --git a/utils/domain.js b/utils/domain.js
index fe80198..3b37202 100644
--- a/utils/domain.js
+++ b/utils/domain.js
@@ -7,12 +7,12 @@
// const baseUrl = 'http://192.168.31.92:8080/api';// 测试站
// const baseUrl = 'http://127.0.0.1:8080/autoSR/api';// 本地
// const baseUrl = 'http://192.168.31.244:8080/autoSR/api';// 本地
-// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 测试站
+const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 测试站
// const baseUrl = 'http://192.168.31.210:8080/api'; // 泽明
// const baseUrl = 'http://192.168.31.167:8080/autoSR/api'; // 长龙
// const baseUrl = 'http://192.168.31.134:8080/autoSR/api'; // 佳豪
// const baseUrl = 'http://10.2.1.104:8081/autoSR/api'; // 刘敏
-const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
+// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式