Browse Source

提交修改

dev
douzhuo 2 years ago
parent
commit
0da48e246e
5 changed files with 51 additions and 26 deletions
  1. +11
    -7
      pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
  2. +8
    -1
      pages/center/Piabodata/Userinsightinto.vue
  3. +29
    -16
      pages/center/prohibited/details.vue
  4. +2
    -2
      pages/mine/details.vue
  5. +1
    -0
      pages/mine/details2.vue

+ 11
- 7
pages/center/Piabodata/Customerportrait/Receivedetailabout.vue View File

@@ -447,7 +447,8 @@
ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法 ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
isPageHide: false, // 是否息屏 isPageHide: false, // 是否息屏
duration: '', // 总时长
duration: '', // 总时长
info: {}, // 播放时间
}; };
}, },
@@ -460,6 +461,7 @@
}, },
onLoad(options) { onLoad(options) {
if (options.info) this.info = JSON.parse(options.info)
this.customerId = options.customerId; this.customerId = options.customerId;
this.$zaudio.autoPlay = true this.$zaudio.autoPlay = true
//注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响; //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
@@ -512,15 +514,17 @@
bg: 0 bg: 0
} }
} }
!this.isPageHide && this.init(info)
!this.isPageHide && this.init(Object.keys(this.info).length > 0 ? this.info : info)
}, },
onHide() {
onHide() {
this.info = {}
this.isPageHide = true this.isPageHide = true
}, },
// 销毁实例 // 销毁实例
onUnload() {
onUnload() {
this.info = {}
//卸载不需要的业务和获取播放状态的业务,提高页面性能 //卸载不需要的业务和获取播放状态的业务,提高页面性能
this.$zaudio.off('seek', this.ACTION); this.$zaudio.off('seek', this.ACTION);
this.$zaudio.off('stop', this.ACTION); this.$zaudio.off('stop', this.ACTION);
@@ -775,12 +779,12 @@
const message = this.dialogList[0].message; const message = this.dialogList[0].message;
if (!message) return if (!message) return
for (let i = 0; i < message.length; i++) { for (let i = 0; i < message.length; i++) {
if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed /
if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow <= Math.floor(message[i].ed /
1000))) { 1000))) {
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow <
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) <= this.playNow && this.playNow <=
Math.floor(message[i + 1].bg / 1000)) { Math.floor(message[i + 1].bg / 1000)) {
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
@@ -810,8 +814,8 @@
} }
this.datetiem = res[0].receptionTime; this.datetiem = res[0].receptionTime;
this.Alladdtodigest = res[0].status; this.Alladdtodigest = res[0].status;
this.zyAudio()
this.getCorpusAnalysis(info) this.getCorpusAnalysis(info)
if (info.bg == 0 || type == 'Receivedetailabout') this.zyAudio()
} }
}) })
}, },


+ 8
- 1
pages/center/Piabodata/Userinsightinto.vue View File

@@ -201,8 +201,15 @@
}, },
//查看 //查看
Toview(item,i){ Toview(item,i){
console.log(item)
let keywordsid = 0
if (item.matchKeywords[i].children) {
keywordsid = item.matchKeywords[i].children[0].keywordsId
} else {
keywordsid = item.matchKeywords[i].keywordsId
}
uni.navigateTo({ uni.navigateTo({
url: '/pages/center/Piabodata/Customerportrait/Receivingrecords?datatype='+this.activeTotal+"&keywordsId="+item.matchKeywords[i].keywordsId+"&starttime="+this.timeobj.statDateStart+"&endoftime="+this.timeobj.statDateEnd
url: '/pages/center/Piabodata/Customerportrait/Receivingrecords?datatype='+this.activeTotal+"&keywordsId="+keywordsid+"&starttime="+this.timeobj.statDateStart+"&endoftime="+this.timeobj.statDateEnd
}) })
}, },
//时间切换 //时间切换


+ 29
- 16
pages/center/prohibited/details.vue View File

@@ -269,7 +269,7 @@
this.stateisshow = option.stateisshow; this.stateisshow = option.stateisshow;
this.itemobj = uni.getStorageSync('searchobj'); this.itemobj = uni.getStorageSync('searchobj');
if (option.isMerge) this.isMerge = option.isMerge if (option.isMerge) this.isMerge = option.isMerge
this.$zaudio.autoPlay = false
this.$zaudio.autoPlay = true


