修正用户名显示逻辑进入服务列表页面自动刷新
This commit is contained in:
@@ -40,7 +40,12 @@
|
||||
</view>
|
||||
|
||||
<!-- 服务状态列表 -->
|
||||
<service-list-furniture v-if="activeTab === 'status'" class="service-status-container" :style="{ top: computedContentTop || contentTop }"></service-list-furniture>
|
||||
<service-list-furniture
|
||||
v-if="activeTab === 'status'"
|
||||
ref="serviceListRef"
|
||||
class="service-status-container"
|
||||
:style="{ top: computedContentTop || contentTop }"
|
||||
></service-list-furniture>
|
||||
|
||||
<!-- 开始接待表单 -->
|
||||
<common-begin-reception
|
||||
@@ -467,6 +472,21 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 由宿主页 onShow / 分包就绪后调用。tab 页缓存时子列表的 mounted 不会重复执行,需在此主动拉取后端数据。
|
||||
*/
|
||||
refreshPageData() {
|
||||
this.$nextTick(() => {
|
||||
if (this.activeTab === 'status') {
|
||||
const list = this.$refs.serviceListRef;
|
||||
if (list && typeof list.onServiceStatusRefresh === 'function') {
|
||||
list.onServiceStatusRefresh();
|
||||
}
|
||||
} else if (this.activeTab === 'tag' && this.tagViewMode === 'list') {
|
||||
this.fetchTagList({ force: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
applyIncomingTab(tab) {
|
||||
const allowed = ['status', 'reception', 'tag'];
|
||||
if (!allowed.includes(tab)) return;
|
||||
|
||||
@@ -82,13 +82,23 @@
|
||||
if (item.path) {
|
||||
// 判断是 tabBar 页面还是普通页面
|
||||
const tabBarPages = [
|
||||
'/pages/furniture_reception/furniture_reception',
|
||||
'/pages-subpackage/furniture_customer/furniture_customer',
|
||||
'/pages/furniture_top_sales/furniture_top_sales',
|
||||
'/pages/ucenter/ucenter'
|
||||
];
|
||||
|
||||
if (tabBarPages.includes(item.path)) {
|
||||
if (item.path === '/pages/furniture_reception/furniture_reception') {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
fail: (err) => {
|
||||
console.error('跳转失败:', err);
|
||||
uni.showToast({
|
||||
title: '页面不存在',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else if (tabBarPages.includes(item.path)) {
|
||||
uni.switchTab({
|
||||
url: item.path,
|
||||
fail: (err) => {
|
||||
|
||||
Reference in New Issue
Block a user