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

View File

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

View File

@ -343,15 +343,30 @@
// 所有分享,所有类型
handleshareClick(item) {
this.showshare = false; // 关闭弹窗
var that=this;
switch (item.action) {
case 'type':
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;
case 'share':
uni.navigateTo({
url: "/pages/common/allShare/index"
url: "/pages/common/allShare/index",
})
break;
}
@ -739,6 +754,7 @@
}
},
onLoad() {
debugger;
console.error("首页加载");
this.getTab()
this.downCallback();