//注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响; //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
this.$zaudio.on('stop', this.ACTION, () => { this.$zaudio.on('stop', this.ACTION, () => {
@@ -295,8 +295,11 @@
}, },


onShow() { onShow() {
this.scrollId = ''
//实时渲染当前的播放状态 //实时渲染当前的播放状态
this.$zaudio.syncRender()
if (this.current == 1) {
this.$zaudio.syncRender()
}
this.permissions = uni.getStorageSync('weapp_session_Menu_data') // 权限 this.permissions = uni.getStorageSync('weapp_session_Menu_data') // 权限


this.roleindex = 0; this.roleindex = 0;
@@ -320,12 +323,8 @@
this.$zaudio.off('seek', this.ACTION); this.$zaudio.off('seek', this.ACTION);
this.$zaudio.off('stop', this.ACTION); this.$zaudio.off('stop', this.ACTION);
this.$zaudio.off('playing', this.ACTION); this.$zaudio.off('playing', this.ACTION);
this.$zaudio.setAudio([{
src: '',
title: '',
singer: '',
coverImgUrl: ''
}])
// this.$zaudio.setAudio([])
}, },


methods: { methods: {
@@ -395,7 +394,6 @@
this.customerId = res.results[0].id; this.customerId = res.results[0].id;
this.current = 0 this.current = 0
uni.setStorageSync('nextPageObj', JSON.stringify(this.nextPageObj)) uni.setStorageSync('nextPageObj', JSON.stringify(this.nextPageObj))
this.$zaudio.resetDatas()
this.resetAudioParams() this.resetAudioParams()
this.prohibitedMatch() this.prohibitedMatch()
}).catch(e => { }).catch(e => {
@@ -445,7 +443,7 @@
this.roleindex = 0; this.roleindex = 0;
this.gituserlist() this.gituserlist()
this.findTabooWords() this.findTabooWords()
this.zyAudio()
// this.zyAudio()
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@@ -566,14 +564,14 @@
this.sliderMax = this.getTime(res[0].recordDuration) this.sliderMax = this.getTime(res[0].recordDuration)
this.timeStr = this.getTime(res[0].recordDuration) this.timeStr = this.getTime(res[0].recordDuration)
this.date = res[0].receptionTime; this.date = res[0].receptionTime;
this.getCorpusAnalysis(info);
this.getCorpusAnalysis(info, type);
} else { } else {
this.luyinList = res; this.luyinList = res;
this.recordPath = res[0].recordPath this.recordPath = res[0].recordPath
this.sliderMax = this.getTime(res[0].recordDuration) this.sliderMax = this.getTime(res[0].recordDuration)
this.timeStr = this.getTime(res[0].recordDuration) this.timeStr = this.getTime(res[0].recordDuration)
this.date = res[0].receptionTime; this.date = res[0].receptionTime;
this.getCorpusAnalysis(info);
this.getCorpusAnalysis(info, type);
} }
} }
}) })
@@ -585,7 +583,7 @@
}, },


// 获取转义后的对话结果 // 获取转义后的对话结果
getCorpusAnalysis(info) {
getCorpusAnalysis(info, type) {
this.dialogList = []; this.dialogList = [];
this.newluyinList = [] this.newluyinList = []
uni.request({ uni.request({
@@ -659,8 +657,10 @@
this.newluyinList = jsonInfo; this.newluyinList = jsonInfo;
this.dialogList.push(jsonInfo[0]); this.dialogList.push(jsonInfo[0]);
console.log(this.dialogList, '12312321') console.log(this.dialogList, '12312321')
var itc = parseInt(info.bg / 1000)
this.adasdasdasd(itc)
if (type == 'show') {
var itc = parseInt(info.bg / 1000)
this.adasdasdasd(itc)
}
this.$forceUpdate() this.$forceUpdate()
} }
}) })
@@ -810,6 +810,7 @@
// 选中下标 // 选中下标
change(index) { change(index) {
this.current = index; this.current = index;
this.scrollId = ''
if (index == 1) { if (index == 1) {
this.zyAudio() this.zyAudio()
} }
@@ -823,6 +824,18 @@
this.infos = item this.infos = item
this.audioType = true this.audioType = true
this.init(this.infos, type) this.init(this.infos, type)
let data = [{
src: this.recordPath,
title: '录音音频',
singer: '',
coverImgUrl: ''
}]
this.$zaudio.setAudio(data)
//渲染第一首音频
this.$zaudio.setRender(0)
setTimeout(() => {
this.adasdasdasd(parseInt(item.bg / 1000))
}, 1500)
return return
} else { } else {
this.audioType = false this.audioType = false
@@ -870,7 +883,7 @@
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow <
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) <= this.playNow && this.playNow <=
Math.floor(message[i + 1].bg / 1000)) { Math.floor(message[i + 1].bg / 1000)) {
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;


+ 2
- 2
pages/mine/details.vue View File

@@ -451,12 +451,12 @@
const message = this.dialogList[0].message; const message = this.dialogList[0].message;
if (!message) return if (!message) return
for (let i = 0; i < message.length; i++) { for (let i = 0; i < message.length; i++) {
if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed / 1000))) {
if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow <= Math.floor(message[i].ed / 1000))) {
console.log(message[i]) console.log(message[i])
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow < Math.floor(message[i + 1].bg / 1000)) {
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) <= this.playNow && this.playNow <= Math.floor(message[i + 1].bg / 1000)) {
this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg; this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }


+ 1
- 0
pages/mine/details2.vue View File

@@ -670,6 +670,7 @@
}, },
//关键词点击 //关键词点击
tapbadge(item) { tapbadge(item) {
this.Pinspeak = false
//进搜索页面 //进搜索页面
uni.navigateTo({ uni.navigateTo({
url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item + url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item +


Loading…
Cancel
Save