1
0
forked from dyf/APP

修复从类型跳转至首页时,首页数据按类型筛选

This commit is contained in:
liub
2026-01-12 17:29:49 +08:00
parent 98162ca214
commit 779017919b
3 changed files with 25 additions and 10 deletions

View File

@ -120,7 +120,7 @@
var ble = null; var ble = null;
var these = null; var these = null;
var eventChannel = null; var eventChannel = null;
var searchTime=null;
export default { export default {
data() { data() {
return { return {
@ -525,8 +525,8 @@
return; return;
} }
} }
clearTimeout(searchTime);
searchTime=setTimeout(()=>{
ble.StopSearch().finally(() => { ble.StopSearch().finally(() => {
@ -559,7 +559,7 @@
}); });
}); });
},800);
}, },
isItemLink: function(item, index) { isItemLink: function(item, index) {

View File

@ -114,11 +114,10 @@
uni.switchTab({ uni.switchTab({
url: '/pages/common/index/index', url: '/pages/common/index/index',
success: (res) => { success: (res) => {
res.eventChannel.emit('index', { let eventChannel = this.getOpenerEventChannel();
data: item eventChannel.emit('index', item);
});
} }
}) });
} }
}, },

View File

@ -343,15 +343,30 @@
// 所有分享,所有类型 // 所有分享,所有类型
handleshareClick(item) { handleshareClick(item) {
this.showshare = false; // 关闭弹窗 this.showshare = false; // 关闭弹窗
var that=this;
switch (item.action) { switch (item.action) {
case 'type': case 'type':
uni.navigateTo({ uni.navigateTo({
url: '/pages/common/allType/index' url: '/pages/common/allType/index',
events:{
index(data){
if(data && data.id){
that.tabs.find((v,i)=>{
if(v.id===data.id){
that.switchTab(v,i);
return true;
}
return false;
})
}
}
}
}); });
break; break;
case 'share': case 'share':
uni.navigateTo({ uni.navigateTo({
url: "/pages/common/allShare/index" url: "/pages/common/allShare/index",
}) })
break; break;
} }
@ -739,6 +754,7 @@
} }
}, },
onLoad() { onLoad() {
debugger;
console.error("首页加载"); console.error("首页加载");
this.getTab() this.getTab()
this.downCallback(); this.downCallback();