wangxiaohua 2 years ago
parent
commit
e7f5a17cae
5 changed files with 127 additions and 69 deletions
  1. +19
    -11
      pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
  2. +41
    -24
      pages/learning/Thefulltext/index.vue
  3. +28
    -11
      pages/learning/Thefulltext/index2.vue
  4. +20
    -12
      pages/mine/details.vue
  5. +19
    -11
      pages/mine/details2.vue

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

@@ -467,15 +467,6 @@
}; };
}, },
onShow() { onShow() {
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
this.intention=false; this.intention=false;
this.kehuyixiangcenterindex=0; this.kehuyixiangcenterindex=0;
this.buildingID = uni.getStorageSync('buildingID').id; this.buildingID = uni.getStorageSync('buildingID').id;
@@ -517,14 +508,14 @@
// 在组件实例被从页面节点树移除时执行 // 在组件实例被从页面节点树移除时执行
destroyed: function() { destroyed: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
// 销毁实例 // 销毁实例
onUnload: function() { onUnload: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
@@ -739,10 +730,27 @@
// 播放监听 // 播放监听
console.log('播放!'); console.log('播放!');
this.audioPlay = true; this.audioPlay = true;
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
}); });
}, },
onPause(){ onPause(){
this.innerAudioContext.onPause(() => { this.innerAudioContext.onPause(() => {
wx.disableAlertBeforeUnload({
success:function(res){
console.log(res)
},
fail:function(e){
console.log(e)
}
});
// 暂停监听 // 暂停监听
console.log('暂停播放!'); console.log('暂停播放!');
this.audioPlay = false this.audioPlay = false


+ 41
- 24
pages/learning/Thefulltext/index.vue View File

@@ -212,15 +212,15 @@
},30000) },30000)
}, },
onShow: function() { onShow: function() {
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
// wx.enableAlertBeforeUnload({
// message: "是否确认退出详情页面?",
// success: function (res) {
// console.log("方法注册成功:", res);
// },
// fail: function (errMsg) {
// console.log("方法注册失败:", errMsg);
// },
// });
this.initRecord(); this.initRecord();
let pages = getCurrentPages(); let pages = getCurrentPages();
@@ -244,14 +244,14 @@
destroyed: function() { destroyed: function() {
clearTimeout(this.timer) clearTimeout(this.timer)
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
// 销毁实例 // 销毁实例
onUnload: function() { onUnload: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
@@ -279,20 +279,37 @@
// console.log(res) // console.log(res)
}) })
}, },
onPlay(){
this.innerAudioContext.onPlay(() => {
// 播放监听
console.log('播放!');
this.audioPlay = true;
});
},
onPause(){
this.innerAudioContext.onPause(() => {
// 暂停监听
console.log('暂停播放!');
this.audioPlay = false
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() { onCanplay() {
this.innerAudioContext.onCanplay((callback) => { this.innerAudioContext.onCanplay((callback) => {
console.log("缓冲回调",this.innerAudioContext.duration); console.log("缓冲回调",this.innerAudioContext.duration);


+ 28
- 11
pages/learning/Thefulltext/index2.vue View File

@@ -242,15 +242,15 @@
},30000) },30000)
}, },
onShow: function() { onShow: function() {
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
// wx.enableAlertBeforeUnload({
// message: "是否确认退出详情页面?",
// success: function (res) {
// console.log("方法注册成功:", res);
// },
// fail: function (errMsg) {
// console.log("方法注册失败:", errMsg);
// },
// });
this.initRecord(); this.initRecord();
if(this.stateisshow==2){ if(this.stateisshow==2){
@@ -279,14 +279,14 @@
destroyed: function() { destroyed: function() {
clearTimeout(this.timer) clearTimeout(this.timer)
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
// 销毁实例 // 销毁实例
onUnload: function() { onUnload: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
@@ -320,10 +320,27 @@
// 播放监听 // 播放监听
console.log('播放!'); console.log('播放!');
this.audioPlay = true; this.audioPlay = true;
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
}); });
}, },
onPause(){ onPause(){
this.innerAudioContext.onPause(() => { this.innerAudioContext.onPause(() => {
wx.disableAlertBeforeUnload({
success:function(res){
console.log(res)
},
fail:function(e){
console.log(e)
}
});
// 暂停监听 // 暂停监听
console.log('暂停播放!'); console.log('暂停播放!');
this.audioPlay = false this.audioPlay = false


+ 20
- 12
pages/mine/details.vue View File

@@ -268,15 +268,6 @@
this.stateisshow=options.stateisshow; this.stateisshow=options.stateisshow;
}, },
onShow() { onShow() {
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); this.Menulist = uni.getStorageSync('weapp_session_Menu_data');
this.Menulist.forEach(item=>{ this.Menulist.forEach(item=>{
if(item.name=='标记有效无效接待'){ if(item.name=='标记有效无效接待'){
@@ -320,14 +311,14 @@
// 在组件实例被从页面节点树移除时执行 // 在组件实例被从页面节点树移除时执行
destroyed: function() { destroyed: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
// 销毁实例 // 销毁实例
onUnload: function() { onUnload: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
@@ -414,15 +405,32 @@
url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&status="+this.status +"&skpl="+"1" url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&status="+this.status +"&skpl="+"1"
}) })
}, },
onPlay(){
onPlay(){
this.innerAudioContext.onPlay(() => { this.innerAudioContext.onPlay(() => {
// 播放监听 // 播放监听
console.log('播放!'); console.log('播放!');
this.audioPlay = true; this.audioPlay = true;
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
}); });
}, },
onPause(){ onPause(){
this.innerAudioContext.onPause(() => { this.innerAudioContext.onPause(() => {
wx.disableAlertBeforeUnload({
success:function(res){
console.log(res)
},
fail:function(e){
console.log(e)
}
});
// 暂停监听 // 暂停监听
console.log('暂停播放!'); console.log('暂停播放!');
this.audioPlay = false this.audioPlay = false


+ 19
- 11
pages/mine/details2.vue View File

@@ -516,15 +516,6 @@
this.stateisshow=options.stateisshow; this.stateisshow=options.stateisshow;
}, },
onShow() { onShow() {
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
this.Menulist = uni.getStorageSync('weapp_session_Menu_data'); this.Menulist = uni.getStorageSync('weapp_session_Menu_data');
this.Menulist.forEach(item=>{ this.Menulist.forEach(item=>{
if(item.name=='标记有效无效接待'){ if(item.name=='标记有效无效接待'){
@@ -568,14 +559,14 @@
// 在组件实例被从页面节点树移除时执行 // 在组件实例被从页面节点树移除时执行
destroyed: function() { destroyed: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
// 销毁实例 // 销毁实例
onUnload: function() { onUnload: function() {
//暂停 //暂停
this.innerAudioContext.pause()
// this.innerAudioContext.pause()
// 销毁 // 销毁
this.innerAudioContext.destroy(); this.innerAudioContext.destroy();
}, },
@@ -1034,10 +1025,27 @@
// 播放监听 // 播放监听
console.log('播放!'); console.log('播放!');
this.audioPlay = true; this.audioPlay = true;
wx.enableAlertBeforeUnload({
message: "是否确认退出详情页面?",
success: function (res) {
console.log("方法注册成功:", res);
},
fail: function (errMsg) {
console.log("方法注册失败:", errMsg);
},
});
}); });
}, },
onPause(){ onPause(){
this.innerAudioContext.onPause(() => { this.innerAudioContext.onPause(() => {
wx.disableAlertBeforeUnload({
success:function(res){
console.log(res)
},
fail:function(e){
console.log(e)
}
});
// 暂停监听 // 暂停监听
console.log('暂停播放!'); console.log('暂停播放!');
this.audioPlay = false this.audioPlay = false


Loading…
Cancel
Save