diff --git a/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue b/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue index b92b40f..891a3bc 100644 --- a/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue +++ b/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue @@ -68,10 +68,13 @@ Semanticword: '', qujian: true, from: '', // 来源 + tipsFncName: '', // 提醒页面变更的值 }; }, onLoad(options) { this.customerId = options.customerId; + if (options.UpDateEvent) this.tipsFncName = options.UpDateEvent + console.log(options) this.statistical() }, methods: { @@ -165,16 +168,14 @@ item.id = id; item.index = index; - let pages = getCurrentPages() //获取当前页面栈的信息 - let prevPage = pages[pages.length - 2] //获取上一个页面 - prevPage.setData({ //把需要回传的值保存到上一个页面 - info: item - }); - uni.$emit('Receivedetailabout', item) - - wx.navigateBack({ //然后返回上一个页面 - delta: 1 - }) + // let pages = getCurrentPages() //获取当前页面栈的信息 + // let prevPage = pages[pages.length - 2] //获取上一个页面 + // prevPage.setData({ //把需要回传的值保存到上一个页面 + // info: item + // }); + console.log('我在这里打印了', item) + uni.$emit(this.tipsFncName, item) + uni.navigateBack() } }, } diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue index 9b4a934..ac986d7 100644 --- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue +++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue @@ -469,6 +469,10 @@ }, onLoad(options) { + uni.$on('Receivedetailabouts', info => { + console.log('我监听收到了', info) + this.init(info, 'seek') + }) this.customerId = options.customerId; this.$zaudio.autoPlay = true @@ -482,10 +486,10 @@ console.log('我是强制暂停或关闭小程序音频浮窗触发的') }) this.$zaudio.on('seek', this.ACTION, (time) => { + console.log('seek', time) this.sliderChangeComplate(this.TIMEEVENT(time)) }) this.$zaudio.on('playing', this.ACTION, (obj) => { - console.log(this.TIMEEVENT(obj.current)) this.duration = obj.duration this.TimeUpdate(this.TIMEEVENT(obj.current)) }) @@ -495,15 +499,13 @@ }) this.$zaudio.on('ended', this.ACTION, e => { + console.log('ended') this.$zaudio.stop() this.init({ bg: 0, customerId: this.customerId }) }) - uni.$on('Receivedetailabout', info => { - this.init(info, 'Receivedetailabout') - }) }, onShow() { @@ -544,11 +546,14 @@ // 销毁实例 onUnload() { + uni.$off('Receivedetailabouts') this.info = {} //卸载不需要的业务和获取播放状态的业务,提高页面性能 this.$zaudio.off('seek', this.ACTION); this.$zaudio.off('stop', this.ACTION); this.$zaudio.off('playing', this.ACTION); + this.$zaudio.off('error', this.ACTION); + this.$zaudio.off('ended', this.ACTION); }, methods: { SPEAKERSTYLE(index) { @@ -590,7 +595,7 @@ //进搜索页面 uni.navigateTo({ url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item + - "&skpl=" + "2" + "&UpDateEvent=Receivedetailabout" + "&skpl=" + "2" + "&UpDateEvent=Receivedetailabouts" }) }, recordclick(i) { @@ -621,13 +626,13 @@ guanjiancishifo() { uni.navigateTo({ url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId=' + this - .customerId + '&from=Receivedetailabout' + .customerId + '&from=Receivedetailabouts' + "&UpDateEvent=Receivedetailabouts" }) }, tosearch() { uni.navigateTo({ url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId=' + this - .customerId + '&from=Receivedetailabout' + .customerId + '&from=Receivedetailabouts' + "&UpDateEvent=Receivedetailabouts" }) }, //标签选择 @@ -836,7 +841,7 @@ } this.datetiem = res[0].receptionTime; this.Alladdtodigest = res[0].status; - this.zyAudio() + if (type != 'seek') this.zyAudio() this.getCorpusAnalysis(info) } }) @@ -1195,7 +1200,7 @@ this.Pinspeak = false uni.navigateTo({ url: '/pages/mine/ScoringPlaylist?customerId=' + this.customerId + "&id=" + item - .keywordsId + "&type=" + 1 + "&UpDateEvent=Receivedetailabout" + .keywordsId + "&type=" + 1 + "&UpDateEvent=Receivedetailabouts" }) } }, @@ -1379,7 +1384,7 @@ this.Pinspeak = false uni.navigateTo({ url: '/pages/mine/ScoringPlaylist?customerId=' + this.customerId + "&id=" + item - .marketingId + "&type=0" + "&UpDateEvent=Receivedetailabout" + .marketingId + "&type=0" + "&UpDateEvent=Receivedetailabouts" }) } }, @@ -1533,7 +1538,6 @@ // 跳转指定位置播放 stepPlay(t) { - console.log(this.$zaudio) this.$zaudio.seek(t) if (this.$zaudio.paused) { this.$zaudio.operate() diff --git a/pages/learning/ScoringPlaylist.vue b/pages/learning/ScoringPlaylist.vue index c29f954..1a6c436 100644 --- a/pages/learning/ScoringPlaylist.vue +++ b/pages/learning/ScoringPlaylist.vue @@ -1,7 +1,6 @@